<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>pocket of embers</title>
	<atom:link href="http://poem.oiu.ch/feed/" rel="self" type="application/rss+xml" />
	<link>http://poem.oiu.ch</link>
	<description>intentionally without a subtitle</description>
	<lastBuildDate>Wed, 10 Mar 2010 21:28:32 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>HS1527 for JeeNodes</title>
		<link>http://poem.oiu.ch/2010/03/hs1527-for-jeenodes/</link>
		<comments>http://poem.oiu.ch/2010/03/hs1527-for-jeenodes/#comments</comments>
		<pubDate>Wed, 10 Mar 2010 21:28:32 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://poem.oiu.ch/?p=33</guid>
		<description><![CDATA[I&#8217;ll extend this post as I find some time &#8230; // This example sends commands to wireless switches in the hs1527 format on 433 Mhz. // 2009-02-21 &#60;jcw@equi4.com&#62; http://opensource.org/licenses/mit-license.php // 2010-03-10 &#60;poem.michael@oiu.ch&#62; http://opensource.org/licenses/mit-license.php // $Id$ // Note that 868 MHz RFM12B's can send 433 MHz just fine, even though the RF // circuitry is presumably [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ll extend this post as I find some time &#8230;</p>
<pre>// This example sends commands to wireless switches in the hs1527 format on 433 Mhz.
// 2009-02-21 &lt;jcw@equi4.com&gt; http://opensource.org/licenses/mit-license.php
// 2010-03-10 &lt;poem.michael@oiu.ch&gt; http://opensource.org/licenses/mit-license.php
// $Id$

// Note that 868 MHz RFM12B's can send 433 MHz just fine, even though the RF
// circuitry is presumably not optimized for that band. Maybe the range will
// be limited, or maybe it's just because 868 is nearly a multiple of 433 ?

// I've tested the code with a RFM12B build for the 433MHz band and an 16.4mm
// whip antenna. It works quit over a distance.

// Devices tested: SITE - Model RCS-K08

#include &lt;Ports.h&gt;
#include &lt;RF12.h&gt;

//min 270 - max 650 -&gt; smaller intervall = less power usage therfore
#define pulseLength0 300
#define pulseLength1 900 //pulseLength * 3
#define pulseLengthS 6300 //pulseLength * 31 

// Turn transmitter on or off, but also apply asymmetric correction and account
// for 25 us SPI overhead to end up with the proper on-the-air pulse widths.
// With thanks to JGJ Veken for his help in getting these values right.
static void ookPulse(int on, int off) {
 rf12_onOff(1);
 delayMicroseconds(on+150);
 rf12_onOff(0);
 delayMicroseconds(off-200);
}

// Sends a single bit in hs1527 definition
static void hs1527_bit(boolean data) {
 if(data)
 ookPulse(pulseLength0, pulseLength1);//1
 else
 ookPulse(pulseLength1, pulseLength0);//0
}

// Sends the whole bit tram in hs1527 definition
static void hs1527_tram(long device_nr, boolean on, int channel) {
 for(int a = 5; a &gt; 0; a--) { // minimal 3 successive trams are required

 ookPulse(pulseLength0, pulseLengthS); //sync

 for(int b = 19; b &gt; -1; b--)
 hs1527_bit((device_nr &gt;&gt; b) &amp; 0b1); //device nr

 hs1527_bit(on); //on - off

 for(int b = 2; b &gt; -1; b--)
 hs1527_bit((channel &gt;&gt; b) &amp; 0b1); //channel
 }
}

void setup() {
 Serial.begin(57600);
 Serial.println("\n[hs1527_demo]");
 rf12_initialize(0, RF12_433MHZ);
}

void loop() {  

 hs1527_tram(992363, 0, 4); //channel 4 on
 delay(1000);

 hs1527_tram(992363, 1, 4); //channel 4 off
 delay(1000);
}
</pre>
]]></content:encoded>
			<wfw:commentRss>http://poem.oiu.ch/2010/03/hs1527-for-jeenodes/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>The flames will spark soon &#8230;</title>
		<link>http://poem.oiu.ch/2010/03/the-flames-will-spark-soon/</link>
		<comments>http://poem.oiu.ch/2010/03/the-flames-will-spark-soon/#comments</comments>
		<pubDate>Wed, 10 Mar 2010 00:01:49 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://poem.oiu.ch/?p=5</guid>
		<description><![CDATA[This is a simple message which tells you that this webthingy here needs some more work before it goes public &#8230;]]></description>
			<content:encoded><![CDATA[<p>This is a simple message which tells you that this webthingy here needs some more work before it goes public &#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://poem.oiu.ch/2010/03/the-flames-will-spark-soon/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

