<?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>Gadget Dreams...</title>
	<atom:link href="http://lars.roland.bz/feed/" rel="self" type="application/rss+xml" />
	<link>http://lars.roland.bz</link>
	<description>Robots, electronics, wireless, software, firmware, mHealth...</description>
	<lastBuildDate>Tue, 29 May 2012 13:30:00 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Added a store</title>
		<link>http://lars.roland.bz/added-a-store/</link>
		<comments>http://lars.roland.bz/added-a-store/#comments</comments>
		<pubDate>Tue, 29 May 2012 12:17:27 +0000</pubDate>
		<dc:creator>Lars</dc:creator>
				<category><![CDATA[Stuff]]></category>

		<guid isPermaLink="false">http://lars.roland.bz/?p=792</guid>
		<description><![CDATA[I&#8217;ve added a store to my site, and I&#8217;m hoping to expand this with some kits for the various projects I&#8217;ve done.  I don&#8217;t think I&#8217;ll be able to earn much on selling things (the fees and costs are too high), but I hope I can maybe spread some of the projects a bit more [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve added a store to my site, and I&#8217;m hoping to expand this with some kits for the various projects I&#8217;ve done.  I don&#8217;t think I&#8217;ll be able to earn much on selling things (the fees and costs are too high), but I hope I can maybe spread some of the projects a bit more and spread some of the fun <img src='http://lars.roland.bz/wordpress/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>My LCD Boosterpacks will also be sold in the <a href="http://store.43oh.com">430h.com store</a> and for some of you it may be a better alternative to buy them there.</p>
<p>It has a very limited list of things to buy right now, but when it&#8217;s stocked up, feel free to buy some stuff to support the projects. If you have suggestions to what I can sell, please let me know. This includes also if you have suggestions to 3D-printed objects that could be in the store.</p>
]]></content:encoded>
			<wfw:commentRss>http://lars.roland.bz/added-a-store/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Laser cutter</title>
		<link>http://lars.roland.bz/laser-cutter/</link>
		<comments>http://lars.roland.bz/laser-cutter/#comments</comments>
		<pubDate>Sat, 26 May 2012 13:03:54 +0000</pubDate>
		<dc:creator>Lars</dc:creator>
				<category><![CDATA[Stuff]]></category>
		<category><![CDATA[Laser Cutter]]></category>

		<guid isPermaLink="false">http://lars.roland.bz/?p=751</guid>
		<description><![CDATA[I just ordered a Full Spectrum Laser cutter. I&#8217;m excited to see what I can build with it. There&#8217;s a special offer these few days and I hope they&#8217;ll let me have it although they sent me the invoice without me noticing the special offer.]]></description>
			<content:encoded><![CDATA[<p>I just ordered a <a href="http://fslaser.com/products/lasers/hobby-lasers/40w-deluxe-hobby-laser-engraver-and-cutter">Full Spectrum Laser cutter</a>. I&#8217;m excited to see what I can build with it. There&#8217;s a special offer these few days and I hope they&#8217;ll let me have it although they sent me the invoice without me noticing the special offer.</p>
]]></content:encoded>
			<wfw:commentRss>http://lars.roland.bz/laser-cutter/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Manufacturing boards using surface mount and a hot plate</title>
		<link>http://lars.roland.bz/manufacturing-boards-using-surface-mount-and-a-hot-plate/</link>
		<comments>http://lars.roland.bz/manufacturing-boards-using-surface-mount-and-a-hot-plate/#comments</comments>
		<pubDate>Mon, 30 Apr 2012 23:49:58 +0000</pubDate>
		<dc:creator>Lars</dc:creator>
				<category><![CDATA[Stuff]]></category>
		<category><![CDATA[LCD]]></category>
		<category><![CDATA[manufacturing]]></category>

		<guid isPermaLink="false">http://lars.roland.bz/?p=757</guid>
		<description><![CDATA[I thought I&#8217;d write a little note and post some pictures of how I&#8217;m assembling the LCD display boards. The PCBs are manufactured at Seeedstudio and are really nice quality. I&#8217;ve tried to use as many surface mount components as possible, but have some through-hole also (headers etc). The LCD itself is also surface-mount, but [...]]]></description>
			<content:encoded><![CDATA[<p>I thought I&#8217;d write a little note and post some pictures of how I&#8217;m assembling the LCD display boards. The PCBs are manufactured at Seeedstudio and are really nice quality. I&#8217;ve tried to use as many surface mount components as possible, but have some through-hole also (headers etc). The LCD itself is also surface-mount, but I solder it on manually, not using the hot plate.</p>
<p>I basically use <a href="http://uk.farnell.com/jsp/search/productdetail.jsp?sku=876768&amp;CMP=i-bf9f-00001000">solder paste in a syringe</a> and manually apply solder paste on each surface mount point.  It would probably have been slightly faster using a surface mount stencil, but using a syringe is also quite quick and not as messy as a stencil.</p>
<p>I then place the surface mount components onto the paste. In my case these are just simple capacitors and resistors, so it&#8217;s not very complicated. I used 1206 size originally, but have now started using 0805 size capacitors.</p>
<p>The board is now ready to be fried. There are several ways of doing this. Some people use a reflow oven that surrounds the entire board with heat, but I find that if the surface mount components are only on one side, using a hot plate such as <a href="http://www.clasohlson.com/no/Coline-kokeplate/Pr347872000">this</a> is the easiest. Not sure what the pros and cons are of each, but Sparkfun have also recommended using hot plates. I use a thermistor to control the heat, but since my hot plate has a thermostat I just use the thermistor to guide me towards the best setting.</p>
<p>Here&#8217;s a picture of some of the boards on the hot plate. I can do several at the same time.</p>
<p><img class="alignnone" title="Hotplate1" src="http://lars.roland.bz/images/hotplate1.jpg" alt="" width="640" height="480" /></p>
<p>The whole process of applying paste, heating them on the hot plate and then manually soldering on the LCD means I use about 1 hour on 10 boards. Of this, just doing the surface mount takes maybe 10-15 minutes for 10 boards. It&#8217;s definitely faster than manual soldering.  I might get more efficient as I move along. Right now I&#8217;m also soldering on headers on all the boards as it makes it easier to test, but I won&#8217;t do that in the long run. I&#8217;m shipping 14 boards to the 43oh.com store tomorrow. I will keep a few to sell <a href="http://lars.roland.bz/lcd/">here on the site</a>. Unfortunately, Arrow have told me the remaining batch of 222 LCDs is delayed until July, so if you want to test a board early, it might be good to get one of this first batch.</p>
<p>Here&#8217;s a zoomed in picture of one of the boards, before the solder paste has melted. The picture also shows my silk-screen error (P1.4 is really P2.0). Other than that and a slightly inefficient LED-connection, the first batch of boards seem to be pretty ok (the points that need to be connected to turn on the backlight are a bit far apart, but no big issue). The next version will also have the SMT components on the bottom, as it looks nicer.</p>
<p><img class="alignnone" title="Hotplate2" src="http://lars.roland.bz/images/hotplate2.jpg" alt="" width="640" height="480" /></p>
<p>And here&#8217;s a picture of the LCD connector soldered onto the board. I do this manually, but it&#8217;s pretty easy when using flux to &#8216;guide the solder&#8217;. You can barely see the liquid flux on the board around the connector.</p>
<p><img class="alignnone" title="LCD-Connection" src="http://lars.roland.bz/images/lcd-connection.jpg" alt="" width="640" height="480" /></p>
]]></content:encoded>
			<wfw:commentRss>http://lars.roland.bz/manufacturing-boards-using-surface-mount-and-a-hot-plate/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Art.On.Wires festival in Oslo</title>
		<link>http://lars.roland.bz/art-on-wires-festival-in-oslo/</link>
		<comments>http://lars.roland.bz/art-on-wires-festival-in-oslo/#comments</comments>
		<pubDate>Thu, 26 Apr 2012 15:34:45 +0000</pubDate>
		<dc:creator>Lars</dc:creator>
				<category><![CDATA[Stuff]]></category>

		<guid isPermaLink="false">http://lars.roland.bz/?p=707</guid>
		<description><![CDATA[There is an Art.On.Wires festival in Oslo next week (April 30 to May 5). For those in Oslo interested in Electronics and Arts, it might be a good place to drop by.]]></description>
			<content:encoded><![CDATA[<p>There is an <a href="http://art-on-wires.org/">Art.On.Wires</a> festival in Oslo next week (April 30 to May 5). For those in Oslo interested in Electronics and Arts, it might be a good place to drop by.</p>
]]></content:encoded>
			<wfw:commentRss>http://lars.roland.bz/art-on-wires-festival-in-oslo/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>LCD Booster pack &#8211; first versions ready</title>
		<link>http://lars.roland.bz/697/</link>
		<comments>http://lars.roland.bz/697/#comments</comments>
		<pubDate>Wed, 25 Apr 2012 16:21:48 +0000</pubDate>
		<dc:creator>Lars</dc:creator>
				<category><![CDATA[Stuff]]></category>
		<category><![CDATA[LCD]]></category>
		<category><![CDATA[msp430]]></category>

		<guid isPermaLink="false">http://lars.roland.bz/?p=697</guid>
		<description><![CDATA[I have made three LCD boosterpacks for the MSP430 Launchpad or other 3V microcontrollers. These are based on the Powertip PE9665WRF display with the ST7579 controller. The screen is small (28x19mm viewable area) and requires little power (0.2mA). It is SPI-based, has backlight and  has 96&#215;65 dots. It&#8217;s a perfect display if you need a [...]]]></description>
			<content:encoded><![CDATA[<p>I have made three LCD boosterpacks for the MSP430 Launchpad or other 3V microcontrollers. These are based on the Powertip PE9665WRF display with the ST7579 controller. The screen is small (28x19mm viewable area) and requires little power (0.2mA). It is SPI-based, has backlight and  has 96&#215;65 dots. It&#8217;s a perfect display if you need a cheap, small and low-power display for your next project. If you want to make your own boosterpack, I can also sell the display itself. I have bought a bunch of 250 displays, so need to get rid of them. I won&#8217;t be making any money on these boosterpack. I&#8217;m doing it for fun and learning. A first batch will soon be available in the <a href="http://store.43oh.com/">43oh.com store</a>.</p>
<p>The boosterpacks are currently in their first version, and may evolve and be improved from this description. The packs are:</p>
<ul>
<li>LCD Touch Boosterpack &#8211; a classic boosterpack with the LCD and 4 capacitive touch button areas (the display isn&#8217;t touch-enabled, in case you were wondering, just the 4 areas below the screen).</li>
<li>LCD Button Boosterpack &#8211; can be a classic boosterpack to mount onto a Launchpad or it has a place to put a DIP MSP430 onto it, so you can use the Boosterpack without a Launchpad. Also has room to solder on a regulator in case you want to run it off a battery.</li>
<li>LCD Watch &#8211; not really a boosterpack, as it won&#8217;t fit onto the Launchpad. It&#8217;s smaller in size and is meant to be part of a wrist-watch kit.</li>
</ul>
<p><img class="alignnone" title="LCDs" src="http://lars.roland.bz/images/LCDs.JPG" alt="" width="640" height="283" /></p>
<p>There is more info about the boosterpacks on a permanent page <a title="LCD" href="http://lars.roland.bz/lcd/">here</a> on my blog, including a link to a video.</p>
]]></content:encoded>
			<wfw:commentRss>http://lars.roland.bz/697/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Thermistor based thermometer for MSP430</title>
		<link>http://lars.roland.bz/thermistor-based-thermometer-for-msp430/</link>
		<comments>http://lars.roland.bz/thermistor-based-thermometer-for-msp430/#comments</comments>
		<pubDate>Tue, 03 Apr 2012 11:36:51 +0000</pubDate>
		<dc:creator>Lars</dc:creator>
				<category><![CDATA[Stuff]]></category>
		<category><![CDATA[LCD]]></category>
		<category><![CDATA[msp430]]></category>
		<category><![CDATA[sensor]]></category>

		<guid isPermaLink="false">http://lars.roland.bz/?p=678</guid>
		<description><![CDATA[I&#8217;ve made some MSP430 code for a high-temperature capable thermometer, by adapting the code from Reprap. The code uses the B57560G104F thermistor that can measure temperatures up to 300 Degrees C. As a display I suggest you buy the display I&#8217;m showing below (will soon be available to buy) or for example this character-display from Farnell. The picture [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve made some MSP430 code for a high-temperature capable thermometer, by adapting the code from <a href="http://reprap.org/wiki/Temperature_Sensor_1_0">Reprap</a>. The code uses the <a href="http://uk.farnell.com/epcos/b57560g104f/thermistor-ntc/dp/3878697?Ntt=3878697">B57560G104F thermistor</a> that can measure temperatures up to 300 Degrees C. As a display I suggest you buy the display I&#8217;m showing below (will soon be available to buy) or for example <a href="http://lars.roland.bz/2012/03/17/character-display/">this character-display from Farnell</a>.</p>
<p><img class="aligncenter" title="Thermistor" src="http://lars.roland.bz/test/thermistor.JPG" alt="" width="480" height="286" /></p>
<p>The picture shows the temperature in a display and in front the Thermistor. These are really tiny glass beads that can handle high temperatures, but be careful with how you mount it.</p>
<p>The circuit is basically</p>
<p>Vcc &#8212; 10K resistor &#8212; P1.2 &#8212; Thermistor &#8212; 0V</p>
<p>It&#8217;s also good to place a 1uF capacitor across the thermistor to remove noise.</p>
<p>IAR MSP430 code is below. It can easily be adapted to CCS or MSPGCC.</p>
<p><span id="more-678"></span></p>
<p>thermistor.c:</p>
<pre class="wp-code-highlight prettyprint">/*
* Inspired by http://reprap.org/wiki/Temperature_Sensor_1_0
* No license info from that page, but some may claim it's GPL.
* Not sure if that is relevant for such a short code snippet.
*/

#include
#include &quot;thermistor.h&quot;

// Thermistor B57560G104F http://uk.farnell.com/epcos/b57560g104f/thermistor-ntc/dp/3878697?Ntt=3878697

// r0: 100000
// t0: 25
// r1: 0
// r2: 10000
// beta: 4036
// max adc: 1023
#define NUMTEMPS 20
int temptable[NUMTEMPS][2] = {
   {1, 664}, // 664.64106912 C
   {54, 210}, // 210.439979582 C
   {107, 171}, // 171.052478604 C
   {160, 149}, // 149.564016786 C
   {213, 134}, // 134.640069513 C
   {266, 123}, // 123.039739982 C
   {319, 113}, // 113.394921511 C
   {372, 104}, // 104.997832544 C
   {425, 97}, // 97.4294169841 C
   {478, 90}, // 90.4137427983 C
   {531, 83}, // 83.7503688927 C
   {584, 77}, // 77.2777873564 C
   {637, 70}, // 70.8496463885 C
   {690, 64}, // 64.314518844 C
   {743, 57}, // 57.4917052426 C
   {796, 50}, // 50.1314173911 C
   {849, 41}, // 41.8303323287 C
   {902, 31}, // 31.8031759831 C
   {955, 18}, // 18.0092465547 C
   {995, 0} // 0.112666936696 C
};

void initThermistor()
{
  WDTCTL = WDTPW + WDTHOLD;                 // Stop WDT
  ADC10CTL1 = INCH_2;             // Conversion code singed format, input A1
  ADC10AE0 |= BIT2;                         // P1.2 ADC option select
  ADC10CTL0 = ADC10SHT_2 + ADC10ON + ADC10IE; // ADC10ON, interrupt enabled
}

int rawValueThermistor()
{
    ADC10CTL0 |= ENC + ADC10SC;             // Sampling and conversion start
    __bis_SR_register(CPUOFF + GIE);        // LPM0, ADC10_ISR will force exit
    return ADC10MEM;
}

int readTemp()
{
   int rawtemp = rawValueThermistor();
   int current_celsius = 0;

   int i = 0;
   for (i=1;i &lt; NUMTEMPS;i++)    {       if (temptable[i][0] &amp;gt; rawtemp)
      {
         int realtemp  = temptable[i-1][1] + (rawtemp - temptable[i-1][0]) * (temptable[i][1] - temptable[i-1][1]) / (temptable[i][0] - temptable[i-1][0]);

         if (realtemp &gt; 255)
            realtemp = 255; 

         current_celsius = realtemp;

         break;
      }
   }

   // Overflow: We just clamp to 0 degrees celsius
   if (i == NUMTEMPS)  {
      current_celsius = 1000;
   }

   return current_celsius;
}

#pragma vector=ADC10_VECTOR
__interrupt void ADC10_ISR (void)
{
  __bic_SR_register_on_exit(CPUOFF);        // Clear CPUOFF bit from 0(SR)
}</pre>
<p>thermistor.h</p>
<pre class="wp-code-highlight prettyprint">void initThermistor();
int rawValueThermistor(void);
int readTemp(void);</pre>
]]></content:encoded>
			<wfw:commentRss>http://lars.roland.bz/thermistor-based-thermometer-for-msp430/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Remote controlled power sockets for home automation etc</title>
		<link>http://lars.roland.bz/remote-controlled-sockets-for-home-automation-etc/</link>
		<comments>http://lars.roland.bz/remote-controlled-sockets-for-home-automation-etc/#comments</comments>
		<pubDate>Sat, 31 Mar 2012 12:08:34 +0000</pubDate>
		<dc:creator>Lars</dc:creator>
				<category><![CDATA[Stuff]]></category>
		<category><![CDATA[home automation]]></category>
		<category><![CDATA[msp430]]></category>
		<category><![CDATA[rf]]></category>

		<guid isPermaLink="false">http://lars.roland.bz/?p=655</guid>
		<description><![CDATA[I&#8217;ve had these remote controlled sockets lying around for a while. They can be controlled via a radio-based remote. They often use 434MHz and OOK modulation (on-off-shift keying, which basically is turning the radio signal on and off based on a digital signal). This is a very simple protocol and frequency to reverse-engineer. This one [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve had these remote controlled sockets lying around for a while. They can be controlled via a radio-based remote. They often use 434MHz and OOK modulation (on-off-shift keying, which basically is turning the radio signal on and off based on a digital signal). This is a very simple protocol and frequency to reverse-engineer. This one is called NEXA, but I think there are quite a few versions with different brand names using the same RF protocol.</p>
<p><img class="alignnone" title="nexa" src="http://lars.roland.bz/test/nexa.jpg" alt="" width="451" height="480" /></p>
<p>First take a receiver module such as <a href="http://uk.farnell.com/quasar/qam-rx2/module-receiver-am-433mhz/dp/1304026">this one</a>. Connect it to power and ground, place an 8 cm wire to the antenna and connect the signal to a digital signal oscilloscope. If you don&#8217;t have one, you should get one. There are some sub-100 USD ones that work very well. I use <a href="http://dangerousprototypes.com/open-logic-sniffer/">Open Logic Sniffer</a>, which is a great tool. Below is a picture showing a sample collected data. This is not the one from my NEXA remote controlled power socket. I didn&#8217;t save that one.</p>
<p><img class="alignnone" title="ols-sample" src="http://lars.roland.bz/test/ols-sample.png" alt="" width="551" height="64" /></p>
<p>Connect it to the PC and you can see digital waveforms, timing etc on the PC. Use the remote that came with the socket to send a signal and read it using the receiver-module and the logic-sniffer. Press a button, and record the waveform. Note the timings etc. Zoom in to see the details. Try to see the timings + recognize specific repeating wave-forms. If you don&#8217;t have a logic-sniffer, you can also write a program to capture the timings of the signal using a simple MSP430-program. Then you have a DSO priced at $4.30 <img src='http://lars.roland.bz/wordpress/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  . Here is a picture of the Receiver-module.</p>
<p><img class="alignnone" title="rx" src="http://lars.roland.bz/test/434rfmodulerx.jpg" alt="" width="320" height="152" /></p>
<p>Then use a transmitter module such as <a href="http://uk.farnell.com/quasar/qam-tx1/module-transmitter-am-433mhz/dp/1304024?Ntt=1304024">this one</a> to send the same signal. Here&#8217;s a picture:</p>
<p><img class="alignnone" title="TX" src="http://lars.roland.bz/test/434rfmodule.jpg" alt="" width="132" height="200" /></p>
<p>Use an MSP430 Launchpad or an Arduino as your microcontroller-board. Connect GND to ground, VCC to your Launchpad 3.5V and ANT to an 8 mm cable. Connect DATA to P1.0 and write a program to replicate the signal you captured using the DSO. I have one example that works with the above NEXA remote controlled socket in <a href="http://www.inventortown.com/editor.php?menu=shared&amp;project=877">Inventortown on this link</a>. You can take it from Inventortown and use it in your &#8216;local&#8217; compiler if you prefer. This code is just for MSP430 Launchpad.</p>
<p>You can probably use the same mechanism to replicate many garage door openers also. I&#8217;ve used this code and the mentioned devices from Farnell to remote control devices in my house. The good thing about doing this is that you don&#8217;t have to worry about playing with higher voltages. The external, certified power socket takes care of all the dangerous voltages, and you just control it remotely. Very safe and nice. Source code is also below the line here.</p>
<p><span id="more-655"></span></p>
<pre class="wp-code-highlight prettyprint">/*
	Author: Lars Kristian Roland
	License: GPL
	Website: http://lars.roland.bz/ and www.inventortown.com
	This is code to control a NEXA remote controlled power switch, using
	an 433 RF TX board connected at P1.0
*/

#include
#define interrupt(x) void __attribute__((interrupt (x)))

void on1();
void off1();
void on2();
void off2();
void on3();
void off3();

void delay(unsigned int us);
void long_delay();
void pulse(int pulses);
void betweenPulse();

volatile unsigned char pressed;

#define ONE pulse(1)
#define TWO pulse(2)
#define THREE pulse(3)

#define BUTTON BIT3

int main(void)
{
  WDTCTL = WDTPW + WDTHOLD; // disable watchdog

  P1REN |= BUTTON;               // Enable Pull up resistor
  P1OUT |= BUTTON;               // Enable pull up resistor
  P1IES  |= BUTTON;               // Int on falling edge
  P1IFG &amp;amp;= ~(BUTTON);           // Clr flags
  P1IE |= BUTTON;                // Activate interrupt enables

  P1DIR |= BIT0;
  P1OUT &amp;amp;= ~BIT0;

  pressed = 0;

  _BIS_SR(GIE);

  while (1)
  {
      	_BIS_SR(LPM0_bits + GIE);
	on1();on1();on1();on1();
	long_delay();
	on2();on2();on2();on2();
	long_delay();
	on3();on3();on3();on3();
	long_delay();
	off1();off1();off1();off1();
	long_delay();
	off2();off2();off2();off2();
	long_delay();
	off3();off3();off3();off3();
	//long_delay();
  }
}

void preamble()
{
      delay(4000);
      ONE;
      delay(600);
      TWO;
      TWO;
      TWO;
      TWO;
      TWO;
      ONE;
      TWO;
      THREE;
      ONE;
      TWO;
      TWO;
      TWO;
      TWO;
      TWO;
      TWO;
      THREE;
      TWO;
      TWO;
      ONE;
      TWO;
      TWO;
      THREE;
      ONE;
      TWO;
      TWO;
      THREE;
      TWO;
}

void on1()
{
      delay(4000);
      preamble();
      ONE;
      THREE;
      TWO;
      TWO;
      TWO;
      ONE;
}

void off1()
{
      delay(4000);
      preamble();
      TWO;
      TWO;
      TWO;
      TWO;
      TWO;
      ONE;
}

void on2()
{
      delay(4000);
      preamble();
      ONE;
      THREE;
      TWO;
      TWO;
      ONE;
      TWO;
}

void off2()
{
      delay(4000);
      preamble();
      TWO;
      TWO;
      TWO;
      TWO;
      ONE;
      TWO;
}

void on3()
{
      delay(4000);
      preamble();
      ONE;
      THREE;
      TWO;
      ONE;
      THREE;
      ONE;
}

void off3()
{
      delay(4000);
      preamble();
      TWO;
      TWO;
      TWO;
      ONE;
      THREE;
      ONE;
}

void pulse(int pulses)
{
    for (int i = 0; i &amp;lt; pulses; i++)
    {
	P1OUT |= BIT0;
	delay(120);
	P1OUT &amp;amp;= ~BIT0;
	delay(120);
    }
    delay(510);
}

void betweenPulse()
{
	P1OUT &amp;amp;= ~BIT0;
	delay(1050);
}

// Delay function. # of CPU cycles delayed is similar to &quot;cycles&quot;. Specifically,
// it's ((cycles-15) % 6) + 15.  Not exact, but gives a sense of the real-time
// delay.  Also, if MCLK ~1MHz, &quot;cycles&quot; is similar to # of useconds delayed.

void long_delay()
{
    for (int i = 0; i &amp;lt; 100;i++) {     	delay(1000);     } } void delay(unsigned int cycles) {   while(cycles&amp;gt;15)                          // 15 cycles consumed by overhead
    cycles = cycles - 6;                    // 6 cycles consumed each iteration
}

// The ISR assumes the interrupt came from a pressed button
interrupt(PORT1_VECTOR) PORT1_ISR()
{
  // If Switch was pressed
  if(P1IFG &amp;amp; BUTTON)
  {
  	//P1OUT |= BIT0;
  	LPM0_EXIT;
  	_NOP();
  	P1IFG &amp;amp;= ~BUTTON;
  }
}</pre>
]]></content:encoded>
			<wfw:commentRss>http://lars.roland.bz/remote-controlled-sockets-for-home-automation-etc/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>LCD MSP430 Launchpad Booster pack</title>
		<link>http://lars.roland.bz/lcd-msp430-launchpad-booster-pack/</link>
		<comments>http://lars.roland.bz/lcd-msp430-launchpad-booster-pack/#comments</comments>
		<pubDate>Thu, 29 Mar 2012 21:37:16 +0000</pubDate>
		<dc:creator>Lars</dc:creator>
				<category><![CDATA[Stuff]]></category>
		<category><![CDATA[LCD]]></category>
		<category><![CDATA[msp430]]></category>

		<guid isPermaLink="false">http://lars.roland.bz/?p=651</guid>
		<description><![CDATA[&#8216;ve changed display type to SPI, and I have now received the first batch of an order for 250 displays, that I really planned to make a boosterpack with. I&#8217;m planning to order a test-batch of booster pack PCBs that look like this: an the schematic: The display looks similar to the above pictures, but [...]]]></description>
			<content:encoded><![CDATA[<p>&#8216;ve changed display type to SPI, and I have now received the first batch of an order for 250 displays, that I really planned to make a boosterpack with. I&#8217;m planning to order a test-batch of booster pack PCBs that look like this:</p>
<p><img title="Zoom in (real dimensions: 588 x 566)" src="http://lars.roland.bz/test/lcd-boosterpack-brd-v1.PNG" alt="Image" width="499" height="480" /></p>
<p>an the schematic:</p>
<p><img title="Zoom in (real dimensions: 1058 x 521)" src="http://lars.roland.bz/test/lcd-boosterpack-sch-v1.PNG" alt="Image" width="640" height="315" /></p>
<p>The display looks similar to the above pictures, but is slightly smaller and I think maybe slightly better quality. It has backlight, and a 9-bit 3-line SPI interface. It&#8217;s quite small, so I&#8217;ve made another post about the possibility to make a wrist-watch kit from this display.</p>
]]></content:encoded>
			<wfw:commentRss>http://lars.roland.bz/lcd-msp430-launchpad-booster-pack/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>New version of MSP430 LCD watch?</title>
		<link>http://lars.roland.bz/new-version-of-msp430-lcd-watch/</link>
		<comments>http://lars.roland.bz/new-version-of-msp430-lcd-watch/#comments</comments>
		<pubDate>Thu, 29 Mar 2012 21:31:42 +0000</pubDate>
		<dc:creator>Lars</dc:creator>
				<category><![CDATA[Stuff]]></category>
		<category><![CDATA[LCD]]></category>
		<category><![CDATA[msp430]]></category>
		<category><![CDATA[watch]]></category>

		<guid isPermaLink="false">http://lars.roland.bz/?p=649</guid>
		<description><![CDATA[I&#8217;ve now got the first batch of the 250 SPI B/W small LCD displays that I ordered, but I&#8217;m not quite sure what to do with them. The obvious thought is a booster pack, but since this is quite a small display I&#8217;m thinking maybe I could make a watch kit with it. I might [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve now got the first batch of the 250 SPI B/W small LCD displays that I ordered, but I&#8217;m not quite sure what to do with them. The obvious thought is a booster pack, but since this is quite a small display I&#8217;m thinking maybe I could make a watch kit with it. I might also make some booster packs eventually.</p>
<p>The display data sheet is <a href="http://lars.roland.bz/test/PE9665WRF-002-I02Q.pdf">here</a>. It is SPI-based, but it uses a 9-bit SPI interface. The first bit is decides whether it&#8217;s a write to the display memory or a config-command. As far as I understand, the USCI-chips don&#8217;t support 9 bits, while the USI ones do. I&#8217;ve made a bitbanging driver for it so far, and it works ok. I guess with an HW-driver it&#8217;ll be updating faster. I&#8217;ll see if maybe it can be tweaked onto the USCI peripheral by sending 2 bytes.</p>
<p>The features are:</p>
<p>- small (34 x 30 mm physical size. Viewing area 28&#215;19)<br />
- 3-line SPI 9-bit (Driver Sitronix ST7579-G2)<br />
- low power<br />
- backlight<br />
- black and white LCD<br />
- approx 3 USD cost</p>
<p>I made a watch with the earlier LCD display (i2c-version) I was using. Here&#8217;s a picture. The SPI-display is slightly smaller, but the display quality is similar (slightly better on the SPI display). I will have 250 of these, so if anyone is interested in this display for projects, let me know. I&#8217;m planning on making some packs that are finished soldered and can be sold in the shop, but it&#8217;s relatively easy to solder these displays onto a board for your own projects also.</p>
<p><img src="https://lh3.googleusercontent.com/-YsDMO56NdWY/TgxhVoJgrgI/AAAAAAAABIE/X5IymNUiwR8/s400/2011-06-30%25252013.40.25.jpg" alt="Image" /></p>
<p>So I&#8217;m planning on making a watch-board for the new display. It&#8217;ll have the display soldered onto one side. The other side will have space for example for a MSP430G2452. The design will be open source. Any suggestions to peripherals and buttons? I could put an accelerometer there, for example to detect taps on the display. I guess I could also put a radio in it???</p>
<p>A very basic start is here (this one has places for a header in case one wants to use the display as a breakout instead). The board design is a bit strange since I&#8217;ve used it to make a single-side test board also. So the &#8216;breakout&#8217;-traces are on the top only.</p>
<p><img title="Zoom in (real dimensions: 494 x 501)" src="http://lars.roland.bz/test/watch-board-v1.png" alt="Image" width="480" height="487" /></p>
<p><img title="Zoom in (real dimensions: 1010 x 571)" src="http://lars.roland.bz/test/watch-boardsch-v1.PNG" alt="Image" width="640" height="362" /></p>
]]></content:encoded>
			<wfw:commentRss>http://lars.roland.bz/new-version-of-msp430-lcd-watch/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Bird house with camera</title>
		<link>http://lars.roland.bz/bird-house-with-camera/</link>
		<comments>http://lars.roland.bz/bird-house-with-camera/#comments</comments>
		<pubDate>Fri, 23 Mar 2012 18:10:02 +0000</pubDate>
		<dc:creator>Lars</dc:creator>
				<category><![CDATA[Stuff]]></category>
		<category><![CDATA[Bird house webcam]]></category>

		<guid isPermaLink="false">http://lars.roland.bz/?p=642</guid>
		<description><![CDATA[The kids and I have made a bird house with a camera in it. It&#8217;ll be fun to see whether we get birds there. We&#8217;re using the DLINK  DCS-932L WIFI-Camera. It has built in Infrared LEDs that light up the dark &#8216;room&#8217;. They are visible as slightly red lights, so I hope the birds won&#8217;t be [...]]]></description>
			<content:encoded><![CDATA[<p>The kids and I have made a bird house with a camera in it. It&#8217;ll be fun to see whether we get birds there. We&#8217;re using the DLINK  DCS-932L WIFI-Camera. It has built in Infrared LEDs that light up the dark &#8216;room&#8217;. They are visible as slightly red lights, so I hope the birds won&#8217;t be afraid. If you want to see the latest motion-detected picture, you can see it <a href="http://lars.roland.bz/birdy/latest.jpg">here</a>. It doesn&#8217;t always capture the birds though.</p>
<p><img class="alignnone" title="Bird house" src="http://lars.roland.bz/birdy/birdhouse2012040207463901.jpg" alt="" width="640" height="480" /></p>
]]></content:encoded>
			<wfw:commentRss>http://lars.roland.bz/bird-house-with-camera/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

