<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-4454770415619038436</id><updated>2011-12-12T09:30:11.006-08:00</updated><category term='mobile'/><category term='i9'/><category term='laser'/><category term='GSM'/><category term='TTL'/><category term='solar water heating CPVC plexiglas assembly'/><category term='Xbee'/><category term='China'/><category term='Twilio'/><category term='AFSoftSerial'/><category term='CPVC'/><category term='Nissan'/><category term='RS232'/><category term='MIG'/><category term='ATMega328'/><category term='temperature'/><category term='projects'/><category term='SerialLCD'/><category term='SQLite'/><category term='eye'/><category term='arc welding'/><category term='surgery'/><category term='barbecue'/><category term='RSS'/><category term='water'/><category term='e80'/><category term='adafruit'/><category term='Arduino'/><category term='Ethernet Shield'/><category term='DTMF'/><category term='Avrdude'/><category term='capacitor'/><category term='email'/><category term='Motor Shield'/><category term='unlocked GSM'/><category term='DFRobot'/><category term='SIM'/><category term='review'/><category term='PRK'/><category term='unlocked'/><category term='Gianttech'/><category term='hardware'/><category term='rfid'/><category term='telephone'/><category term='weather'/><category term='serial'/><category term='facebook'/><category term='Leaf'/><category term='table'/><category term='SMS'/><category term='solar water heating'/><category term='iDuino'/><category term='vision'/><category term='POP3'/><category term='LCD Shield'/><category term='php'/><category term='Ethernet'/><category term='Sparkfun'/><category term='Electric'/><category term='StampDuino'/><category term='solar heating submersible pump'/><category term='Asterisk'/><category term='plasma cutter'/><category term='solar heater'/><category term='roasting'/><category term='SMAW'/><category term='wire wrap'/><category term='servo'/><category term='Lady Ada'/><category term='networking'/><category term='MKT6205'/><category term='USB'/><category term='solenoid'/><category term='Gumstix'/><category term='Lixin e80'/><category term='Zigbee'/><category term='Vehicle'/><category term='Linux'/><category term='OneWire'/><category term='moisture'/><category term='Lixin'/><category term='GMAW'/><category term='coffee'/><category term='TextFinder'/><title type='text'>My Open Source Projects</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://opensource-torchris.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4454770415619038436/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://opensource-torchris.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Torchris</name><uri>http://www.blogger.com/profile/05149708403435853046</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='26' src='http://1.bp.blogspot.com/_Q6HcmhbUwp8/SYHApptPSoI/AAAAAAAAABQ/Ggl9qnbr7gE/S220/altered-clown.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>45</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-4454770415619038436.post-1919742110087552599</id><published>2011-10-01T19:23:00.000-07:00</published><updated>2011-10-01T19:23:22.078-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Leaf'/><category scheme='http://www.blogger.com/atom/ns#' term='Electric'/><category scheme='http://www.blogger.com/atom/ns#' term='Vehicle'/><category scheme='http://www.blogger.com/atom/ns#' term='Nissan'/><title type='text'>Test Driving the Nissan Leaf</title><content type='html'>Well, I suppose once a year or so I should update this blog! Sorry for the long absence.&lt;br /&gt;&lt;br /&gt;Anyway, I had a chance today to drive the new, all-electric Nissan Leaf as part of their promotional tour of Canada with the new car.&amp;nbsp; I'm not much of a car review or automotive expert, but I figured it is still worth recording my impressions since this is such a unique new vehicle. These are just my overall impressions of a quick tour &amp;amp; test drive. You can find loads of more detailed reviews by searching online.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Exterior &lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Definitely a nice look to the vehicle. It doesn't scream oddball, or high-tech. If anything, it looks like a slightly bigger version of the Versa. &lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-rgqdWJhDinA/Toe0MwxdFjI/AAAAAAAAAPg/T3AcJ3tTfSM/s1600/IMG_2546.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="480" src="http://1.bp.blogspot.com/-rgqdWJhDinA/Toe0MwxdFjI/AAAAAAAAAPg/T3AcJ3tTfSM/s640/IMG_2546.JPG" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&amp;nbsp;The main exterior difference? No tailpipe at all!!&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-I3UahKsoTfo/Toe3zn9p6fI/AAAAAAAAAP4/DSxStvQ1zRE/s1600/IMG_2560.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="480" src="http://1.bp.blogspot.com/-I3UahKsoTfo/Toe3zn9p6fI/AAAAAAAAAP4/DSxStvQ1zRE/s640/IMG_2560.JPG" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;The engine compartment is actually kind of funny since they have mocked it up to look as if it is an internal combustion engine. The guy at Nissan said that under the aluminium cover that looks like a valve cover is just a printed circuit board! On the front of this photo you can see the connector for the charging station. The battery you see there is obviously not the battery that drives the engine! That is just for the accessories like the a/c, lights &amp;amp; heating. You can get an optional solar panel on the spoiler that charges this battery - but not the main big batteries, which are in the back.&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/--w0CEqXXrI8/Toez7z97OKI/AAAAAAAAAPY/UB3vwXfF_LI/s1600/IMG_2549.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="480" src="http://1.bp.blogspot.com/--w0CEqXXrI8/Toez7z97OKI/AAAAAAAAAPY/UB3vwXfF_LI/s640/IMG_2549.JPG" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;b&gt;Interior&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Inside the car has a very "deluxe" feel. Nice leather on the steering wheel, pleasant textures everywhere an nice quality plastic on the controls. I wonder how long it would take me to get all that nice pale colored surfaces all grungy! Over time, I think a darker interior might show the wear a bit less, but on a new car it just looks spiffy!&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-zsVTfIXSwh0/Toezzd0n_II/AAAAAAAAAPU/3pnBaHcMoVA/s1600/IMG_2550.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="480" src="http://3.bp.blogspot.com/-zsVTfIXSwh0/Toezzd0n_II/AAAAAAAAAPU/3pnBaHcMoVA/s640/IMG_2550.JPG" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;This also gives you a sense of the control layout, which is very sensible and easy to use. My only quibble is the little shift controller knob which you can see in the lower right of the picture above. You flick it to the left and down to go into "drive" do that twice and you are in "eco mode" and flick it left and up to go into reverse. Cute, but why would it have been hard to just put a good old shift lever labelled "D", "D-E" and "R"? It isn't hard to get used to, but it is one of the few things that doesn't seem ergonomic.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Interface&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;I did get a very short test drive, so I didn't get too much time to play with the displays &amp;amp; interface. The main display shows your speed &amp;amp; power level in a sensible way:&lt;br /&gt;&lt;b&gt; &lt;/b&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-DqnzyKe6qzc/Toe05E-jt6I/AAAAAAAAAPo/kzLWRrxhnhU/s1600/IMG_2553.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="300" src="http://1.bp.blogspot.com/-DqnzyKe6qzc/Toe05E-jt6I/AAAAAAAAAPo/kzLWRrxhnhU/s400/IMG_2553.JPG" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&amp;nbsp;The main touchscreen panel&lt;b&gt; &lt;/b&gt;provides well organized controls - with an obvious focus on power consumption and range.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-PZK0fobUppA/Toe9tjv_ukI/AAAAAAAAAQA/YwawnWfrk9I/s1600/IMG_2555.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="480" src="http://2.bp.blogspot.com/-PZK0fobUppA/Toe9tjv_ukI/AAAAAAAAAQA/YwawnWfrk9I/s640/IMG_2555.JPG" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;br /&gt;Again, I didn't get a chance to play a lot with this system, but my only concern was it seemed rather busy and I wonder about "driver workload" or distraction with so many options.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;The Drive&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;What was it like to actually drive? I did get a quick drive of about 10 minutes or so which took me on some city streets and a quick jaunt on the highway and I have to say it is very impressive indeed. You start it with the power button you can see on the lower left of the above photo (maybe "boot it up" is more appropriate) and then pop it into drive with the selector and the funny thing is &lt;b&gt;&lt;/b&gt;it just sits there dead silent! It took me a minute to realize that, of course, it's not like the engine would idle or anything - the motor does &lt;u&gt;nothing&lt;/u&gt; until you press on the accelerator!&lt;br /&gt;&lt;br /&gt;Once you do hit the accelerator, the driving experience is really very normal and pleasant. It is certainly the absolute quietest vehicle I have ever driven and the weight of the batteries really gives it a solid feel. I was reminded of the old saying about the Rolls Royce that all you could hear was the noise of the clock ticking on the dashboard! The pickup was very brisk since the electric motor delivers huge torque immediately, but all you hear is just a little whine as it runs up. What impressed me the most was just how comfortable and natural it felt to drive - there was really no feeling of having to transition or re-learn how to drive. I did try the "Eco" mode and that felt like it just put a wet blanket over all the power and acceleration, but then, that is what it is supposed to do - preserve your battery over performance.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Will I buy one?&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Well, sadly, probably not soon. For once thing, there likely won't be real volumes of the vehicles available in Canada until later next year, but at the end of the day the range thing just doesn't quite work for me - although it is pretty close.&lt;br /&gt;&lt;br /&gt;It is rated at 160 kms on a charge and the Nissan people told me that some testing showed under the best conditions it could do almost 190 km, but I really wonder what the real-world range will be in the extremes of the Canadian winter or our hot summers. I live in a smaller city and I often drive to surrounding communities that are 50 or 60 km away, which would start to push the range. That being said, I work from home so the total amount that I drive in a month is pretty limited, so why spend the extra to get an EV which won't be driven when I could get a very efficient gasoline vehicle for less? However, if I was commuting, say 25 kms or less a day, the range would really be quite acceptable and the extra cost justified when gas starts to creep up to $1.50 a liter. As well, the Nissan folks make a very good point that the car is really very simple mechanically and will need little by way of regular servicing compared to an internal combustion engine.&lt;br /&gt;&lt;br /&gt;Ultimately, I don't see this as my next car (I plan to buy in the next six months or so), but if the &lt;u&gt;next&lt;/u&gt; model gets up to, say, 220 km, I would definitely think hard about it. Driving away in my manual transmission Honda (which I like a lot) felt rather like climbing into a Model T.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4454770415619038436-1919742110087552599?l=opensource-torchris.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://opensource-torchris.blogspot.com/feeds/1919742110087552599/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://opensource-torchris.blogspot.com/2011/10/test-driving-nissan-leaf.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4454770415619038436/posts/default/1919742110087552599'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4454770415619038436/posts/default/1919742110087552599'/><link rel='alternate' type='text/html' href='http://opensource-torchris.blogspot.com/2011/10/test-driving-nissan-leaf.html' title='Test Driving the Nissan Leaf'/><author><name>Torchris</name><uri>http://www.blogger.com/profile/05149708403435853046</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='26' src='http://1.bp.blogspot.com/_Q6HcmhbUwp8/SYHApptPSoI/AAAAAAAAABQ/Ggl9qnbr7gE/S220/altered-clown.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/-rgqdWJhDinA/Toe0MwxdFjI/AAAAAAAAAPg/T3AcJ3tTfSM/s72-c/IMG_2546.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4454770415619038436.post-7566853189776089596</id><published>2010-08-11T11:27:00.000-07:00</published><updated>2010-08-11T11:27:22.745-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='laser'/><category scheme='http://www.blogger.com/atom/ns#' term='PRK'/><category scheme='http://www.blogger.com/atom/ns#' term='surgery'/><category scheme='http://www.blogger.com/atom/ns#' term='eye'/><title type='text'>PRK - 11 weeks post surgery</title><content type='html'>Well, this is probably my last post on this topic.&lt;br /&gt;&lt;br /&gt;I went to my eye doctor today and he is very pleased with the progress. My left eye is basically perfect, but my right eye has a very slight -0.025 diopter nearsightedness, but this is starting from over -8 in both eyes. He said the right eye is still healing and this is just the tail end of the process. I am now down to only doing the FML steroid drops once a day.&lt;br /&gt;&lt;br /&gt;My observation is that my vision - especially at a distance - is spectacular! Not having minor optical distortions or smudges or scratches from glasses is great and having back all of my peripheral vision is also fantastic. One of the best items of recent progress was that I found I didn't need reading glasses to work on the computer and I could get all my screens back to their regular fonts sizes!!&lt;br /&gt;&lt;br /&gt;There are still some downside. I do have haloing at night which is irritating while driving but should clear up over the next few months. I do have to wear reading glasses now for reading in bed or playing games on my iPhone. Having to remember my reading glasses so I can read menus at restaurants and so on is irritating. Hopefully this will get slightly better, but I expect this is something I may be stuck with at my age. I do need to keep using artificial tears regularly, but my eyes don't seem to feel dry or uncomfortable except at the end of a long day.&lt;br /&gt;&lt;br /&gt;When I was researching the procudure I found several useful diary blogs like this through Google. So, for those who might come upon this blog from the interwebs looking for info on PRK surgery, here are links to all the entries in sequential order:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://opensource-torchris.blogspot.com/2010/05/prk-laser-srugery-prologue.html"&gt;PRK Laser Sugery - Prologue&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://opensource-torchris.blogspot.com/2010/05/prk-surgery-day.html"&gt;Surgery Day &lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://opensource-torchris.blogspot.com/2010/05/prk-surgery-day-1-after.html"&gt;Post-surgery - Day 1 after&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://opensource-torchris.blogspot.com/2010/05/prk-post-surgery-day-2.html"&gt;Post surgery Day 2&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://opensource-torchris.blogspot.com/2010/05/prk-post-surgery-day-3.html"&gt;Post surgery Day 3&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://opensource-torchris.blogspot.com/2010/06/prk-post-surgery-day-4.html"&gt;Post surgery Day 4&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://opensource-torchris.blogspot.com/2010/06/prk-post-surgery-day-5.html"&gt;Post surgery Day 5&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://opensource-torchris.blogspot.com/2010/06/prk-1-week-post-surgery.html"&gt;1 week post surgery&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://opensource-torchris.blogspot.com/2010/06/prk-2-weeks-post-surgery.html"&gt;2 weeks post surgery&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://opensource-torchris.blogspot.com/2010/07/prk-5-weeks-post-surgery.html"&gt;5 weeks post-surgery&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;It's been quite a journey!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4454770415619038436-7566853189776089596?l=opensource-torchris.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://opensource-torchris.blogspot.com/feeds/7566853189776089596/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://opensource-torchris.blogspot.com/2010/08/prk-11-weeks-post-surgery.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4454770415619038436/posts/default/7566853189776089596'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4454770415619038436/posts/default/7566853189776089596'/><link rel='alternate' type='text/html' href='http://opensource-torchris.blogspot.com/2010/08/prk-11-weeks-post-surgery.html' title='PRK - 11 weeks post surgery'/><author><name>Torchris</name><uri>http://www.blogger.com/profile/05149708403435853046</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='26' src='http://1.bp.blogspot.com/_Q6HcmhbUwp8/SYHApptPSoI/AAAAAAAAABQ/Ggl9qnbr7gE/S220/altered-clown.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4454770415619038436.post-6440737455661576422</id><published>2010-08-05T09:02:00.000-07:00</published><updated>2010-08-05T19:05:18.539-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='telephone'/><category scheme='http://www.blogger.com/atom/ns#' term='SMS'/><category scheme='http://www.blogger.com/atom/ns#' term='Twilio'/><category scheme='http://www.blogger.com/atom/ns#' term='Arduino'/><category scheme='http://www.blogger.com/atom/ns#' term='DTMF'/><title type='text'>Arduino-Twilio Dialer Application</title><content type='html'>Well, it has been a while since I posted an Honest-to-God Arduino project here! What with getting my eye surgery done and one thing and another, this has taken me quite a while. Besides, there were more than a few challenges in getting it all to work along the way!&lt;br /&gt;&lt;br /&gt;This project is a concept for an information kiosk or unit that could be placed in a public area where passers-by could request information. A user enters their mobile phone number into the keypad and they are then immediately called by the Twilio cloud-based telephony system (check out Twilio here) and presented with a simple phone menu that allows them to:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Talk to an operator&lt;/li&gt;&lt;li&gt;Leave a voice message&lt;/li&gt;&lt;li&gt;Receive an SMS message&lt;/li&gt;&lt;/ol&gt;&lt;span style="font-style: normal; vertical-align: baseline;"&gt;&lt;span style="color: black;"&gt;&lt;span style="font-size: small;"&gt;Here is the hardware in it’s not very pretty form:&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_Q6HcmhbUwp8/TFrWBuXnA3I/AAAAAAAAAFE/2j0KsIqyTeE/s1600/Photo+lighter+cropped2.JPG" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="640" src="http://2.bp.blogspot.com/_Q6HcmhbUwp8/TFrWBuXnA3I/AAAAAAAAAFE/2j0KsIqyTeE/s640/Photo+lighter+cropped2.JPG" width="460" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Here is the obligatory video showing how it works:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;object height="385" width="480"&gt;&lt;param name="movie" value="http://www.youtube.com/v/30x88IaxUaw&amp;amp;hl=en_US&amp;amp;fs=1"&gt;&lt;/param&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;/param&gt;&lt;param name="allowscriptaccess" value="always"&gt;&lt;/param&gt;&lt;embed src="http://www.youtube.com/v/30x88IaxUaw&amp;amp;hl=en_US&amp;amp;fs=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="480" height="385"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Hardware&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;The hardware consists of:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Arduino Duemilanove&lt;/li&gt;&lt;li&gt;Arduino Ethernetshield&lt;/li&gt;&lt;li&gt;Sparkfun serial enabled 20 x 4 LCD display (&lt;a href="http://www.sparkfun.com/commerce/product_info.php?products_id=9568"&gt;LCD-09568&lt;/a&gt;)&lt;/li&gt;&lt;li&gt;Sparkfun 12 button keypad (&lt;a href="http://www.sparkfun.com/commerce/product_info.php?products_id=8653"&gt;COM-08653&lt;/a&gt;)&lt;/li&gt;&lt;/ul&gt;Here is the circuit diagram:&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_Q6HcmhbUwp8/TFrVzAZMKPI/AAAAAAAAAE8/LW8txfLwef4/s1600/twilio_dialer_schem.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="640" src="http://1.bp.blogspot.com/_Q6HcmhbUwp8/TFrVzAZMKPI/AAAAAAAAAE8/LW8txfLwef4/s640/twilio_dialer_schem.png" width="516" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;The hookup of the keypad is based on &lt;a href="http://www.instructables.com/id/Using-the-sparkfun-12-Button-keypad-with-the-ardu/"&gt;this article&lt;/a&gt; by &lt;a href="http://www.instructables.com/member/amando96/"&gt;amando96 &lt;/a&gt;on Instructables. You will have to sign up for membership to see the whole article or you can just follow the above diagram. One odd thing I noticed was that the pull down resistors turned out to not be required. Originally I had them included and everything worked fine, then at a certain point in the development the keypresses started looping and I removed the resistors and everything worked fine!&lt;br /&gt;&lt;br /&gt;This just uses the standard “keypad.h” library found on the Arduino website, but slightly modified so the pins do not interfere with the Ethernetshield. There is also an Instructable post on multiplexing the button input to use fewer digital pins, but since I didn’t need any extra digital pins I figured this was simpler.&lt;br /&gt;&lt;br /&gt;The serial LCD is quite straightforward to hookup, but just note that I am using one of the A1 Analog pin as the Tx for the serial since I am not using any analog inputs anyway.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Software&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;As with the previous Twilio-Arduino project, this one requires:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;An account with &lt;a href="http://www.twilio.com/"&gt;Twilio&lt;/a&gt;&amp;nbsp;&lt;/li&gt;&lt;li&gt;A web-server with PHP&lt;/li&gt;&lt;li&gt;&amp;nbsp;An Ethernetshield&lt;/li&gt;&lt;/ul&gt;The Arduino communicates with one PHP script running on my web-server, this then triggers Twilio to set up a call and Twilio then goes to my web-server and checks for another PHP file on what options to present to the user. It is a reasonably complex mesh of files that need to be setup, but actually the Twilio XML programming was easily the simplest part of the setup.&lt;br /&gt;&lt;br /&gt;This diagram shows the overall flow:&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_Q6HcmhbUwp8/TFrWt0n6dZI/AAAAAAAAAFM/-Y0tyVWCcIg/s1600/Twilio_dialer.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="640" src="http://2.bp.blogspot.com/_Q6HcmhbUwp8/TFrWt0n6dZI/AAAAAAAAAFM/-Y0tyVWCcIg/s640/Twilio_dialer.jpg" width="606" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: normal; vertical-align: baseline;"&gt;&lt;span style="color: black;"&gt;&lt;span style="font-size: small;"&gt;The first part is the Arduino software:&lt;/span&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-style: normal; vertical-align: baseline;"&gt;&lt;span style="color: black;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: normal; vertical-align: baseline;"&gt;&lt;span style="color: black;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: normal; vertical-align: baseline;"&gt;&lt;span style="color: black;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;pre class="cpp" name="code"&gt;/*&lt;br /&gt;*&amp;nbsp; Twilio Arduino Information Service Dialer&lt;br /&gt;* When used in conjunction with "dialer_twilio.php PHP script and the Twilio cloud-based&lt;br /&gt;* telephony environment (www.twilio.com) this allows a user to enter a phone number into a keypad&lt;br /&gt;* on an Arduino and have a call placed to their cell phone with various options for information.&lt;br /&gt;*&lt;br /&gt;* Uncomment the //Serial lines for troubleshooting/debug info.&lt;br /&gt;*&lt;br /&gt;* This code is in the public domain. Please provide credit if it is used&lt;br /&gt;* in another project.&lt;br /&gt;* &lt;br /&gt;* written by Chris Armour, August 4th, 2010&lt;br /&gt;*&lt;br /&gt;* Full description psted at http://opensource-torchris.blogspot.com/&lt;br /&gt;*&lt;br /&gt;*/&lt;br /&gt;&lt;br /&gt;//=====================Libraries=============/&lt;br /&gt;#include &lt;ethernet.h&gt;&lt;br /&gt;#include &lt;keypad.h&gt;&lt;br /&gt;#include &lt;newsoftserial.h&gt; &lt;br /&gt;#include &lt;textfinder.h&gt;&lt;br /&gt;&lt;br /&gt;byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED }; //MAC address for Arduino&lt;br /&gt;byte ip[] = { 192,168,0,34 }; // IP address you wish to assign to Arduino&lt;br /&gt;byte server[] = { 192, 168, 0, 171 }; // IP address of your PHP server&lt;br /&gt;int ServerPort = 55455;&lt;br /&gt;const byte ROWS = 4; //four rows&lt;br /&gt;const byte COLS = 3; //three columns&lt;br /&gt;char keys[ROWS][COLS] = {&lt;br /&gt;&amp;nbsp; {'1','2','3'},&lt;br /&gt;&amp;nbsp; {'4','5','6'},&lt;br /&gt;&amp;nbsp; {'7','8','9'},&lt;br /&gt;&amp;nbsp; {'*','0','#'}&lt;br /&gt;};&lt;br /&gt;byte rowPins[ROWS] = {5, 4, 3, 2}; //connect to the row pinouts of the keypad&lt;br /&gt;byte colPins[COLS] = {8, 7, 6}; //connect to the column pinouts of the keypad&lt;br /&gt;boolean ConnectedState = false;&lt;br /&gt;char DialNum[12]={"xxxxxxxxxxx"};&lt;br /&gt;int a;&lt;br /&gt;NewSoftSerial mySerial =&amp;nbsp; NewSoftSerial(14,15); //osft serial running off of Analog Pin 1&lt;br /&gt;&lt;br /&gt;Keypad keypad = Keypad( makeKeymap(keys), rowPins, colPins, ROWS, COLS );&lt;br /&gt;Client client(server, ServerPort); &lt;br /&gt;TextFinder finder( client);&lt;br /&gt;&lt;br /&gt;void setup(){&lt;br /&gt;&amp;nbsp; Ethernet.begin(mac, ip);&lt;br /&gt;// Serial.begin(9600);&lt;br /&gt;&amp;nbsp; mySerial.begin(9600); &lt;br /&gt;&amp;nbsp; mySerial.print(254, BYTE);&lt;br /&gt;&amp;nbsp; delay(100);&lt;br /&gt;&amp;nbsp; mySerial.print(1, BYTE);&lt;br /&gt;&amp;nbsp; delay(100);&lt;br /&gt;&amp;nbsp; mySerial.print("Started - Press any key to conect to the server."); //Display initial message on LCD.&lt;br /&gt;}&lt;br /&gt;&amp;nbsp; &lt;br /&gt;void loop(){&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp; char key = keypad.getKey();&lt;br /&gt;&lt;br /&gt;&amp;nbsp; if (key != NO_KEY){&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (ConnectedState == false){&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (client.connect()){&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(finder.find("results:") == true){&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; char c = client.read();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Serial.print("Value of the connect code: ");&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Serial.println(c);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; mySerial.print(254, BYTE);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; delay(100);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; mySerial.print(1, BYTE);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; delay(100);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; mySerial.print("Connected. ");&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; delay(2000);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; WelcomeMsg();&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //If connection successful, then print Welcome Msg and flip the connected state variable.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ConnectedState = true;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Serial.println(DialNum);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; else {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ConnectedState == false;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ConnectFailMsg(); //If connection fails, then print an error.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; delay(2000);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (key == '*') {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; //When it picks up the "*" then it starts gathering the digits.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Serial.println("Got the *");&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; EnterNumMsg();&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; do {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; key = keypad.getKey();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (key != NO_KEY){&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; delay(150);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Serial.println(key);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; mySerial.print(key); //Prints the keypad input to the LCD for user feedback.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DialNum[a] = key; //Puts the key info entered into an array.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; a++;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; } while (key != '#');&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (key == '#'){&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //When the "#" is pressed, the info is sent over to the PHP script.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; delay(250);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; mySerial.print(DialNum);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; client.println(DialNum); //Dialnum array sent to PHP.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(finder.find("results:") == true){//PHP script evaluates number &amp;amp; sends back response.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; char c = client.read();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Serial.print("Value of the return code: ");&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Serial.println(c);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (c == 'Y'){//Y back from the script means it is a valid number &amp;amp; success displayed.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; NumAcceptedMsg();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (c == 'N'){//If it is not a valid number, then N returned &amp;amp; error displayed.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; NumNotAcceptedMsg();&lt;br /&gt;//&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; client.println(DialNum);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; delay(3000);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; WelcomeMsg();//Go back to Welcome message.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; delay(200);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(finder.find("results:") == true){&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; char c = client.read();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Serial.print("Value of the return code: ");&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Serial.println(c);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (c == 'O'){//If the call was successully placed display success then go back to Welcome.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; NumCalledMsg();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; delay(4000);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; WelcomeMsg();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (c == 'X'){//If the call couldn't be made then error message &amp;amp; return to welcome.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; NumNotCalledMsg();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; delay(3000);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; WelcomeMsg();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; } &lt;br /&gt;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp; // Serial.println(DialNum);&lt;br /&gt;&amp;nbsp; // Serial.println(a);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; a = 0;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp; }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;void WelcomeMsg(){&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; mySerial.print(254, BYTE);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; delay(100);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; mySerial.print(1, BYTE);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; delay(100);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; mySerial.print("Welcome to the&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Information service.Press the * key to&amp;nbsp; start.");&lt;br /&gt;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;void EnterNumMsg(){&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; mySerial.print(254, BYTE);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; delay(100);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; mySerial.print(1, BYTE);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; delay(100);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; mySerial.print("Enter your 10 digit phone number&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; followed by #:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ");&lt;br /&gt;}&amp;nbsp; &lt;br /&gt;&lt;br /&gt;void ConnectFailMsg(){&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; mySerial.print(254, BYTE);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; delay(100);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; mySerial.print(1, BYTE);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; delay(100);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; mySerial.print("Connection Failed.&amp;nbsp; Press any key to&amp;nbsp;&amp;nbsp;&amp;nbsp; reconnect.");&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;void NumAcceptedMsg(){&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Serial.println("Number accepted by server");&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; mySerial.print(254, BYTE);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; delay(100);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; mySerial.print(1, BYTE);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; delay(100);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; mySerial.print("Number Accepted. ");&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;void NumNotAcceptedMsg(){&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Serial.println("Number NOT accepted by server");&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; mySerial.print(254, BYTE);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; delay(100);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; mySerial.print(1, BYTE);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; delay(100);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; mySerial.print("Number not valid.");&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;void NumCalledMsg(){&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Serial.println("Number called successfully.");&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; mySerial.print(254, BYTE);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; delay(200);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; mySerial.print(1, BYTE);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; delay(200);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; mySerial.print("Number called&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; successfully.");&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;void NumNotCalledMsg(){&lt;br /&gt;// Serial.println("Number cannot be called.");&lt;br /&gt;&amp;nbsp; mySerial.print(254, BYTE);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; delay(100);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; mySerial.print(1, BYTE);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; delay(100);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; mySerial.print("Number cannot be&amp;nbsp;&amp;nbsp;&amp;nbsp; called.");&lt;br /&gt;}&lt;/textfinder.h&gt;&lt;/newsoftserial.h&gt;&lt;/keypad.h&gt;&lt;/ethernet.h&gt;&lt;/pre&gt;&lt;span style="font-style: normal; vertical-align: baseline;"&gt;&lt;span style="color: black;"&gt;&lt;span style="font-style: normal; vertical-align: baseline;"&gt;&lt;span style="color: black;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: normal; vertical-align: baseline;"&gt;&lt;span style="color: black;"&gt;&lt;span style="font-style: normal; vertical-align: baseline;"&gt;&lt;span style="color: black;"&gt;&lt;span style="font-style: normal; vertical-align: baseline;"&gt;&lt;span style="color: black;"&gt; This uses the Arduino Ethernet library to set up a client application, the Keypad library to get the keypresses, NewSoftSerial to send information to the LCD and finally the TextFinder library to parse the result codes from the server. I have put all the LCD messages into functions just to clean up the code since each message needs to have a screen clear send and some delay. I’m sure I could further clean that up to just have a function that did the screen clear, but this works.&lt;br /&gt;&lt;br /&gt;The Arduino client in term communicates with the PHP server program (dialer_twilio.php):&lt;br /&gt;&lt;br /&gt;&lt;pre class="cpp" name="code"&gt;&lt;?php&lt;br /&gt;&lt;br /&gt;$host_ard = "192.168.0.171";&lt;br /&gt;$port_ard = "55455";&lt;br /&gt;    require "twilio.php";&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;//=====================Create Socket to listen for Arduino======================//&lt;br /&gt;&lt;br /&gt;ob_implicit_flush();&lt;br /&gt;&lt;br /&gt;//Open socket to listen for Arduino&lt;br /&gt;$socket_ard = socket_create(AF_INET, SOCK_STREAM, 0) or die ("Could not bind to socket\n");&lt;br /&gt;$result_ard = socket_bind($socket_ard, $host_ard, $port_ard) or die("Could not bind to socket\n");&lt;br /&gt;&lt;br /&gt;// start listening for connections&lt;br /&gt;$result_ard = socket_listen($socket_ard, 3) or die("Could not set up socket listener\n");&lt;br /&gt;// accept incoming connections&lt;br /&gt;// spawn another socket to handle communication&lt;br /&gt;$spawn = socket_accept($socket_ard) or die("Could not accept incoming connection\n");&lt;br /&gt;// read client input&lt;br /&gt;socket_write($spawn,"results:C\n");&lt;br /&gt;echo "Device connected.\n";&lt;br /&gt;&lt;br /&gt;do{&lt;br /&gt; $input = socket_read($spawn, 1024, PHP_NORMAL_READ) or die("Could not read input\n");&lt;br /&gt; echo ("This is the value of input: " . $input . "\n");&lt;br /&gt; echo ("The length of the input is " . strlen($input) . "\n");&lt;br /&gt; if (strlen($input) == 12){&lt;br /&gt; $dial_num = substr($input, 0, 10);&lt;br /&gt; echo "Value of dial_num is " . $dial_num . "\n";&lt;br /&gt; if ((strpos($dial_num,"#") == false) &amp;&amp; (strpos($dial_num,"x") == false)) {&lt;br /&gt;  echo ("Valid Number\n");&lt;br /&gt;  usleep(10000);&lt;br /&gt;  socket_write($spawn, "results:Y\n");&lt;br /&gt;  echo "Sent over Y\n";&lt;br /&gt;&lt;br /&gt;      /* Twilio REST API version */&lt;br /&gt;    $ApiVersion = "2008-08-01";&lt;br /&gt;    &lt;br /&gt;    /* Set our AccountSid and AuthToken */&lt;br /&gt;    $AccountSid = "XXXXXXXXXXXXXXXXXXXXXXXXX";&lt;br /&gt;    $AuthToken = "XXXXXXXXXXXXXXXXXXXX";&lt;br /&gt;    &lt;br /&gt;    /* Instantiate a new Twilio Rest Client */&lt;br /&gt;    $client = new TwilioRestClient($AccountSid, $AuthToken);&lt;br /&gt;    &lt;br /&gt;    /* Initiate a new outbound call by POST'ing to the Calls resource */&lt;br /&gt;    $response = $client-&gt;request("/$ApiVersion/Accounts/$AccountSid/Calls", &lt;br /&gt;     "POST", array(&lt;br /&gt;     "Caller" =&gt; "XXXXXXXXXXXXXXX",&lt;br /&gt;     "Called" =&gt; $dial_num,&lt;br /&gt;     "Url" =&gt; "http://gumstix.dlinkddns.com/twi_test.php"&lt;br /&gt;    &lt;br /&gt;    ));&lt;br /&gt;    if($response-&gt;IsError){&lt;br /&gt;     echo "Error: {$response-&gt;ErrorMessage}\n";&lt;br /&gt;   socket_write($spawn, "results:X\n");&lt;br /&gt;   echo "Sent over X\n";&lt;br /&gt;  }  else {&lt;br /&gt;     echo "Started call: {$response-&gt;ResponseXml-&gt;Call-&gt;Sid}\n";  &lt;br /&gt;   socket_write($spawn, "results:O\n");&lt;br /&gt;   echo "Sent over O\n";&lt;br /&gt;   }&lt;br /&gt;} else {&lt;br /&gt;  echo ("Invalid number\n");&lt;br /&gt;  socket_write($spawn, "results:N\n");&lt;br /&gt;  echo "Sent over N\n";&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt;   usleep(5000);&lt;br /&gt;}&lt;br /&gt;}while(true);&lt;br /&gt;&lt;br /&gt;?&gt;&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Anything marked “XXXX” above is info on the account and phone numbers to be used.&lt;br /&gt;&lt;br /&gt;This script does a quick and dirty check if the number is valid (just making sure there are no stray “x” or “#” characters and it is the right length) then uses theTwilio REST API to&amp;nbsp; set up the call. Twilio will go to the “twi_test.php” script for info on how to handle the call.&lt;br /&gt;&lt;br /&gt;So, when Twilio goes to twi_test.php it sees:&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: normal; vertical-align: baseline;"&gt;&lt;span style="color: black;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;pre class="cpp" name="code"&gt;&lt;span style="font-style: normal; vertical-align: baseline;"&gt;&lt;span style="color: black;"&gt;&lt;span style="font-style: normal; vertical-align: baseline;"&gt;&lt;span style="color: black;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; header("content-type: text/xml");&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; echo "\n";&lt;br /&gt;?&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;response&gt;&lt;br /&gt;&lt;gather action="twi_action.php" method="POST" numdigits="1"&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;say voice="woman"&gt;Hello. Welcome to the Arduino Information Service.&lt;/say&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;say voice="woman"&gt;Press 1 to be connected to an operator.&lt;/say&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;say voice="woman"&gt;Press 2 to leave a voicemail.&lt;/say&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;say voice="woman"&gt;Press 3 to receive an SMS message.&lt;/say&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;say voice="woman"&gt;Press 4 to repeat this menu.&lt;/say&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;say voice="woman"&gt;Press 5 to hangup.&lt;/say&gt;&lt;/gather&gt;&lt;/response&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;span style="font-style: normal; vertical-align: baseline;"&gt;&lt;span style="color: black;"&gt;&lt;span style="font-style: normal; vertical-align: baseline;"&gt;&lt;span style="color: black;"&gt;&lt;br /&gt;&lt;span style="font-style: normal; vertical-align: baseline;"&gt;&lt;span style="color: black;"&gt;&lt;br /&gt;&lt;span style="font-style: normal; vertical-align: baseline;"&gt;&lt;span style="color: black;"&gt;&lt;span style="font-size: small;"&gt;This  sets up the top level menu of the simple IVR and then directs to go to  “twi_action.php” once a button is pushed. The XML such as  &lt;response&gt; and &lt;gather&gt; are the Twilio “verbs” that defines  actions on the Twilio cloud system.&lt;/gather&gt;&lt;/response&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-style: normal; vertical-align: baseline;"&gt;&lt;span style="color: black;"&gt;&lt;span style="font-size: small;"&gt;So here is “twi_action.php";&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: normal; vertical-align: baseline;"&gt;&lt;span style="color: black;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;pre class="cpp" name="code"&gt;&lt;span style="font-style: normal; vertical-align: baseline;"&gt;&lt;span style="color: black;"&gt;&lt;span style="font-style: normal; vertical-align: baseline;"&gt;&lt;span style="color: black;"&gt;&lt;span style="font-style: normal; vertical-align: baseline;"&gt;&lt;span style="color: black;"&gt;$stringData = $_REQUEST['Digits'];&lt;br /&gt;&lt;br /&gt;switch($stringData){&lt;br /&gt;case 5:&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; echo "&lt;response&gt;";&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; echo "&lt;say voice="woman"&gt; Thank you, Good bye.&lt;/say&gt;";&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; echo "&lt;hangup&gt;";&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; echo "&lt;/hangup&gt;&lt;/response&gt;";&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; break;&lt;br /&gt;case 4:&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; echo "&lt;response&gt;";&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; echo "&lt;redirect&gt;";&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; echo "http://gumstix.dlinkddns.com/twi_test.php";&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; echo "&lt;/redirect&gt;";&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; echo "&lt;/response&gt;";&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; break;&lt;br /&gt;&amp;nbsp;case 3:&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; echo "&lt;response&gt;";&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;echo "&lt;say voice="woman"&gt;You are being sent an SMS message.&lt;/say&gt;";&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;echo "&lt;sms from="XXXXXXXXX"&gt;You are receiving this message from the Twilio Arduino dialer application.&lt;/sms&gt;";&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; echo "&lt;/response&gt;";&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; break; &lt;br /&gt;case 2:&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; echo "&lt;response&gt;";&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; echo "&lt;say voice="woman"&gt;Leave your message after the tone and press # when you are done.&lt;/say&gt;";&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; echo "&lt;record action="voicerecorder.php" transcribe="true"&gt;";&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; echo "&lt;/record&gt;&lt;/response&gt;";&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; break;&lt;br /&gt;case 1:&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; echo "&lt;response&gt;";&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;echo "&lt;dial&gt;XXXXXXX&lt;/dial&gt;";&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;echo "&lt;say voice="woman"&gt;Goodbye&lt;/say&gt;";&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; echo "&lt;/response&gt;";&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; break;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;?&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;span style="font-style: normal; vertical-align: baseline;"&gt;&lt;span style="color: black;"&gt;&lt;span style="font-style: normal; vertical-align: baseline;"&gt;&lt;span style="color: black;"&gt;&lt;span style="font-style: normal; vertical-align: baseline;"&gt;&lt;span style="color: black;"&gt;&lt;br /&gt;&lt;span style="font-style: normal; vertical-align: baseline;"&gt;&lt;span style="color: black;"&gt;&lt;br /&gt;This parses the digit pressed from the POST command and then takes action on the digits, which is either:&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;&lt;span style="font-style: normal; vertical-align: baseline;"&gt;&lt;span style="color: black;"&gt;&lt;span style="font-style: normal; vertical-align: baseline;"&gt;&lt;span style="color: black;"&gt;&lt;span style="font-style: normal; vertical-align: baseline;"&gt;&lt;span style="color: black;"&gt;&lt;span style="font-style: normal; vertical-align: baseline;"&gt;&lt;span style="color: black;"&gt;Connect to an operator (in this case it dials through to my Skype account).&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;span style="font-style: normal; vertical-align: baseline;"&gt;&lt;span style="color: black;"&gt;&lt;span style="font-style: normal; vertical-align: baseline;"&gt;&lt;span style="color: black;"&gt;&lt;span style="font-style: normal; vertical-align: baseline;"&gt;&lt;span style="color: black;"&gt; &lt;span style="font-style: normal; vertical-align: baseline;"&gt;&lt;span style="color: black;"&gt;&lt;li&gt;Leave a voicemail. Currently this records a sound file which you can download from the Twilio website, but it could also have the sound file sent to an email address or transcribe the voice into text and have that sent along.&lt;/li&gt;&lt;li&gt;Receive and SMS message. This sends a canned message that could be some general information to the cell phone that made the call.&lt;/li&gt;&lt;li&gt;Repeat the menu.&lt;/li&gt;&lt;li&gt;Hangup.&lt;/li&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/ol&gt;&lt;span style="font-style: normal; vertical-align: baseline;"&gt;&lt;span style="color: black;"&gt;&lt;span style="font-style: normal; vertical-align: baseline;"&gt;&lt;span style="color: black;"&gt;&lt;span style="font-style: normal; vertical-align: baseline;"&gt;&lt;span style="color: black;"&gt;&lt;span style="font-style: normal; vertical-align: baseline;"&gt;&lt;span style="color: black;"&gt;The final small script is the one that handles the voicemail recording (voicerecorder.php):&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;pre class="cpp" name="code"&gt;&lt;span style="font-style: normal; vertical-align: baseline;"&gt;&lt;span style="color: black;"&gt;&lt;span style="font-style: normal; vertical-align: baseline;"&gt;&lt;span style="color: black;"&gt;&lt;span style="font-style: normal; vertical-align: baseline;"&gt;&lt;span style="color: black;"&gt;&lt;span style="font-style: normal; vertical-align: baseline;"&gt;&lt;span style="color: black;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; header("content-type: text/xml");&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; echo "\n";&lt;br /&gt;?&amp;gt;&lt;br /&gt;&lt;response&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;say voice="woman"&gt;Thanks for the message.&amp;nbsp; Here is what you recorded.&lt;/say&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;play&gt;&lt;/play&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;say voice="woman"&gt;Goodbye.&lt;/say&gt;&lt;/response&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;span style="font-style: normal; vertical-align: baseline;"&gt;&lt;span style="color: black;"&gt;&lt;span style="font-style: normal; vertical-align: baseline;"&gt;&lt;span style="color: black;"&gt;&lt;span style="font-style: normal; vertical-align: baseline;"&gt;&lt;span style="color: black;"&gt;&lt;br /&gt;&lt;span style="font-style: normal; vertical-align: baseline;"&gt;&lt;span style="color: black;"&gt;&lt;br /&gt;This one is very simple. It just plays back the message that was just recorded. That’s all there is to it! :-)&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Conclusion&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;This project could have some practical uses as a low cost way to place a simple information service in some public place. It does, however, have the obvious limitation that there is no validation that the number entered really does belong to the user’s cell phone and not to some little old lady in Detroit, so in it’s current form it could just be a nuisance generator. This could probably be fixed with an exchange of a PIN via SMS.&lt;br /&gt;&lt;br /&gt;What other things could this kind of project be used for? Here are some ideas:&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-style: normal; vertical-align: baseline;"&gt;&lt;span style="color: black;"&gt;&lt;span style="font-style: normal; vertical-align: baseline;"&gt;&lt;span style="color: black;"&gt;&lt;span style="font-style: normal; vertical-align: baseline;"&gt;&lt;span style="color: black;"&gt;&lt;span style="font-style: normal; vertical-align: baseline;"&gt;&lt;span style="color: black;"&gt;Make a super secure lock by combining this project with an RFID reader lock so that once the card is swiped the user also has to enter a PIN and a code received via SMS at a cell phone that has been pre-registered with the system. This way an intruder would have to steal not only the users RFID badge, but also their phone and their PIN number.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;span style="font-style: normal; vertical-align: baseline;"&gt;&lt;span style="color: black;"&gt;&lt;span style="font-style: normal; vertical-align: baseline;"&gt;&lt;span style="color: black;"&gt;&lt;span style="font-style: normal; vertical-align: baseline;"&gt;&lt;span style="color: black;"&gt; &lt;span style="font-style: normal; vertical-align: baseline;"&gt;&lt;span style="color: black;"&gt;&lt;li&gt;This could also be adapted to trigger phone calls or SMS messages for various conditions driven by digital or analog inputs - such as temperature readings or intruder alarms. Conversely, as discussed in my Twilio LED project, a call could be used to control switches, motors or valves remotely using a telephone.&lt;/li&gt;&lt;li&gt;If it used Power Over Ethernet it would eliminate the extra power supply requirement. Even better would be using wi-fi or GSM cellular data to eliminate the need to have it wired to a router.&lt;/li&gt;&lt;li&gt;Clever use of the PROGMEM would probably allow all the response strings to be stored on the Arduino so it might be possible to dispense with using an outside webserver altogether!&lt;/li&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/ul&gt;&lt;span style="font-style: normal; vertical-align: baseline;"&gt;&lt;span style="color: black;"&gt;&lt;span style="font-style: normal; vertical-align: baseline;"&gt;&lt;span style="color: black;"&gt;&lt;span style="font-style: normal; vertical-align: baseline;"&gt;&lt;span style="color: black;"&gt;&lt;span style="font-style: normal; vertical-align: baseline;"&gt;&lt;span style="color: black;"&gt;This was a pretty challenging project and I hope it provides inspiration for some further cool projects!&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4454770415619038436-6440737455661576422?l=opensource-torchris.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://opensource-torchris.blogspot.com/feeds/6440737455661576422/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://opensource-torchris.blogspot.com/2010/08/arduino-twilio-dialer-application.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4454770415619038436/posts/default/6440737455661576422'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4454770415619038436/posts/default/6440737455661576422'/><link rel='alternate' type='text/html' href='http://opensource-torchris.blogspot.com/2010/08/arduino-twilio-dialer-application.html' title='Arduino-Twilio Dialer Application'/><author><name>Torchris</name><uri>http://www.blogger.com/profile/05149708403435853046</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='26' src='http://1.bp.blogspot.com/_Q6HcmhbUwp8/SYHApptPSoI/AAAAAAAAABQ/Ggl9qnbr7gE/S220/altered-clown.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_Q6HcmhbUwp8/TFrWBuXnA3I/AAAAAAAAAFE/2j0KsIqyTeE/s72-c/Photo+lighter+cropped2.JPG' height='72' width='72'/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4454770415619038436.post-4952567268764280770</id><published>2010-07-09T20:18:00.000-07:00</published><updated>2010-07-09T20:18:31.867-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='laser'/><category scheme='http://www.blogger.com/atom/ns#' term='PRK'/><category scheme='http://www.blogger.com/atom/ns#' term='eye'/><title type='text'>PRK - 5 weeks post-surgery</title><content type='html'>Wow, two blog posts in two days! Yes, there is an Arduino project in the works, but it's moving slowly!&lt;br /&gt;&lt;br /&gt;Anyway, today was my five week checkup so it seems like a good time to give an update on my eyes. Things are continuing to go well. My doctor says I am starting to be able to read the 20-20 lines of the charts and everything is healing very nicely,&lt;br /&gt;&lt;br /&gt;From my unscientific perspective, things have been going well especially this week. Lat week I was getting bad headaches almost everyday from eye strain, but this week things have gotten really much clearer and I haven't had a headache in days. I do now wear some store bought reading glasses when working on the computer or reading, but I can do pretty well without them. Maybe the heat wave helped somehow? Basically, the improvements are now on a week-by-week basis rather than daily, but improvements are still happening.&lt;br /&gt;&lt;br /&gt;The best thing was being able to swim in our pool without having to worry about "where did I leave my glasses" and being able to dive and see underwater with a mask! Wow! It really does make me realize how profoundly blind I was without my glasses before.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4454770415619038436-4952567268764280770?l=opensource-torchris.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://opensource-torchris.blogspot.com/feeds/4952567268764280770/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://opensource-torchris.blogspot.com/2010/07/prk-5-weeks-post-surgery.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4454770415619038436/posts/default/4952567268764280770'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4454770415619038436/posts/default/4952567268764280770'/><link rel='alternate' type='text/html' href='http://opensource-torchris.blogspot.com/2010/07/prk-5-weeks-post-surgery.html' title='PRK - 5 weeks post-surgery'/><author><name>Torchris</name><uri>http://www.blogger.com/profile/05149708403435853046</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='26' src='http://1.bp.blogspot.com/_Q6HcmhbUwp8/SYHApptPSoI/AAAAAAAAABQ/Ggl9qnbr7gE/S220/altered-clown.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4454770415619038436.post-3556775908755526652</id><published>2010-07-08T16:42:00.000-07:00</published><updated>2010-07-08T19:38:56.519-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='coffee'/><category scheme='http://www.blogger.com/atom/ns#' term='roasting'/><category scheme='http://www.blogger.com/atom/ns#' term='barbecue'/><title type='text'>Home Coffee Roasting</title><content type='html'>Since this blog is basically about any interesting project or skill I can pass along, I figured people might also be interested in learning about how to roast their own coffee in the comfort of their back deck!&lt;br /&gt;&lt;br /&gt;Over the years we have gotten used to coffee roasting and production being a huge industrial process or else done by specialist boutique-y roasters with special machines and a fancy appreciation for roasts and blending. While it is true that roasting in bulk or hitting very exact roast points does require some specialist skill and machinery, the reality is that coffee roasting really isn't too hard - probably not much more difficult than making pop corn - and the results of really fresh, fresh roasted coffee make up for any imperfection in the home roaster's skills.&lt;br /&gt;&lt;br /&gt;A great book on the subject is "Home Coffee Roasting: Romance and Revival" by Kenneth Davids which is available from Amazon in Canada &lt;a href="http://www.amazon.ca/Home-Coffee-Roasting-Romance-Revival/dp/0312312199/ref=sr_1_2?ie=UTF8&amp;amp;s=books&amp;amp;qid=1278616986&amp;amp;sr=8-2"&gt;here&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Here is a quick video of me roasting a batch of coffee on my barbecue using a big iron frying pan. As usual, I am sorry for the muddy audio!&lt;br /&gt;&lt;br /&gt;&lt;object height="525" width="660"&gt;&lt;param name="movie" value="http://www.youtube.com/v/cfZIQ7gAQYM&amp;amp;hl=en_US&amp;amp;fs=1?border=1"&gt;&lt;/param&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;/param&gt;&lt;param name="allowscriptaccess" value="always"&gt;&lt;/param&gt;&lt;embed src="http://www.youtube.com/v/cfZIQ7gAQYM&amp;amp;hl=en_US&amp;amp;fs=1?border=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="660" height="525"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br /&gt;&lt;br /&gt;With the lid opening and closing cycles, the total process is about 10 or 12 minutes. &lt;br /&gt;&lt;br /&gt;&lt;u&gt;Note:&lt;/u&gt; It is important to do this &lt;u&gt;outdoors&lt;/u&gt;! The process will generate lots of pungent blue smoke that will fill up your house in no time. Also, it works best with the really high heat from a good gas barbecue.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Tools and materials:&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Here is what you will need at least the way I do it (there are lots of variations):&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&amp;nbsp;Green coffee beans - these can be bought from Whole Foods in small batches to play with. For more variety and if you are in Canada I would recommend the&lt;a href="http://www.greenbeanery.ca/bean/home.php"&gt; Green Beanery&lt;/a&gt; . They have a very cool store in downtown Toronto and also great online ordering. Some Googling would find other suppliers too. Green beans will store in a cool place for over five years!&lt;/li&gt;&lt;li&gt;A big cast iron frying pan. I believe I got mine from Canadian Tire (&lt;a href="http://www.canadiantire.ca/AST/browse/5/SportsRec/Camping/CookingAccessories/PRD%7E0763416P/Cast%252BIron%252BSkillet%25252C%252B14-in.jsp?locale=en"&gt;here)&lt;/a&gt;. Often they are sold in the camping section. &lt;u&gt;Do not&lt;/u&gt; use a non-stick pan! The high temperatures would ruin the Teflon coating. &lt;/li&gt;&lt;li&gt;A metal colander to hold the beans after they are roasted. It &lt;u&gt;must&lt;/u&gt; be metal! The beans will be over 500 degrees Fahrenheit when they are done.&lt;/li&gt;&lt;li&gt;A long handled metal spatula for stirring the beans.&lt;/li&gt;&lt;li&gt;Bowls and containers for the beans&lt;/li&gt;&lt;li&gt;Very stout pot holders - I use silicon oven mitts.&lt;/li&gt;&lt;li&gt;If you want to be fussy, a scale to weigh the beans out.&lt;/li&gt;&lt;li&gt;A coffee grinder to process your roasted beans.&lt;/li&gt;&lt;li&gt;That's about it!!&lt;/li&gt;&lt;/ul&gt;&lt;b&gt;Process:&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;It's really pretty simple! &lt;br /&gt;&lt;ol&gt;&lt;li&gt;Put the pan on the barbecue and get it as hot as you can! Just leave it dry with no oil or anything in it. Close the lid and let it get up to at least 500 degrees F. &lt;/li&gt;&lt;li&gt;Measure out enough beans to cover the bottom of your pan&lt;b&gt;.&lt;/b&gt; For me that's about 1/2 lb (250 gm).&lt;/li&gt;&lt;li&gt;Put the beans in the skillet and make sure they are in an even layer and not bunched up. The idea is to try to roast the beans as evenly as possible.&lt;/li&gt;&lt;li&gt;Close the lid and let the heat build up for a little while - maybe one minute.&lt;/li&gt;&lt;li&gt;Open up the lid and stir the beans around - especially try to flip them over so the tops and bottoms get heated.&lt;/li&gt;&lt;li&gt;Close the lid!&lt;/li&gt;&lt;li&gt;Open it up again and stir.&lt;/li&gt;&lt;li&gt;This cycle will continue for a while until you start to hear a bit of a crackling sound and see the beans start to smoke. This is called "First Crack".&lt;/li&gt;&lt;li&gt;Keep opening and closing and you will see the beans pass from greenish, to yellow to light brown and then start to get darker and darker and bigger and bigger. Interestingly, the smoke doesn't really smell a thing like the "fresh roast coffee" smell we are all used to from cafes and so on - it is more pungent - like burning a piece of toast with motor oil.&lt;/li&gt;&lt;li&gt;When the beans start to darken is when you need to use a bit of judgement - do you like lighter roasts or darker espresso or French roasts? Generally, when you hear an increase in crackling and see more smoke you are at "Second Crack". A this point you can leave them in a few seconds later before dumping them out if you want them to be a darker roast. Remember! The beans have so much internal heat built up, that they will roast a bit even after they are dumped out! You need to stop a bit &lt;u&gt;before&lt;/u&gt; the final darkness of roast you want to achieve. This is really the hardest "art" of the whole roast. &lt;/li&gt;&lt;li&gt;When they are ready, dump the beans out into the metal colander and stir them up to move air through them and cool them as quickly as possible. You can also give a quick spritz of water - but not too much!&lt;/li&gt;&lt;li&gt;Once the beans have cooled down you can grind them and their peak flavor is actually about 24 hours after they are roasted and they will keep super fresh for up to two weeks. It is important to not store freshly roasted beans in a tightly sealed container - especially a glass one - since they will continue to out gas for a couple of days after roasting.&lt;/li&gt;&lt;/ol&gt;That's about it!&amp;nbsp;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4454770415619038436-3556775908755526652?l=opensource-torchris.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://opensource-torchris.blogspot.com/feeds/3556775908755526652/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://opensource-torchris.blogspot.com/2010/07/home-coffee-roasting.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4454770415619038436/posts/default/3556775908755526652'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4454770415619038436/posts/default/3556775908755526652'/><link rel='alternate' type='text/html' href='http://opensource-torchris.blogspot.com/2010/07/home-coffee-roasting.html' title='Home Coffee Roasting'/><author><name>Torchris</name><uri>http://www.blogger.com/profile/05149708403435853046</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='26' src='http://1.bp.blogspot.com/_Q6HcmhbUwp8/SYHApptPSoI/AAAAAAAAABQ/Ggl9qnbr7gE/S220/altered-clown.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4454770415619038436.post-1595478880550658518</id><published>2010-06-11T19:17:00.000-07:00</published><updated>2010-06-11T19:17:56.115-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='laser'/><category scheme='http://www.blogger.com/atom/ns#' term='PRK'/><category scheme='http://www.blogger.com/atom/ns#' term='surgery'/><category scheme='http://www.blogger.com/atom/ns#' term='eye'/><title type='text'>PRK - 2 weeks post surgery</title><content type='html'>Well, today is two weeks and I just had a followup with my doctor, so it seems like a good time for a progress report...&lt;br /&gt;&lt;br /&gt;In general, things are proceeding and each day is still slightly better, but then some days are better than others and the improvements are smaller. I do still get blurry vision, dry eyes this gives me a headache sometimes (like right now) - especially since my job requires a lot of computer screen time. At the end of the day it feel like I have had my contacts in for too long and it's time to take them out, but then I remember that isn't an option! On the other hand, I can drive again and when my vision is completely clear it is spectacular.&lt;br /&gt;&lt;br /&gt;My eye doctor says everything is healing perfectly and looks great, but that it will likely take the more like 3 to 6 months for everything to fully clear up. The residual blurriness and so on is apparently because of minute swelling of the cornea as part of the recovery process. Naturally, I would have liked everything to be perfect by the end of two weeks, but my doctor makes the perfectly valid point that I did have 25% of my cornea blasted away by a laser and that takes some time to heal. A friend of mine who had PRK recommends keeping well hydrated, which does seem to help and is just good advice in general!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4454770415619038436-1595478880550658518?l=opensource-torchris.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://opensource-torchris.blogspot.com/feeds/1595478880550658518/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://opensource-torchris.blogspot.com/2010/06/prk-2-weeks-post-surgery.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4454770415619038436/posts/default/1595478880550658518'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4454770415619038436/posts/default/1595478880550658518'/><link rel='alternate' type='text/html' href='http://opensource-torchris.blogspot.com/2010/06/prk-2-weeks-post-surgery.html' title='PRK - 2 weeks post surgery'/><author><name>Torchris</name><uri>http://www.blogger.com/profile/05149708403435853046</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='26' src='http://1.bp.blogspot.com/_Q6HcmhbUwp8/SYHApptPSoI/AAAAAAAAABQ/Ggl9qnbr7gE/S220/altered-clown.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4454770415619038436.post-3314077890155733581</id><published>2010-06-04T19:52:00.000-07:00</published><updated>2010-06-04T19:52:32.454-07:00</updated><title type='text'>PRK - 1 week post surgery</title><content type='html'>So, it has now officially been a week post-surgery and things continue to progress albeit not in a completely linear fashion.&lt;br /&gt;&lt;br /&gt;Today I realized I could once again read small magazine text without reading glasses and I was able to bump down the font sizes on my computer for the first time. Still, it is hard to work at the computer screen for extended periods and moving to focus from close to far objects is tough. I also still have halo'ing. My vision also seems to be clearer when I yawn, which I expect is because of the effect of tearing up slightly when I yawn. I also have to do lots of artificial tears.&lt;br /&gt;&lt;br /&gt;Still, on the positive side, things are getting better each day and I am really liking have peripheral vision again like I did when I wore contacts many years ago! Not having to reach for my glasses in the morning or middle of the night is pretty cool. I am still getting used to my non-glassed face in the mirror when I shave. My wife says it is definitely a transition for her since she has only ever known me with glasses!&lt;br /&gt;&lt;br /&gt;I also wanted to thank the two people who more than anyone (well, besides my surgeon, eye doctor &amp;amp; wife) have contributed to my recovery - Tom and Ray Magliozzi from Car Talk on NPR. I downloaded I don't know how many episodes of the show onto my iPhone and I've listened to them all back-to-back - especially earlier on when I pretty much couldn't do anything! If you aren't familiar with them, check them out at&lt;a href="http://www.cartalk.com/"&gt; cartalk.com&lt;/a&gt;. I'm just waiting for my car to make a weird noise so I can call it in and have them laugh at me!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4454770415619038436-3314077890155733581?l=opensource-torchris.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://opensource-torchris.blogspot.com/feeds/3314077890155733581/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://opensource-torchris.blogspot.com/2010/06/prk-1-week-post-surgery.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4454770415619038436/posts/default/3314077890155733581'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4454770415619038436/posts/default/3314077890155733581'/><link rel='alternate' type='text/html' href='http://opensource-torchris.blogspot.com/2010/06/prk-1-week-post-surgery.html' title='PRK - 1 week post surgery'/><author><name>Torchris</name><uri>http://www.blogger.com/profile/05149708403435853046</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='26' src='http://1.bp.blogspot.com/_Q6HcmhbUwp8/SYHApptPSoI/AAAAAAAAABQ/Ggl9qnbr7gE/S220/altered-clown.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4454770415619038436.post-1591476215711008956</id><published>2010-06-02T18:20:00.000-07:00</published><updated>2010-06-02T18:20:13.257-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='PRK'/><category scheme='http://www.blogger.com/atom/ns#' term='surgery'/><category scheme='http://www.blogger.com/atom/ns#' term='eye'/><title type='text'>PRK - Post Surgery Day 5</title><content type='html'>Quick update today...&lt;br /&gt;&lt;br /&gt;My doctor (and most of my reading on the surgery) said the recovery would not be linear and I guess today was the non-linear day. Things that were quite clear yesterday are very blurry again today - for instance I totally can't read the house addresses across the street. Even a moderate amount of computer work is very fatiguing and I have had to take some Tylenol for a headache.&lt;br /&gt;&lt;br /&gt;Well, I will keep the faith that this will sort out over the next few days as everyone has promised. Tomorrow I am starting back to work, but I will definitely have to take frequent rests from the computer screen now and then.&lt;br /&gt;&lt;br /&gt;I also picked up a pair of reading glasses today and for the 1st time got to utter the immortal phrase "Honey, have you seen my reading glasses?" Fortunately they weren't balanced on my forehead or something at the time!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4454770415619038436-1591476215711008956?l=opensource-torchris.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://opensource-torchris.blogspot.com/feeds/1591476215711008956/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://opensource-torchris.blogspot.com/2010/06/prk-post-surgery-day-5.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4454770415619038436/posts/default/1591476215711008956'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4454770415619038436/posts/default/1591476215711008956'/><link rel='alternate' type='text/html' href='http://opensource-torchris.blogspot.com/2010/06/prk-post-surgery-day-5.html' title='PRK - Post Surgery Day 5'/><author><name>Torchris</name><uri>http://www.blogger.com/profile/05149708403435853046</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='26' src='http://1.bp.blogspot.com/_Q6HcmhbUwp8/SYHApptPSoI/AAAAAAAAABQ/Ggl9qnbr7gE/S220/altered-clown.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4454770415619038436.post-7648205859282656240</id><published>2010-06-01T17:23:00.000-07:00</published><updated>2010-06-01T17:23:38.860-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='PRK'/><category scheme='http://www.blogger.com/atom/ns#' term='surgery'/><category scheme='http://www.blogger.com/atom/ns#' term='eye'/><title type='text'>PRK - Post surgery Day 4</title><content type='html'>Today has been a big improvement over yesterday. Immediately after getting up, my left eye still had the somewhat painful "eyelash" sensation, but by mid-morning that had gone away and today is the first day I haven't had to take any pain killers - just steroidal drops (which I will be on for months to come). My vision is getting better day-by-day. Today I could read the address numbers on houses next door!&lt;br /&gt;&lt;br /&gt;I went for the last of the daily follow-ups with my doctor and, besides apologizing profusely for the incident yesterday, he said everything is healing up just as expected. The left eye is now a day or so behind the right eye because of tearing the epithelium, but it has healed up and is coming along. I still have a lot of haloing - especially with the left eye, but the improvement is very noticeable now. Amazingly, he said I actually would be legal to drive! Frankly, I still find the idea slightly terrifying and I would give it a few days yet before I will be back to driving.&lt;br /&gt;&lt;br /&gt;So, all-in-all, good progress and now moving more quickly! I will likely stop posting about this every day now and just give periodic updates as my recovery continues.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4454770415619038436-7648205859282656240?l=opensource-torchris.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://opensource-torchris.blogspot.com/feeds/7648205859282656240/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://opensource-torchris.blogspot.com/2010/06/prk-post-surgery-day-4.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4454770415619038436/posts/default/7648205859282656240'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4454770415619038436/posts/default/7648205859282656240'/><link rel='alternate' type='text/html' href='http://opensource-torchris.blogspot.com/2010/06/prk-post-surgery-day-4.html' title='PRK - Post surgery Day 4'/><author><name>Torchris</name><uri>http://www.blogger.com/profile/05149708403435853046</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='26' src='http://1.bp.blogspot.com/_Q6HcmhbUwp8/SYHApptPSoI/AAAAAAAAABQ/Ggl9qnbr7gE/S220/altered-clown.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4454770415619038436.post-2962706774457561112</id><published>2010-05-31T15:54:00.000-07:00</published><updated>2010-06-02T18:21:40.956-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='laser'/><category scheme='http://www.blogger.com/atom/ns#' term='PRK'/><category scheme='http://www.blogger.com/atom/ns#' term='eye'/><title type='text'>PRK - Post Surgery Day 3</title><content type='html'>Well, a bit of a late post today because unfortunately the day hasn't gone so well.&lt;br /&gt;&lt;br /&gt;Initially I had high hopes I would be getting the bandage contacts out today and all would be right with the world and my prescription would be starting to lock in somewhat. The doctor had told me to be sure to hit my eyes with artificial tears every five minutes for an hour before my appointment so that they would be well lubed up to slip out, which I dutifully did.&lt;br /&gt;&lt;br /&gt;When I got there he did the usual microscope routine and pronounced the epithelium healed enough to allow taking the lenses out. He took out the right lens just fine, but when he went for the left lens it unfortunately tore at the new layer of skin. Amazingly, the pain is pretty much what you would expect from ripping freshly grown skin off your eyeball - excruciating.&lt;br /&gt;&lt;br /&gt;For pretty much the whole day I have had to keep my left eye closed as much as possible since the sensation of opening it had been akin to having glass rubbed in my eye. Initially, I came home and had a Percocet which just caused me to have a very weird, hallucinogenic nap then later I had Tylenol and Tylenol with codeine. Now, about 7 hours after it happened I can keep my left eye open a bit while I type this, but it definitely still hurts a lot. Of course, this is pretty discouraging as well as painful since I was hoping today would really be when I turned a corner. I can read the shampoo bottle labels in the shower, which is more than I ever could without my glasses, so there is some progress.&lt;br /&gt;&lt;br /&gt;The right eye does feel quite good, fortunately, but the prescription is still very off. My doctor says it should be starting to improve, but then he's the guy who just ripped the skin off my eyeball!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4454770415619038436-2962706774457561112?l=opensource-torchris.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://opensource-torchris.blogspot.com/feeds/2962706774457561112/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://opensource-torchris.blogspot.com/2010/05/prk-post-surgery-day-3.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4454770415619038436/posts/default/2962706774457561112'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4454770415619038436/posts/default/2962706774457561112'/><link rel='alternate' type='text/html' href='http://opensource-torchris.blogspot.com/2010/05/prk-post-surgery-day-3.html' title='PRK - Post Surgery Day 3'/><author><name>Torchris</name><uri>http://www.blogger.com/profile/05149708403435853046</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='26' src='http://1.bp.blogspot.com/_Q6HcmhbUwp8/SYHApptPSoI/AAAAAAAAABQ/Ggl9qnbr7gE/S220/altered-clown.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4454770415619038436.post-4098874088638379824</id><published>2010-05-30T08:00:00.000-07:00</published><updated>2010-05-30T08:00:24.877-07:00</updated><title type='text'>PRK - Post surgery Day 2</title><content type='html'>OK, this is supposed to be the worst day and it really is. I can barely see what I am writing even with the screen fonts &amp;amp; browser scaling turned up full. My vision today is still somewhat better than my previous uncorrected vision, but lots of blurring and today some slight haziness. Last night it was definitely more painful and I'm getting lots of the "eye lash in the eye" feeling.&lt;br /&gt;&lt;br /&gt;That being said, this is all completely normal and my eye doctor this morning said everything in healing up just fine. My left eye is bugging me the most and he says that is the one that is healing the fastest! So, I will keep a good thought and just be patient today.&lt;br /&gt;&lt;br /&gt;So far I have only had to take two of the Percocets they gave me and a few Extra Strength Tylenols. Again, I would still say this is less painful than a dental procedure, but the deteriorating vision is definitely irritating and interferes with doing a lot of normal things I would do to kill time like gardening, working on the computer or watching TV. Good thing I downloaded a bunch of episodes of "Car Talk" from NPR before the surgery. By the time this is done I will be a master mechanic and/or have a Boston accent.&lt;br /&gt;&lt;br /&gt;Many thanks to my wife for keeping all the drops straight. She really should be a nurse. One thing you do have to watch with this is all the various eye drops you need to be squirting in your eyes!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4454770415619038436-4098874088638379824?l=opensource-torchris.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://opensource-torchris.blogspot.com/feeds/4098874088638379824/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://opensource-torchris.blogspot.com/2010/05/prk-post-surgery-day-2.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4454770415619038436/posts/default/4098874088638379824'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4454770415619038436/posts/default/4098874088638379824'/><link rel='alternate' type='text/html' href='http://opensource-torchris.blogspot.com/2010/05/prk-post-surgery-day-2.html' title='PRK - Post surgery Day 2'/><author><name>Torchris</name><uri>http://www.blogger.com/profile/05149708403435853046</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='26' src='http://1.bp.blogspot.com/_Q6HcmhbUwp8/SYHApptPSoI/AAAAAAAAABQ/Ggl9qnbr7gE/S220/altered-clown.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4454770415619038436.post-3237114940338991572</id><published>2010-05-29T14:36:00.000-07:00</published><updated>2010-05-30T07:52:10.054-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='laser'/><category scheme='http://www.blogger.com/atom/ns#' term='PRK'/><category scheme='http://www.blogger.com/atom/ns#' term='eye'/><title type='text'>PRK Post-surgery - Day 1 after</title><content type='html'>Well, this is my 1st day after the surgery and I will need to keep this quick since it's pretty hard for me to see the screen.&lt;br /&gt;&lt;br /&gt;I had my first follow-up with my local eye doctor and he said everything was healing fine. In fact, since my surgery was quite early yesterday he said I was slightly ahead of the curve. The family all went out for a good breakfast this morning and in general I have felt pretty good. I had a long nap in the afternoon and my energy level seems a bit low.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;For most of the morning I really couldn't feel the bandage contacts at all and so far I have only had two extra strength Tylenols for the discomfort. I've had a bit of the "eyelash in the eye" feeling in one eye, but only occasionally.&amp;nbsp; Right now later in the day and after having been outside, and with trying to concentrate on my computer screen to write this, my eyes definitely feel tired and a bit scratchy.&lt;br /&gt;&lt;br /&gt;My vision is very poor and probably worse than yesterday. I would describe it as about a third or half of my previous uncorrected -9 diopter prescription, so I can function at most things, but it is still tough - lots of halos and so on.&lt;br /&gt;&lt;br /&gt;The strangest thing is my eyes look perfectly normal - they aren't blood shot or weepy or swollen or anything. As my wife says, if I had sneaked out and had the surgery, it would be impossible to tell! Even the bandage contact lenses aren't all that obvious. Contrast this with a friend of mine who had Lasik who had some bloodshot appearance a week later. I think that's because there is a ring they place on your eye for cutting the flap in Lasik that isn't required for PRK.&lt;br /&gt;&lt;br /&gt;So, that's probably enough for now, but just to mention one last thing. If you are going for this surgery you definitely, absolutely will need a committed partner to help see you through it and the after care. Immediately after the surgery you are really pretty helpless and I still feel pretty helpless while I have the bandage lenses in. There is also a pretty complex regime of eye drops to manage. It gets especially complicated when there are also children to look after! My friends who have had Lasik are generally right back to fairly normal routine the next day, but that just isn't the case with PRK!&lt;br /&gt;&lt;br /&gt;I made the dumb mistake of planning this for when our primary child care helpers (my in-laws) happened to be out of town which has made this somewhat more complicated than it might be normally. My wife has been wonderfully supportive and taken on the extra load without complaint and I appreciate it and love her even more for it! I will definitely make it up to her with some time off for her later in the summer when this is all over.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4454770415619038436-3237114940338991572?l=opensource-torchris.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://opensource-torchris.blogspot.com/feeds/3237114940338991572/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://opensource-torchris.blogspot.com/2010/05/prk-surgery-day-1-after.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4454770415619038436/posts/default/3237114940338991572'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4454770415619038436/posts/default/3237114940338991572'/><link rel='alternate' type='text/html' href='http://opensource-torchris.blogspot.com/2010/05/prk-surgery-day-1-after.html' title='PRK Post-surgery - Day 1 after'/><author><name>Torchris</name><uri>http://www.blogger.com/profile/05149708403435853046</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='26' src='http://1.bp.blogspot.com/_Q6HcmhbUwp8/SYHApptPSoI/AAAAAAAAABQ/Ggl9qnbr7gE/S220/altered-clown.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4454770415619038436.post-7797797817449884185</id><published>2010-05-28T13:03:00.000-07:00</published><updated>2010-05-28T13:03:59.606-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='laser'/><category scheme='http://www.blogger.com/atom/ns#' term='PRK'/><category scheme='http://www.blogger.com/atom/ns#' term='surgery'/><category scheme='http://www.blogger.com/atom/ns#' term='eye'/><title type='text'>PRK Surgery Day</title><content type='html'>Just a quick note today because the nurses warned me that "the doctor can tell if you have been working on your computer!"&lt;br /&gt;&lt;br /&gt;The first part was paperwork &amp;amp; payment then a quick meeting with the doctor. He explained that because of my extreme prescription, they would be taking off nearly a quarter of my cornea, but the actual laser time was only 58 seconds. I have a somewhat elevated chance of needing a touch up later, but fingers crossed. As well there was a briefing on the post-op drop regime.&lt;br /&gt;&lt;br /&gt;The surgery went well and had somewhat of an alien abduction feel. Ahead of the surgery you get a course of drops (more antibiotics and steroidal drops) then the topical anesthetic. The weird thing was being ushered into the room with no glasses on, so effectively blind, and being laid out on the surgical bed.&lt;br /&gt;&lt;br /&gt;The first part of the procedure is getting the ocular speculum in to hold open the eyelid on the first eye (rather uncomfortable) then some measurements and getting everything set up.&amp;nbsp; Then the doctor used what seemed like a mini-electric toothbrush to abrade off the out epithelial layer on my cornea. &amp;nbsp; The topical anesthetic worked fine and it just tickled a bit. but was definitely odd. After scrapping off the residue, then it was laser time!&lt;br /&gt;&lt;br /&gt;For the actual lasering, I had to concentrate on a flashing light, then you could hear the clicking of the laser and the technician counting down the time. Gradually my vision grew cloudier &amp;amp; cloudier and there was a bit of a disconcerting "burning flesh" smell, but it didn't last too long.&lt;br /&gt;&lt;br /&gt;After that the doctor put Mitomecin on my eye, which is a cancer drug that helps prevent hazing and scarring then flushed the eye with water, put on some drops then slipped in the bandage contact lens. All very quick and I'm sure no more than 5 minutes. The second eye was just the same. Definitely a freaky feel and somewhat hard to describe, but not too terrible. Not to give away too much of my medical history, but I found it harder than a dental procedure (like a filling), but much easier than my vasectomy. Everyone at the clinic was very professional and nice.&lt;br /&gt;&lt;br /&gt;Afterwords they check you out one more time and then you're done! I felt reasonably well after the surgery, so we went over to a nearby Chapters so my wife could find a book she needed and I just settled in to listen to my iPod and have a latte. On the long drive home, my eyes started to feel a bit irritated just with so much sun and I guess from drying out a bit.&lt;br /&gt;&lt;br /&gt;At home, we went through a drop treatment and I took a Percocet and slept for a couple of hours. Now I am up and about with sunglasses on and my eyes feel fine. My vision is definitely very distorted, but I would say it is about at half my previous uncorrected myopia blurriness. It is a drag to not just get immediately perfect correction like the Lasik people, but at least I don't feel uncomfortable and I can more or less see well enough to do basic things. Thank heavens I learned touch typing or I would never be able to write this up!!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4454770415619038436-7797797817449884185?l=opensource-torchris.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://opensource-torchris.blogspot.com/feeds/7797797817449884185/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://opensource-torchris.blogspot.com/2010/05/prk-surgery-day.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4454770415619038436/posts/default/7797797817449884185'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4454770415619038436/posts/default/7797797817449884185'/><link rel='alternate' type='text/html' href='http://opensource-torchris.blogspot.com/2010/05/prk-surgery-day.html' title='PRK Surgery Day'/><author><name>Torchris</name><uri>http://www.blogger.com/profile/05149708403435853046</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='26' src='http://1.bp.blogspot.com/_Q6HcmhbUwp8/SYHApptPSoI/AAAAAAAAABQ/Ggl9qnbr7gE/S220/altered-clown.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4454770415619038436.post-5462861849526704619</id><published>2010-05-27T16:47:00.000-07:00</published><updated>2010-05-27T16:47:21.711-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='laser'/><category scheme='http://www.blogger.com/atom/ns#' term='PRK'/><category scheme='http://www.blogger.com/atom/ns#' term='vision'/><category scheme='http://www.blogger.com/atom/ns#' term='eye'/><title type='text'>PRK Laser Srugery - Prologue</title><content type='html'>This will be a somewhat different set of posts than usual - perhaps this will be more like an actual blog then a set of technical recipes. You see, tomorrow I will be going in for laser eye surgery to get rid of my glasses after wearing them for some 38 years and I thought it might be a good idea to keep a diary of my recovery.&lt;br /&gt;&lt;br /&gt;Normally, for most people these days, getting Lasik surgery is quite routine, but I have...&lt;br /&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;A pretty extreme perscription at -9 diopters&lt;/li&gt;&lt;li&gt; Apparently the epithelial layer of cells on my eye ball are somewhat loose (who knew?)&lt;/li&gt;&lt;/ol&gt;Because of these, I need to go for PRK surgery (Photorefractive keratectomy, which you can read about &lt;a href="http://en.wikipedia.org/wiki/Photorefractive_keratectomy"&gt;here&lt;/a&gt;). Since that does away with the Lasik flap, I will have to regrow the epithelium over my cornea, which can take a few days. The only thing that makes me a bit nervous is that sometimes it can be somewhat painful and it can take a few weeks for your vision to completely "lock in" to it's final perscription.&lt;br /&gt;&lt;br /&gt;So, assuming I can even see my computer monitor, I am going to keep a record on my blog so that I can track just how well I am doing and how long it takes to recover. I've read a few other patients journals from their recovery and I found it really helpful to understand the process. Hopefully my journal will be helpful to someone else.&lt;br /&gt;&lt;br /&gt;I do have a very cool Arduino project I will finish once I am up to it!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4454770415619038436-5462861849526704619?l=opensource-torchris.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://opensource-torchris.blogspot.com/feeds/5462861849526704619/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://opensource-torchris.blogspot.com/2010/05/prk-laser-srugery-prologue.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4454770415619038436/posts/default/5462861849526704619'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4454770415619038436/posts/default/5462861849526704619'/><link rel='alternate' type='text/html' href='http://opensource-torchris.blogspot.com/2010/05/prk-laser-srugery-prologue.html' title='PRK Laser Srugery - Prologue'/><author><name>Torchris</name><uri>http://www.blogger.com/profile/05149708403435853046</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='26' src='http://1.bp.blogspot.com/_Q6HcmhbUwp8/SYHApptPSoI/AAAAAAAAABQ/Ggl9qnbr7gE/S220/altered-clown.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4454770415619038436.post-7356313963880742116</id><published>2010-05-07T11:51:00.001-07:00</published><updated>2010-05-09T15:23:46.681-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='telephone'/><category scheme='http://www.blogger.com/atom/ns#' term='Twilio'/><category scheme='http://www.blogger.com/atom/ns#' term='Arduino'/><category scheme='http://www.blogger.com/atom/ns#' term='DTMF'/><title type='text'>Arduino Phone Control via Twilio</title><content type='html'>Since Jeff from Twilio was nice enough to leave a comment on my last post, I have put together what must be my quickest project ever! This is just a very simple demonstration proof-of-concept to show the most basic of integration, but it does work. Using the Twilio cloud-based telephony API (&lt;a href="http://www.twilio.com/" id="bzys" title="www.twilio.com"&gt;www.twilio.com&lt;/a&gt;), this project uses a very basic IVR menu to control an LED on an Arduino. As a digital output, of course, the LED could be a relay controlling an AC current doing home automation or any number of digital control devices. This is a very simplistic project which only shows a small portion of what can be done with Twilio. Hopefully in the next few weeks I can do something more sophisticated when I understand their API better.&lt;br /&gt;&lt;br /&gt;First, here is the obligatory video:&lt;br /&gt;&lt;br /&gt;&lt;object width="660" height="525"&gt;&lt;param name="movie" value="http://www.youtube.com/v/RYu_e4P3Y-4&amp;hl=en_GB&amp;fs=1&amp;border=1"&gt;&lt;/param&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;/param&gt;&lt;param name="allowscriptaccess" value="always"&gt;&lt;/param&gt;&lt;embed src="http://www.youtube.com/v/RYu_e4P3Y-4&amp;hl=en_GB&amp;fs=1&amp;border=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="660" height="525"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br /&gt;&lt;br /&gt;The hardware is a very simple Diecimila + Adafruit Ethernet Shield sandwich:&lt;br /&gt;&lt;br /&gt;&lt;div id="v91q" style="text-align: left;"&gt;&lt;img height="319" src="http://docs.google.com/File?id=ddxwhmsv_162cn9bgkfm_b" width="535" /&gt;&lt;br /&gt;I have the LED going to digital output pin 11.&lt;/div&gt;&lt;br /&gt;&lt;div id="bowc" style="text-align: left;"&gt;&lt;img src="http://docs.google.com/File?id=ddxwhmsv_164crgvmrf7_b" style="height: 368.355px; width: 648px;" /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div id="r9_-" style="text-align: left;"&gt;So, how does it work? The Twilio system is really more geared to allowing web-based control of telephony functions and to quickly build IVRs and messaging systems in with a cloud-based back-end, so using to control physical hardware is a bit of a hack. Fortunately, they have a simple to use API and lots of PHP-based example code available. &lt;br /&gt;&lt;br /&gt;What is involved, however, is having a bunch of scripts/files all working together to pass the info down to the Arduino in a format it can digest. Here is a general flow of how it works:&lt;/div&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;div id="t412" style="text-align: left;"&gt;&lt;div id="uq:i" style="text-align: left;"&gt;&lt;img src="http://docs.google.com/File?id=ddxwhmsv_161hgxpv8j9_b" style="height: 719px; width: 489px;" /&gt;&lt;/div&gt;&lt;br /&gt;The first file is the PHP file that generates the XML read by Twilio:&lt;br /&gt;&lt;br /&gt;&lt;pre class="cpp" name="code"&gt;&amp;lt;?php&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; header("content-type: text/xml");&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; echo "&amp;lt;?xml version=\"1.0\" encoding=\"UTF-8\"?&amp;gt;\n";&lt;br /&gt;?&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;Response&amp;gt;&lt;br /&gt;&amp;lt;Say&amp;gt;Hello&amp;lt;/Say&amp;gt;&lt;br /&gt;&amp;lt;Gather action="twi_do.php" numDigits ='1' method="POST"&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;Say&amp;gt;Press 1 to turn on the L.E.D. Press 2 to turn it off. Press 3 to repeat this menu and press 4 to hang up.&amp;lt;/Say&amp;gt;&lt;br /&gt;&amp;lt;/Gather&amp;gt;&lt;br /&gt;&amp;lt;/Response&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;This file is on my personal webserver and accessible to Twilo. When I call the access number, Twilio goes to this webpage and acts on the XML instructions presented. The XML uses the Twilio verbs "Say" to repeat the menu options and "Gather" to get the keypresses. Here is the twi_do.php script that is called by the above code:&lt;br /&gt;&lt;br /&gt;&lt;pre class="cpp" name="code"&gt;&amp;lt;?php&lt;br /&gt;&lt;br /&gt;$stringData = $_REQUEST['Digits'];&lt;br /&gt;&lt;br /&gt;switch($stringData){&lt;br /&gt;case 4:&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; echo "&amp;lt;Response&amp;gt;";&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; echo "&amp;lt;Say&amp;gt; Thank you, Good bye.&amp;lt;/Say&amp;gt;";&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; echo "&amp;lt;hangup/&amp;gt;";&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; echo "&amp;lt;/Response&amp;gt;";&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; break;&lt;br /&gt;case 3:&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; echo "&amp;lt;Response&amp;gt;";&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; echo "&amp;lt;Redirect&amp;gt;";&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; echo "http://xxx,xxxxxx,xxx/twi_test.php";&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; echo "&amp;lt;/Redirect&amp;gt;";&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; echo "&amp;lt;/Response&amp;gt;";&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; break;&lt;br /&gt;case 2:&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; echo "&amp;lt;Response&amp;gt;";&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; echo "&amp;lt;Say&amp;gt; You have turned the L.E.D. off.&amp;lt;/Say&amp;gt;";&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; echo "&amp;lt;Redirect&amp;gt;";&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; echo "http://xxx,xxxxxx,xxx/twi_test.php";&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; echo "&amp;lt;/Redirect&amp;gt;";&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; echo "&amp;lt;/Response&amp;gt;";&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; $myFile = "twi_File.txt";&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; $fh = fopen($myFile, 'w') or die("can't open file");&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; fwrite($fh, "NUM" . $stringData);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; fclose($fh);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; break;&lt;br /&gt;case 1:&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; echo "&amp;lt;Response&amp;gt;";&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; echo "&amp;lt;Say&amp;gt; You have turned the L.E.D on.&amp;lt;/Say&amp;gt;";&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; echo "&amp;lt;Redirect&amp;gt;";&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; echo "http://xxx,xxxxxx,xxx/twi_test.php";&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; echo "&amp;lt;/Redirect&amp;gt;";&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; echo "&amp;lt;/Response&amp;gt;";&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; $myFile = "twi_File.txt";&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; $fh = fopen($myFile, 'w') or die("can't open file");&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; fwrite($fh, "NUM" . $stringData);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; fclose($fh);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; break;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;?&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;This responds to the keypress value by presenting the different prompts and, in the case of the digits 1 and 2 it writes the value to a small file (twi_File.txt) which just contains either "NUM1" or "NUM2". So, now we have the kepress value stored in a locally accessible file!&lt;br /&gt;&lt;br /&gt;Running along with my webserver is a small PHP sockets server program (Arduino_twilio.php):&lt;br /&gt;&lt;br /&gt;&lt;pre class="cpp" name="code"&gt;&amp;lt;?php&lt;br /&gt;&lt;br /&gt;$host_ard = "192.168.0.171";&lt;br /&gt;$port_ard = "55455";&lt;br /&gt;&lt;br /&gt;//=====================Create Socket to listen for Arduino======================//&lt;br /&gt;&lt;br /&gt;ob_implicit_flush();&lt;br /&gt;&lt;br /&gt;//Open socket to listen for Arduino&lt;br /&gt;$socket_ard = socket_create(AF_INET, SOCK_STREAM, 0) or die ("Could not bind to socket\n");&lt;br /&gt;$result_ard = socket_bind($socket_ard, $host_ard, $port_ard) or die("Could not bind to socket\n");&lt;br /&gt;&lt;br /&gt;// start listening for connections&lt;br /&gt;$result_ard = socket_listen($socket_ard, 3) or die("Could not set up socket listener\n");&lt;br /&gt;// accept incoming connections&lt;br /&gt;// spawn another socket to handle communication&lt;br /&gt;$spawn = socket_accept($socket_ard) or die("Could not accept incoming connection\n");&lt;br /&gt;// read client input&lt;br /&gt;socket_write($spawn,"C\n");&lt;br /&gt;echo "Device connected.\n";&lt;br /&gt;&lt;br /&gt;do{&lt;br /&gt;&lt;br /&gt;$input = socket_read($spawn, 2048, PHP_NORMAL_READ) or die("Could not read input\n");&lt;br /&gt;&lt;br /&gt;echo ("This is the value of input: " . $input . "\n");&lt;br /&gt;&lt;br /&gt;if (trim($input[0]) == "C"){&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; usleep(10000);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; $data = file_get_contents("twi_File.txt");&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; echo ("The value of data is: " . $data . "\n");&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; socket_write($spawn, "X" . $data . "\n");&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; usleep(10000);&lt;br /&gt;&lt;br /&gt;}while(true);&lt;br /&gt;&lt;br /&gt;?&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;If a client is connected to this server, then the script periodically reads the twi_File.txt file and presents it on to the Arduino client when requested. Given the simplicity of this project, I could probably have dispensed entirely with a "preprocessor" script like this and done all the manipulation on the Arduino, but this was just easier to do since I had the other code lying around.&lt;br /&gt;&lt;br /&gt;Finally, here is the Arduino code:&lt;br /&gt;&lt;br /&gt;&lt;pre class="cpp" name="code"&gt;#include &amp;lt;NewSoftSerial.h&amp;gt;&lt;br /&gt;#include &amp;lt;AF_XPort.h&amp;gt;&lt;br /&gt;&lt;br /&gt;#define XPORT_RXPIN 2&lt;br /&gt;#define XPORT_TXPIN 3&lt;br /&gt;#define XPORT_RESETPIN 4&lt;br /&gt;#define XPORT_DTRPIN 5&lt;br /&gt;#define XPORT_CTSPIN 6&lt;br /&gt;#define XPORT_RTSPIN 7&lt;br /&gt;#define IPADDR "192.168.0.171" //IP Address of the Arduino Server&lt;br /&gt;#define PORT 55455 //IP port of the server&lt;br /&gt;&lt;br /&gt;AF_XPort xport = AF_XPort(XPORT_RXPIN, XPORT_TXPIN, XPORT_RESETPIN, XPORT_DTRPIN, XPORT_RTSPIN, XPORT_CTSPIN);&lt;br /&gt;&lt;br /&gt;uint8_t ret;&lt;br /&gt;int ledPin = 11;&lt;br /&gt;char linebuffer[16];&lt;br /&gt;&lt;br /&gt;void setup() &lt;br /&gt;{&lt;br /&gt;&amp;nbsp; pinMode(ledPin, OUTPUT);&lt;br /&gt;&amp;nbsp; Serial.begin(9600);&lt;br /&gt;&amp;nbsp; Serial.println("Starting up!");&lt;br /&gt;&amp;nbsp; // set the data rate for the NewSoftSerial port&lt;br /&gt;&amp;nbsp; xport.begin(9600);&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;void loop()&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // run over and over again&lt;br /&gt;{&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; xport.connect(IPADDR, PORT);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; delay(300);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; delay(300);&lt;br /&gt;&lt;br /&gt;&amp;nbsp; ret = xport.readline_timeout(linebuffer, 32, 600); // get first line&lt;br /&gt;&amp;nbsp; Serial.println(linebuffer);&lt;br /&gt;&amp;nbsp; if (linebuffer[0] == 'N'){&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(linebuffer[3] == '1'){&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; digitalWrite(ledPin, HIGH);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(linebuffer[3] == '2'){&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; digitalWrite(ledPin, LOW);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp; }&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;This is based on the Adafruit AF_Xport library and when the Xport connects it sends out a C plus the IP address and port. When the PHP server receives the "C" it sends the value to the Arduino and this program then either turns the light on or off depending on what it gets back. &lt;br /&gt;&lt;br /&gt;&lt;h3&gt;So what?&lt;/h3&gt;&lt;br /&gt;Well, like the email projects, this is also a good way to do remote control since simple DTMF telelphony is ubiquitious. If you have a cell phone, you could call into your Arduino from anywhere in the world and control household appliances, monitor temperatures, control a robot - anything in the huge universe of whacky stuff Arduino builders build!&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;What's next?&lt;/h3&gt;&lt;br /&gt;Of course, this project really just uses the very simplest of features of the Twilio API. I think next up I will looking into how an Arduino could be made to send out an SMS or do a click-to-call implementation.&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4454770415619038436-7356313963880742116?l=opensource-torchris.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://opensource-torchris.blogspot.com/feeds/7356313963880742116/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://opensource-torchris.blogspot.com/2010/05/arduino-phone-control-via-twilio.html#comment-form' title='9 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4454770415619038436/posts/default/7356313963880742116'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4454770415619038436/posts/default/7356313963880742116'/><link rel='alternate' type='text/html' href='http://opensource-torchris.blogspot.com/2010/05/arduino-phone-control-via-twilio.html' title='Arduino Phone Control via Twilio'/><author><name>Torchris</name><uri>http://www.blogger.com/profile/05149708403435853046</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='26' src='http://1.bp.blogspot.com/_Q6HcmhbUwp8/SYHApptPSoI/AAAAAAAAABQ/Ggl9qnbr7gE/S220/altered-clown.jpg'/></author><thr:total>9</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4454770415619038436.post-5919521137384140827</id><published>2010-05-03T18:51:00.001-07:00</published><updated>2010-05-03T18:58:14.047-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='email'/><category scheme='http://www.blogger.com/atom/ns#' term='Ethernet'/><category scheme='http://www.blogger.com/atom/ns#' term='LCD Shield'/><category scheme='http://www.blogger.com/atom/ns#' term='TextFinder'/><category scheme='http://www.blogger.com/atom/ns#' term='Arduino'/><category scheme='http://www.blogger.com/atom/ns#' term='POP3'/><title type='text'>Arduino Email Manager - Part 3 - Arduino Code</title><content type='html'>Now we come to the last part of the Email Manager - the Arduino firmware. Most of it is reasonably straightforward, but there are a few things to note.&lt;br /&gt;&lt;br /&gt;To drive the LCD I used the LCD4Bit_mod library recommended to go with the DFRobot LCD shield (available from &lt;a href="http://www.robotshop.com/content/ZIP/dfrobot-lcd4bit-mod.zip" id="m357" title="here"&gt;here&lt;/a&gt;). In general this seems to work fine, but it doesn't seems consistent about one line flowing over to the next which is why I have "lcd.cursorTo" lines to put the cursor on the 1st or 2nd line. &lt;br /&gt;&lt;br /&gt;The buttons actually are run over Analog pin 0 and the "get_key" function determines the analog value returned and lines it up with the appropriate key number. The trickiest thing for me was figuring the various modes for the buttons in different states - especially the Up/Down buttons that can also be used to delete messages, which is why there are a lot of "if-this-key-and-that-mode-do-this" statements. Likely they could be cleaned up further!&lt;br /&gt;&lt;br /&gt;Finding the from/subject info in the data stream proved to be harder than I would have thought as explained in the first post so I ended up using the TextFinder library available from &lt;a href="http://www.arduino.cc/playground/Code/TextFinder" id="r6x2" title="here"&gt;here&lt;/a&gt;.&amp;nbsp; This allows you to search in the data stream (either serial or Ethernet) for keywords or values. Come to think of it, I could probably have used this to do the whole email parsing job and then dispensed with the PHP script, but I noticed when I ran the "getValue" feature it temporarily blacked out the LCD screen - maybe a short processor lock up? Anyway, if anyone can think of a way to use TexFinder to eliminate the PHP script, let me know!&lt;br /&gt;&lt;br /&gt;So, here is the Arduino code (with lots of comments) in its glory:&lt;br /&gt;&lt;br /&gt;&lt;pre class="cpp" name="code"&gt;/*&lt;br /&gt;*&amp;nbsp; Arduino POP Mail Manager&lt;br /&gt;* Uses the DFRobot LCD Shield, Arduino Ethernet Sheild&lt;br /&gt;* and an Arduino Duemilanove to build a simple system for seeing&lt;br /&gt;* how many POP eamils you have and deleting ones you don't want. Separate&lt;br /&gt;* PHP script must be used with it. Complete description at:&lt;br /&gt;* http://opensourceprojects-torchris.blogspot.com/&lt;br /&gt;*&lt;br /&gt;* Uncomment the //Serial lines for troubleshooting/debug info.&lt;br /&gt;*&lt;br /&gt;* This code is in the public domain. Please provide credit if it is used&lt;br /&gt;* in another project.&lt;br /&gt;* &lt;br /&gt;* written by Chris Armour, Arpil 30th, 2010&lt;br /&gt;*&lt;br /&gt;*/&lt;br /&gt;&lt;br /&gt;//=====================Libraries=============/&lt;br /&gt;#include &amp;lt;Ethernet.h&amp;gt;&lt;br /&gt;#include &amp;lt;LCD4Bit_mod.h&amp;gt; &lt;br /&gt;#include &amp;lt;TextFinder.h&amp;gt;&lt;br /&gt;&lt;br /&gt;//===============Set up variables =============/&lt;br /&gt;&lt;br /&gt;byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED }; //MAC address for Arduino&lt;br /&gt;byte ip[] = { 192,168,0,34 }; // IP address you wish to assign to Arduino&lt;br /&gt;byte server[] = { 192, 168, 0, 171 }; // IP address of your PHP server&lt;br /&gt;int ServerPort = 12345;&lt;br /&gt;int&amp;nbsp; adc_key_val[5] ={30, 150, 360, 535, 760 };&lt;br /&gt;int NUM_KEYS = 5;&lt;br /&gt;int adc_key_in;&lt;br /&gt;int key=-1;&lt;br /&gt;int oldkey=-1;&lt;br /&gt;char NumRecd[4];&lt;br /&gt;char SubjRecd[32];&lt;br /&gt;boolean ConnectedState = false;&lt;br /&gt;int MsgNumber = 1;&lt;br /&gt;char TotalMsgNumChar[4] = "&amp;nbsp;&amp;nbsp; ";&lt;br /&gt;int MsgTotalNum = 1;&lt;br /&gt;char TotalMsgCharAr[2];&lt;br /&gt;boolean DelMode = false;&lt;br /&gt;unsigned long ButtonMillis = 0;&lt;br /&gt;unsigned long CurrentMillis = 0;&lt;br /&gt;unsigned long interval = 15000;&lt;br /&gt;&lt;br /&gt;//===============Setup instances===============/&lt;br /&gt;&lt;br /&gt;LCD4Bit_mod lcd = LCD4Bit_mod(2); &lt;br /&gt;Client client(server, ServerPort); &lt;br /&gt;TextFinder finder( client);&lt;br /&gt;&lt;br /&gt;//=================Setup========================/&lt;br /&gt;&lt;br /&gt;void setup() { &lt;br /&gt;&amp;nbsp; Ethernet.begin(mac, ip);&lt;br /&gt;&amp;nbsp; lcd.init();&lt;br /&gt;&amp;nbsp; lcd.clear();&lt;br /&gt;&amp;nbsp; lcd.cursorTo(1,0);&lt;br /&gt;&amp;nbsp; lcd.printIn("POP Mail Started");&lt;br /&gt;&amp;nbsp; lcd.cursorTo(2,0);&lt;br /&gt;&amp;nbsp; lcd.printIn("Press S to conct");&lt;br /&gt;&amp;nbsp; //Serial.begin(9600);&lt;br /&gt;&amp;nbsp; DelMode = false;&lt;br /&gt;&amp;nbsp; ConnectedState = false;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;//=================Main program loop ==================/&lt;br /&gt;&lt;br /&gt;void loop() {&lt;br /&gt;&lt;br /&gt;&amp;nbsp; CurrentMillis = millis(); &lt;br /&gt;&amp;nbsp; &lt;br /&gt;&amp;nbsp; if (((CurrentMillis - ButtonMillis) &amp;gt; interval) &amp;amp;&amp;amp; (ConnectedState == true)){&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; //If connected to the PHP script, then every 15 seconds display the number of emails.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ButtonMillis = CurrentMillis;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; //Serial.println("15 Seconds have passed!");&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; GetTotalMsgs(); //Get total message count&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; delay(100);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; PrintTotalMsgs(); //Display total messages&lt;br /&gt;&amp;nbsp; }&lt;br /&gt;&amp;nbsp; &lt;br /&gt;&amp;nbsp; if (((CurrentMillis - ButtonMillis) &amp;gt; interval) &amp;amp;&amp;amp; (ConnectedState != true)){&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; //If not connected, then just display the not connected error.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ButtonMillis = CurrentMillis;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; //Serial.println("15 Seconds have passed!");&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; NotConnectedError();&lt;br /&gt;&amp;nbsp; } &lt;br /&gt;&amp;nbsp; &lt;br /&gt;&lt;br /&gt;//The following items are from the original LCD example and they read the value of the key pressed. &lt;br /&gt;adc_key_in = analogRead(0);&amp;nbsp;&amp;nbsp;&amp;nbsp; // read the value from the sensor &lt;br /&gt;&lt;br /&gt;key = get_key(adc_key_in); // convert into key press&lt;br /&gt;&amp;nbsp;&amp;nbsp; &lt;br /&gt;if (key != oldkey) // if keypress is detected&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; delay(70);&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;// wait for debounce time&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; adc_key_in = analogRead(0);&amp;nbsp;&amp;nbsp;&amp;nbsp; // read the value from the sensor &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; key = get_key(adc_key_in);&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // convert into key press&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; //Serial.println(key);&lt;br /&gt;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (key != oldkey)&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; oldkey = key;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp; }&lt;br /&gt;&amp;nbsp; &lt;br /&gt;&amp;nbsp; if (key == 4) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; //If the Select button is pushed, run the routine to connect to the PHP server.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ButtonMillis = millis();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (client.connect()) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; char c = client.read();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (c == 'C') {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //Serial.println("connected");&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; lcd.clear();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; lcd.printIn("Connected");&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ConnectedState = true; //Sets ConnectedState to true&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; delay(200);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; } else {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //If can't connect, print an error.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //Serial.println("connection failed");&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ConnectedState = false; // Set connected state to false&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; lcd.clear();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; lcd.printIn("Connection Fail");&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; lcd.cursorTo(2, 0);&amp;nbsp; //line=2, x=0 &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; lcd.printIn("Check PHP script");&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp; }&lt;br /&gt;&amp;nbsp; &lt;br /&gt;&amp;nbsp; if ((key == 3) &amp;amp;&amp;amp; (ConnectedState == true)) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; //If Right button pressed and it's connected to the PHP script, then dispaly the toal messages.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ButtonMillis = millis(); //these detect when the button was pushed&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; GetTotalMsgs();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; delay(100);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PrintTotalMsgs();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;if ((key == 3) &amp;amp;&amp;amp; (ConnectedState == false)){&lt;br /&gt;&amp;nbsp;&amp;nbsp; //Serial.println("Not Connected!!");&lt;br /&gt;&amp;nbsp;&amp;nbsp; //If ConnectedState is false, print error message.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; NotConnectedError();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; } &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;if ((key == 2) &amp;amp;&amp;amp; (ConnectedState == false)){&lt;br /&gt;&amp;nbsp;&amp;nbsp; //Serial.println("Not Connected!!");&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; NotConnectedError();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; } &lt;br /&gt;&lt;br /&gt;if ((key == 2)&amp;amp;&amp;amp; (DelMode != true) &amp;amp;&amp;amp; (ConnectedState == true)) {&lt;br /&gt;&amp;nbsp; //If it is connected AND not in delete mode, then display email info&lt;br /&gt;&amp;nbsp; ButtonMillis = millis();&lt;br /&gt;&amp;nbsp; GetTotalMsgs();&lt;br /&gt;&amp;nbsp; delay(200);&lt;br /&gt;&amp;nbsp; //Serial.println("DN button push detected");&lt;br /&gt;&amp;nbsp; MsgNumber++; //Increments the messages.&lt;br /&gt;&amp;nbsp;&amp;nbsp; if (MsgNumber &amp;gt;= MsgTotalNum){ //if we reach the max message number, then go to message #1&lt;br /&gt;&amp;nbsp;&amp;nbsp; MsgNumber = 1;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp; CallMsg();&lt;br /&gt;&amp;nbsp;&amp;nbsp; delay(150);&lt;br /&gt;&amp;nbsp;&amp;nbsp; //Serial.print("Total Messages = ");&lt;br /&gt;&amp;nbsp;&amp;nbsp; //Serial.println(MsgTotalNum);&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;if ((key == 2) &amp;amp;&amp;amp; (DelMode == true)&amp;amp;&amp;amp; (ConnectedState == true)){&lt;br /&gt;&amp;nbsp; //If it is connected, but in Delete mode, then this is the confirm delete button.&lt;br /&gt;&amp;nbsp; ButtonMillis = millis();&lt;br /&gt;&amp;nbsp; //Serial.println("DN button push detected");&lt;br /&gt;&amp;nbsp; //Serial.print("Deleting message number =");&lt;br /&gt;&amp;nbsp; //Serial.println(MsgNumber);&lt;br /&gt;&amp;nbsp; DelMode = !DelMode;&lt;br /&gt;&amp;nbsp; DelMsg();&lt;br /&gt;&amp;nbsp; lcd.clear();&lt;br /&gt;&amp;nbsp; lcd.printIn("Message Deleted");&lt;br /&gt;&amp;nbsp; MsgNumber--;&lt;br /&gt;&amp;nbsp; delay(250);&lt;br /&gt;&amp;nbsp; CallMsg();&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;if ((key == 1) &amp;amp;&amp;amp; (ConnectedState == false)){&lt;br /&gt;&amp;nbsp;&amp;nbsp; //Serial.println("Not Connected!!");&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; NotConnectedError();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; } &lt;br /&gt;&lt;br /&gt;if ((key == 1)&amp;nbsp; &amp;amp;&amp;amp; (DelMode != true) &amp;amp;&amp;amp; (ConnectedState == true)) {&lt;br /&gt;&amp;nbsp; //If we are connected AND not in delete mode, then disply email info&lt;br /&gt;&amp;nbsp; ButtonMillis = millis();&lt;br /&gt;&amp;nbsp; GetTotalMsgs();&lt;br /&gt;&amp;nbsp; delay(200);&lt;br /&gt;&amp;nbsp; //Serial.println("UP button push detected");&lt;br /&gt;&amp;nbsp; MsgNumber--; //decrements the message number&lt;br /&gt;&amp;nbsp; if (MsgNumber &amp;lt;= 1){ //If we decrement down to 1, then go to the highest message number&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MsgNumber = MsgTotalNum;&lt;br /&gt;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp; //Serial.print("Total Messages = ");&lt;br /&gt;&amp;nbsp;&amp;nbsp; //Serial.println(MsgTotalNum);&lt;br /&gt;&amp;nbsp;&amp;nbsp; delay(150);&lt;br /&gt;&amp;nbsp;&amp;nbsp; CallMsg();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&lt;br /&gt;if ((key == 1) &amp;amp;&amp;amp; (DelMode == true)&amp;amp;&amp;amp; (ConnectedState == true)){&lt;br /&gt;&amp;nbsp; //If we're in delete mode, then this cancels the deletion.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ButtonMillis = millis();&lt;br /&gt;&amp;nbsp; //Serial.println("UP button push detected");&lt;br /&gt;&amp;nbsp; //Serial.print("Cancelling deletion");&lt;br /&gt;&amp;nbsp; //Serial.println(MsgNumber);&lt;br /&gt;&amp;nbsp;&amp;nbsp; //Serial.println("DelMode is set to false");&lt;br /&gt;&amp;nbsp; DelMode = false;&lt;br /&gt;&amp;nbsp; delay(200);&lt;br /&gt;&amp;nbsp; lcd.clear();&lt;br /&gt;&amp;nbsp; lcd.printIn("Delete Cancelled");&lt;br /&gt;&amp;nbsp; CallMsg();&lt;br /&gt;&amp;nbsp; }&lt;br /&gt;&lt;br /&gt;if ((key == 0) &amp;amp;&amp;amp; (ConnectedState == false)){&lt;br /&gt;&amp;nbsp; //Serial.println("Not Connected!!");&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; NotConnectedError();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; } &lt;br /&gt;&lt;br /&gt;if ((key == 0) &amp;amp;&amp;amp; (ConnectedState == true)) {&lt;br /&gt;//Finally, if we are connected then this is the delete button.&lt;br /&gt;&amp;nbsp; DelMode = true; //triggers delete mode&lt;br /&gt;&amp;nbsp; //Serial.println("DelMode is set to True");&lt;br /&gt;&amp;nbsp; //prints instructions for deleting or cancelling.&lt;br /&gt;&amp;nbsp; lcd.clear();&lt;br /&gt;&amp;nbsp; lcd.cursorTo(1,0);&lt;br /&gt;&amp;nbsp; lcd.printIn("Delete Message?");&lt;br /&gt;&amp;nbsp; lcd.cursorTo(2,0);&lt;br /&gt;&amp;nbsp; lcd.printIn("UP=N&amp;nbsp; /&amp;nbsp; DN=Y");&lt;br /&gt;&amp;nbsp; }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;//======================Functions=====================//&lt;br /&gt;&lt;br /&gt;// Convert ADC value to key number&lt;br /&gt;int get_key(unsigned int input)&lt;br /&gt;{&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;int k; &lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;for (k = 0; k &amp;lt; NUM_KEYS; k++)&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;{&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;if (input &amp;lt; adc_key_val[k])&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return k;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;}&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (k &amp;gt;= NUM_KEYS)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; k = -1;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // No valid key pressed&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; return k;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;//Deletes a message&lt;br /&gt;void DelMsg(){&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //Serial.print("Deleting MsgNumber = ");&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //Serial.println(MsgNumber);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; client.print ("D.");&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; client.println(MsgNumber);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; lcd.printIn("Message Deleted");&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; delay(150); &lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;//Sends the command to the PHP script to get the from/subject info for the current message number&lt;br /&gt;void CallMsg(){&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //Serial.print("MsgNumber = ");&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //Serial.println(MsgNumber);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; client.print ("S.");&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; client.println(MsgNumber);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; delay(150); &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; GetFrmSubj();&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;void GetFrmSubj(){&lt;br /&gt;&amp;nbsp; //parses out the from/subject info from the PHP return info&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(finder.find("MSG") == true ){&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //Uses the TextFinder library to locate the from/subject info.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; for (int z = 0; z &amp;lt;= 32; z++) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; delay(20);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; char c = client.read(); &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if ((c &amp;gt; 31) &amp;amp;&amp;amp; (c &amp;lt; 128)){&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SubjRecd[z] = c;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Print2LCD();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; client.flush();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; else if (finder.find("MSG") != true) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //If the from/subj can't be retreived, then display an error.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //Usually a transient authentication error on the PHP side.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //Serial.println("Didn't get it!");&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; lcd.clear();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; lcd.printIn("Error getting Msg");&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; client.flush();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;}&lt;br /&gt;&amp;nbsp;&amp;nbsp; &lt;br /&gt;void Print2LCD(){&lt;br /&gt;&amp;nbsp; //prints the from/subject info to the LCD&lt;br /&gt;&amp;nbsp; lcd.clear();&lt;br /&gt;&amp;nbsp; lcd.cursorTo(1,0);&lt;br /&gt;&amp;nbsp; for (int y = 0; y &amp;lt;= 15; y++) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; lcd.print(SubjRecd[y]);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; //Serial.print(SubjRecd[y]);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp; lcd.cursorTo(2,0);&lt;br /&gt;&amp;nbsp; //Serial.println();&lt;br /&gt;&amp;nbsp; for (int z = 16; z &amp;lt;= 32; z++){&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; lcd.print(SubjRecd[z]);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; //Serial.print(SubjRecd[z]);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp; client.flush();&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;void GetTotalMsgs () {&lt;br /&gt;&amp;nbsp; //Gets the total message number, which is stored as both an array &amp;amp; an integer&lt;br /&gt;&amp;nbsp;&amp;nbsp; client.println("N");&lt;br /&gt;&amp;nbsp;&amp;nbsp; delay(150);&lt;br /&gt;&amp;nbsp;&amp;nbsp; if(finder.find("Total Number of Messages:") == true )&amp;nbsp; {&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; for (int w = 0; w &amp;lt;= 2; w++) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; delay(20);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; char c = client.read(); &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if ((c &amp;gt; 31) &amp;amp;&amp;amp; (c &amp;lt; 128)){&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; TotalMsgCharAr[w] = c;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp; }&lt;br /&gt;&amp;nbsp; MsgTotalNum = atoi(TotalMsgCharAr); //Use ASCII to Integer to convert the array.&lt;br /&gt;&amp;nbsp; }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;void NotConnectedError(){&lt;br /&gt;&amp;nbsp; //Simple error message&lt;br /&gt;&amp;nbsp; lcd.clear();&lt;br /&gt;&amp;nbsp; lcd.cursorTo(1,0);&lt;br /&gt;&amp;nbsp; lcd.printIn("Not Connected"); &lt;br /&gt;&amp;nbsp; lcd.cursorTo(2, 0);&amp;nbsp; //line=2, x=0 &lt;br /&gt;&amp;nbsp; lcd.printIn("Press S to conct");&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;void PrintTotalMsgs(){&lt;br /&gt;&amp;nbsp; //This takes the total message array &amp;amp; prints it to the LCD.&lt;br /&gt;&amp;nbsp; //Note that is will max out at 99 messages&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; lcd.clear();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; lcd.printIn("Number of emails"); &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; lcd.cursorTo(2, 0);&amp;nbsp; //line=2, x=0 &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; //Serial.print("Total messages = ");&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; //Serial.println(MsgTotalNum);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; for (int d = 0; d &amp;lt;= 1; d++){&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if ((TotalMsgCharAr[d] &amp;gt;= 48) &amp;amp;&amp;amp; (TotalMsgCharAr[d] &amp;lt;= 57)){&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; lcd.print(TotalMsgCharAr[d]);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;h2&gt;So what?&lt;/h2&gt;&lt;br /&gt;Well, why bother doing all this since I can, of course, much more easily delete spam from my Inbox with a regular email client or my iPhone? Well, as with my previous Arduino/POP3 interfacing project, I like to have a running visual indication of my email load, and, of course, the stock answer is "Why not? It's my time to waste!". Actually, email is quite lightweight an ubiquitious and so could be easily used for remote control. We web-based control would be more &lt;i&gt;elegant&lt;/i&gt;, but not always accessible via a remote device for whatever reason.&lt;br /&gt;&lt;br /&gt;About 10 years ago I build a device that interfaced with the PC parallel port and then wrote a Visual Basic program that received email and interpreted the subject line to do basic remote control via a couple of solid state relays. It could turn on or off simple AC devices with email and worked like a charm. With an Arduino, you could have a light sensor that then could tell if the light is, in fact, on and send an SMTP message (via the PHP script) to confirm that the action had been taken. &lt;br /&gt;&lt;br /&gt;&lt;h2&gt;Next steps...&lt;/h2&gt;&lt;br /&gt;Next up, I should get this properly working with Gmail - possibly using the PHP classes available for IMAP rather than POP3.I also hope to get one of those new-fangled Wi-fi WiShield things and try to take this wireless!&lt;br /&gt;&lt;br /&gt;Another future project may be to use the Twilio web-based API for voice-enabling applications to interface to an Arduino (check it out &lt;a href="http://www.twilio.com/" id="ipw5" title="here"&gt;here&lt;/a&gt;). I have played with Twilio a bit and using a PHP pre-processor should make it quite easy to interface to an Arduino. This would allow a simple IVR-type remote control &amp;amp; monitoring - "Press 1 to turn on your lights, Press 2 to hear the temperature." I will try and not make it five months between posts!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4454770415619038436-5919521137384140827?l=opensource-torchris.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://opensource-torchris.blogspot.com/feeds/5919521137384140827/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://opensource-torchris.blogspot.com/2010/05/arduino-email-manager-part-3-ardu.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4454770415619038436/posts/default/5919521137384140827'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4454770415619038436/posts/default/5919521137384140827'/><link rel='alternate' type='text/html' href='http://opensource-torchris.blogspot.com/2010/05/arduino-email-manager-part-3-ardu.html' title='Arduino Email Manager - Part 3 - Arduino Code'/><author><name>Torchris</name><uri>http://www.blogger.com/profile/05149708403435853046</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='26' src='http://1.bp.blogspot.com/_Q6HcmhbUwp8/SYHApptPSoI/AAAAAAAAABQ/Ggl9qnbr7gE/S220/altered-clown.jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4454770415619038436.post-2498288738468599870</id><published>2010-05-03T08:45:00.001-07:00</published><updated>2010-05-03T14:52:06.877-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='email'/><category scheme='http://www.blogger.com/atom/ns#' term='LCD Shield'/><category scheme='http://www.blogger.com/atom/ns#' term='php'/><category scheme='http://www.blogger.com/atom/ns#' term='Arduino'/><category scheme='http://www.blogger.com/atom/ns#' term='POP3'/><title type='text'>Arduino Email Manager - Part 2 - The Preprocessor</title><content type='html'>I freely admit that I am not the greatest programmer in the world. Never having been formally trained, my programs tend to be rather loopy and don't include all the error checking they should. This PHP script that I have written is a case in point. It will work with my POP email provider (Rogers in Canada), but it may &lt;b&gt;&lt;u&gt;NOT &lt;/u&gt;&lt;/b&gt;work with your provider! It seems like there are minor variations in the way some POP servers will respond to the standard commands and these can throw off the script slightly. The best bet is to log into your POP server via telnet and carefully watch the messages back and forth.&lt;br /&gt;&lt;br /&gt;Also note that this will support SSL (if you have it set up with your PHP installation) just by putting "ssl:/" in front of the host name and using whatever port number has been assigned - usually 995.You can manually log into an SSL-enabled account using the OpenSSL client available from &lt;a href="http://www.openssl.org/" id="i1_m" title="OpenSSL.org"&gt;OpenSSL.org&lt;/a&gt; instead of telnet. &lt;br /&gt;&lt;br /&gt;At this point, the script &lt;u style="background-color: #ffd966;"&gt;&lt;b&gt;does not support &lt;/b&gt;&lt;/u&gt;&lt;b style="background-color: #ffd966;"&gt;&lt;u&gt;Gmail&lt;/u&gt;&lt;/b&gt;, so don't write to me about that! I have been trying to get it to work and you can definitely log in, but it seems to give inconsistent results and the mail total includes both the inbox and sent folder somehow (which doesn't make sense to me). If anyone out there knows the trick with Gmail, please let me know. I see that there are some PHP classes available for accessing Gmail via IMAP and I will investigate these and post revised code when I can.&lt;br /&gt;&lt;br /&gt;So, how does this script work? The script needs to run on a server with the current version of PHP running. This could be a Mac or a Linux/Windows box or it could be running on a remote webserver - assuming you have all the networking and firewall issues dealt with. There is a new project called Yaler that may help with the networking issues if your script is remotely hosted - check it out &lt;a href="http://yaler.org/" id="gkts" title="here"&gt;here&lt;/a&gt;. You need to start the script before pressing the "Connect" (or Select) button on the Arduino.&lt;br /&gt;&lt;br /&gt;When running, the Preprocessor is a "host" for the requests from the Arduino, but is in turn acting as a "client" to the POP server. It maintains two separate PHP sockets - one to the Arduino and one to the POP server.&lt;br /&gt;&lt;br /&gt;&lt;div id="hqk:" style="text-align: left;"&gt;&lt;div id="rowe" style="text-align: left;"&gt;&lt;img src="http://docs.google.com/File?id=ddxwhmsv_157fq3ww9d8_b" style="height: 213px; width: 510px;" /&gt;&lt;/div&gt;&lt;/div&gt;The script implements a very simple protocol with the Arduino:&lt;br /&gt;&lt;br /&gt;&lt;table border="1" bordercolor="#000000" cellpadding="3" cellspacing="0" height="139" id="n33e" style="width: 1651px;"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style="text-align: center;"&gt;&lt;b&gt;Arduino Sends...&lt;br /&gt;&lt;/b&gt;&lt;/td&gt;&lt;td&gt;&lt;b&gt;Preprocessor returns...&lt;br /&gt;&lt;/b&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style="text-align: center;"&gt;Arduino connects to IP/port&lt;/td&gt;&lt;td&gt;the ASCII "C"&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style="text-align: center;"&gt;N&lt;/td&gt;&lt;td&gt;Current number of emails on the POP server.&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style="text-align: center;"&gt;S.x (where x is an integer)&lt;/td&gt;&lt;td&gt;The from/subject information for email number "x" prefixed with MSG.&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style="text-align: center;"&gt;D.x (where x is an integer)&lt;/td&gt;&lt;td&gt;Deletes email number "x".&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style="text-align: center;"&gt;E&lt;/td&gt;&lt;td&gt;Kills the socket and ends session - currently not implemented.&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;The script also provides the following error messages back (although I am not currently using these on the Arduino):&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;X.1 - Could not open socket to POP server&lt;/li&gt;&lt;li&gt;X.2 - Error from server&lt;/li&gt;&lt;li&gt;X.3 - Authentication failure&lt;/li&gt;&lt;li&gt;X.4 - Bad connection&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;I tend to prefer one letter protocols with the Arduino since it simplifies the text handling on the Arduino side.&lt;br /&gt;&lt;br /&gt;And, without further ado, here is the code...&lt;br /&gt;&lt;br /&gt;&lt;pre class="cpp" name="code"&gt;&amp;lt;?php&lt;br /&gt;&lt;br /&gt;/*&lt;br /&gt;*&amp;nbsp; PHP Pre-processor script for Arduino POP Mail Manager&lt;br /&gt;*&lt;br /&gt;* this is the pre-processor script for use with the Arduino email&lt;br /&gt;* manager described on my blog. Complete description at:&lt;br /&gt;* http://opensourceprojects-torchris.blogspot.com/&lt;br /&gt;*&lt;br /&gt;* This script can be used with SSL enabled POP services by putting&lt;br /&gt;* "ssl:/" infront of the host name. It does NOT currently work with&lt;br /&gt;* GMail POP service.&lt;br /&gt;*&lt;br /&gt;* This code is in the public domain. Please provide credit if it is used&lt;br /&gt;* in another project.&lt;br /&gt;*&lt;br /&gt;* written by Chris Armour, Arpil 30th, 2010&lt;br /&gt;*&lt;br /&gt;*/&lt;br /&gt;&lt;br /&gt;//=============================IP, Port, User Info=================//&lt;br /&gt;//Modify to suit your network.&lt;br /&gt;&lt;br /&gt;define("HOST_POP", "your.popserver..com");&lt;br /&gt;define("PORT_POP", "110");&lt;br /&gt;define("USER_POP", "user.name");&lt;br /&gt;define("PASS_POP", "YourPassword");&lt;br /&gt;//Server settings&lt;br /&gt;$host_ard = "192.168.0.171"; //This is the IP of the server running the script.&lt;br /&gt;$port_ard = "12345"; //Port number being used by the Arduino&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;//==========================Functions===================//&lt;br /&gt;&lt;br /&gt;//GetMailCount grabs the number of emails in the mailbox using the STAT command&lt;br /&gt;function GetMailCount()&lt;br /&gt;{&lt;br /&gt;$fp_pop = fsockopen (HOST_POP, PORT_POP, $errno, $errstr);&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;// if a handle is not returned&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;ob_implicit_flush();&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;if (!$fp_pop)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; echo("Error: could not open socket connection\n");&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return("X.1");&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;else&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // get the welcome message&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $welcome = fgets ($fp_pop, 150);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // check for success code&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (substr($welcome, 0, 3) == "+OK")&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // send username and read response&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; fputs ($fp_pop, "user " . USER_POP . "\n");&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; //fgets($fp_pop, 50);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; // send password and read response&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; fputs ($fp_pop, "pass " . PASS_POP . "\n");&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; $ack = fgets($fp_pop, 50);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; // check for success code&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (substr($ack, 0, 3) == "+OK")&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // send status request and read response&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; fputs ($fp_pop, "STAT\n");&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $status = fgets($fp_pop, 50);&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;if (substr($status, 0, 3) == "+OK")&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // shut down connection&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; fputs ($fp_pop, "QUIT\n");&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; fclose ($fp_pop);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;// error getting status&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; else&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; echo ("Error - server said: $status");&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return("X.2");&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;// auth failure&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;else&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; echo ("Error - server said: $ack");&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return("X.3");&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // bad welcome message&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; else {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; echo ("Error - bad connection string\n");&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return("X.4");&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;// get status string&lt;br /&gt;// split by spaces&lt;br /&gt;$arr = explode(" ", $status);&lt;br /&gt;// the second element contains the total number of messages&lt;br /&gt;echo $arr[3] . " messages in mailbox\n";&lt;br /&gt;$GotMail = $arr[3];&lt;br /&gt;return $GotMail;&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;//GetFromSubj grabs the content of the email MailNumber then passes this back to the main loop for extraction of the From &amp;amp; subject&lt;br /&gt;//You may need to check the output from your POP3 server using telnet to check on the responses. This seems to vary from POP server to POP&lt;br /&gt;//server.&lt;br /&gt;function GetFromSubj($MailNumber){&lt;br /&gt;$fp_pop = fsockopen (HOST_POP, PORT_POP, $errno, $errstr);&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;// if a handle is not returned&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;ob_implicit_flush();&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;if (!$fp_pop)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; echo("Error: could not open socket connection\n");&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return("X.1");&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;else&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // get the welcome message&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $welcome = fgets ($fp_pop, 150);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // check for success code&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (substr($welcome, 0, 3) == "+OK")&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // send username and read response&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; fputs ($fp_pop, "user " . USER_POP . "\n");&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; fgets($fp_pop);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; // send password and read response&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; fputs ($fp_pop, "pass " . PASS_POP . "\n");&lt;br /&gt;&amp;nbsp;&amp;nbsp; $ack = fgets($fp_pop);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; // check for success code&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (substr($ack, 0, 3) == "+OK")&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // send request for email content &amp;amp; read response&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; fputs ($fp_pop, "retr " . $MailNumber . "\n");&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $EmailContent = fread($fp_pop, 4096);&lt;br /&gt;//&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; echo $EmailContent;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;if (substr($EmailContent, 0, 3) == "+OK")&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // shut down connection&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return $EmailContent;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; fputs ($fp_pop, "QUIT\n");&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; fclose ($fp_pop);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;// error getting status&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; else&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; echo ("Error - Server said: $EmailContent");&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return("X.2");&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;// auth failure&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;else&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; echo ("Error - Server said: $ack");&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return("X.3");&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // bad welcome message&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; else&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; echo ("Error - Bad connection string\n");&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return("X.4");&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;//MsgDelete delets message # MailNumber using the dele command&lt;br /&gt;function MsgDelete($MailNumber){&lt;br /&gt;&lt;br /&gt;$fp_pop = fsockopen (HOST_POP, PORT_POP, $errno, $errstr);&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;// if a handle is not returned&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;ob_implicit_flush();&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;if (!$fp_pop)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; echo("Error: could not open socket connection\n");&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return("X.1");&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;else&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // get the welcome message&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $welcome = fgets ($fp_pop, 150);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // check for success code&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (substr($welcome, 0, 3) == "+OK")&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // send username and read response&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; fputs ($fp_pop, "user " . USER_POP . "\n");&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; fgets($fp_pop);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; // send password and read response&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; fputs ($fp_pop, "pass " . PASS_POP . "\n");&lt;br /&gt;&amp;nbsp;&amp;nbsp; $ack = fgets($fp_pop);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; // check for success code&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (substr($ack, 0, 3) == "+OK")&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // send delete command&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; fputs ($fp_pop, "dele " . $MailNumber . "\n");&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $DeleteAck = fgets($fp_pop);&lt;br /&gt;//&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; echo $EmailContent;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;if (substr($DeleteAck, 0, 3) == "+OK")&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // shut down connection&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; echo ("Message " . $MailNumber . " deleted. \n");&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; fputs ($fp_pop, "QUIT\n");&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; fclose ($fp_pop);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;// error getting status&lt;br /&gt;&amp;nbsp;&amp;nbsp; else&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; echo ("Error - Server said: $EmailContent");&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return ("X.2");&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;// auth failure&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;else&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; echo ("Error - Server said: $ack");&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return("X.3");&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // bad welcome message&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; else&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; echo ("Error - Bad connection string\n");&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return("X.4");&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;//=====================Create Socket to listen for Arduino======================//&lt;br /&gt;&lt;br /&gt;ob_implicit_flush();&lt;br /&gt;&lt;br /&gt;//Open socket to listen for Arduino&lt;br /&gt;$socket_ard = socket_create(AF_INET, SOCK_STREAM, 0) or die ("Could not bind to socket\n");&lt;br /&gt;$result_ard = socket_bind($socket_ard, $host_ard, $port_ard) or die("Could not bind to socket\n");&lt;br /&gt;&lt;br /&gt;// start listening for connections&lt;br /&gt;$result_ard = socket_listen($socket_ard, 3) or die("Could not set up socket listener\n");&lt;br /&gt;// accept incoming connections&lt;br /&gt;// spawn another socket to handle communication&lt;br /&gt;$spawn = socket_accept($socket_ard) or die("Could not accept incoming connection\n");&lt;br /&gt;// read client input&lt;br /&gt;socket_write($spawn,"C\n");&lt;br /&gt;echo "Device connected.\n";&lt;br /&gt;&lt;br /&gt;//=====================Main Socket loop======================//&lt;br /&gt;do {&lt;br /&gt;&lt;br /&gt;$input = socket_read($spawn, 2048, PHP_NORMAL_READ) or die("Could not read input\n");&lt;br /&gt;&lt;br /&gt;echo $input;&lt;br /&gt;&lt;br /&gt;if (trim($input[0]) == "N" || trim($input[0]) == "S" || trim($input[0]) == "D" || trim($input[0]) == "E" || trim($input[0]) == "\r\n") {&lt;br /&gt;//Only do anything if N, S, D or E received.&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (trim($input) == "N"){&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // This gets the mailcount using the GetMailCount function.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $MailCount = GetMailCount();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; socket_write($spawn, "Total Number of Messages:" . $MailCount . "@");&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (trim($input[0]) == "S") {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //This gets the from/subject info is an S.num is received.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $MsgNum = explode (".",$input);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //Use explode to break the info from the Arduino into an array.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $MsgNumber = $MsgNum[1];&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //Get the Message number from the array.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; echo ("Value of MsgNumber= " . $MsgNumber . "\n");&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $MsgFromSubj = GetFromSubj($MsgNumber);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //run the function to get the info from the POP server&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if ($MsgFromSubj[0] == "X")&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //If there's an error, write back the server error text.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; socket_write($spawn,$MsgFromSubj);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; else&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $MsgFromLocn = strpos($MsgFromSubj, "From: ");&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $MsgFromName = substr($MsgFromSubj, ($MsgFromLocn + 6), 14);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; print ( "MSG". "F:" . $MsgFromName );&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $MsgSubjLocn = strpos($MsgFromSubj, "Subject: ");&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $MsgSubj = substr($MsgFromSubj, ($MsgSubjLocn + 9), 14);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; echo ("S:" . $MsgSubj );&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; usleep(20000);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; socket_write ($spawn,&amp;nbsp; "MSG" . "F:" . $MsgFromName . "S:" . $MsgSubj . "\n");&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (trim($input[0]) == "D") {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; //This sends the command to delete an email.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $MsgNum = explode (".",$input);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $MsgNumber = $MsgNum[1];&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $MsgDelRet = MsgDelete($MsgNumber);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if ($MsgDelRet[0] == "X")&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; socket_write($spawn,$MsgDelRet ."\n");&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; else&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; socket_write($spawn, "D." . $MsgNum[1]);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (trim($input) == "E"){&lt;br /&gt;&amp;nbsp; //This isn't actually currently used by the Arduino.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; socket_shutdown($spawn, 2);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; usleep(1000);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; socket_close($spawn);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; socket_shutdown($socket_ard, 2);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; usleep(1000);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; socket_close($socket_ard);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; echo "Sockets terminated\n";&lt;br /&gt;&amp;nbsp;//&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; break;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;} while(true);&lt;br /&gt;&lt;br /&gt;?&amp;gt;&lt;/pre&gt;&lt;br /&gt;Note that this code does not provide good handling of disconnect/reconnect nor can it handle multiple connections simultaneously. In other words, if the Arduino is reset, then the script needs to be restarted. Also, if multiple connection requests are received, it will just die. If anyone can improve on this, please make the suggestions.&lt;br /&gt;&lt;br /&gt;Next up will be the Arduino code!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4454770415619038436-2498288738468599870?l=opensource-torchris.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://opensource-torchris.blogspot.com/feeds/2498288738468599870/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://opensource-torchris.blogspot.com/2010/05/arduino-email-manager-part-2.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4454770415619038436/posts/default/2498288738468599870'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4454770415619038436/posts/default/2498288738468599870'/><link rel='alternate' type='text/html' href='http://opensource-torchris.blogspot.com/2010/05/arduino-email-manager-part-2.html' title='Arduino Email Manager - Part 2 - The Preprocessor'/><author><name>Torchris</name><uri>http://www.blogger.com/profile/05149708403435853046</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='26' src='http://1.bp.blogspot.com/_Q6HcmhbUwp8/SYHApptPSoI/AAAAAAAAABQ/Ggl9qnbr7gE/S220/altered-clown.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4454770415619038436.post-8961486254839188059</id><published>2010-05-01T18:13:00.001-07:00</published><updated>2010-05-01T19:14:36.269-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Ethernet Shield'/><category scheme='http://www.blogger.com/atom/ns#' term='Ethernet'/><category scheme='http://www.blogger.com/atom/ns#' term='LCD Shield'/><category scheme='http://www.blogger.com/atom/ns#' term='Arduino'/><category scheme='http://www.blogger.com/atom/ns#' term='POP3'/><category scheme='http://www.blogger.com/atom/ns#' term='DFRobot'/><title type='text'>Arduino Email Manager - Part 1 - Overview</title><content type='html'>I always seem to start every blog entry moaning about how long it's been since the last project I posted and this one is no exception. I think writing this is pushing me to do more complex projects and what with having a life and all, it just takes a long time to get everything done. This project in particular turned out to be quite a bit more difficult than I thought it would be and it has ended up taking me months and months to work out all the kinks. Because of that, I will be breaking up the project description into a couple of entries. This first one will just introduce the project.&lt;br /&gt;&lt;br /&gt;First the obligatory video!&lt;br /&gt;&lt;br /&gt;&lt;object height="525" width="660"&gt;&lt;param name="movie" value="http://www.youtube.com/v/5QPjVjQuoS0&amp;hl=en_GB&amp;fs=1&amp;border=1"&gt;&lt;/param&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;/param&gt;&lt;param name="allowscriptaccess" value="always"&gt;&lt;/param&gt;&lt;embed src="http://www.youtube.com/v/5QPjVjQuoS0&amp;hl=en_GB&amp;fs=1&amp;border=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="660" height="525"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br /&gt;&lt;br /&gt;As explained in the video, this project uses three easily available Arduino components to allow you to:&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;See how many emails you have in your POP3 email account&lt;/li&gt;&lt;li&gt;Review the "from" and "subject" of your email&lt;/li&gt;&lt;li&gt;Delete unwanted emails&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;Here is what it looks like assembled:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div id="n9sh" style="text-align: left;"&gt;&lt;img height="382" src="http://docs.google.com/File?id=ddxwhmsv_151w698frgn_b" width="449" /&gt;&lt;br /&gt;&lt;br /&gt;The system is a sandwich of..&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Arduino Duemilanova&lt;/li&gt;&lt;li&gt;Arduino Ethernet Shield&lt;/li&gt;&lt;li&gt;DFRobot LCD/button shield (available &lt;a href="http://www.robotshop.com/dfrobot-lcd-keypad-shield-arduino-3.html" id="brt4" title="here"&gt;here&lt;/a&gt; from Robotshop among others)&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;I also used some Shield Stacking Headers (&lt;a href="http://www.adafruit.com/index.php?main_page=product_info&amp;amp;cPath=17_21&amp;amp;products_id=85" id="ysok" title="available from Adafruit"&gt;available from Adafruit&lt;/a&gt;) since the LCD shield wouldn't clear the Ethernet jack on the network shield. Here it is disassembled:&lt;br /&gt;&lt;br /&gt;&lt;div id="vdb5" style="text-align: left;"&gt;&lt;img height="845" src="http://docs.google.com/File?id=ddxwhmsv_152gnrxdfhc_b" width="448" /&gt;&lt;br /&gt;&lt;br /&gt;Getting the LCD Shield to work with the Ethernet Shield was a time consuming process. Initially, it looked like there would be no pin conflicts, since the Ethernet Shield uses pins 10, 11, 12 &amp;amp; 13 and the LCD Shield in theory uses &lt;span class="contentText" id="zhle"&gt;5,6,7,8 and 9, but for whatever reason I just couldn't make it work. I did finally find a blog posting by David Delabassee (&lt;a href="http://delabassee.com/blog/?p=40" id="ow40" title="here"&gt;here&lt;/a&gt;) that pointed out that, in fact, the LCD Shield uses more pins than is documented and shows how to modify &lt;i&gt;LCD4Bit_mod.cpp &lt;/i&gt;to remap the pins slightly. Very useful, but it still seemed to blank out for some reason. &lt;br /&gt;&lt;br /&gt;So, I ended up testing &lt;u&gt;every single pin combination&lt;/u&gt; (which took hours) and I finally determined that if the LCD Shield was on digital pin 13, it just wouldn't work for whatever reason (even though, in theory, that pin is not used by the shield). So, just bending back that leg on the LCD Shield took pin 13 out of the circuit and it now works fine. &lt;br /&gt;&lt;br /&gt;I had also wanted to add in one or two LEDs to signal the message count or connected state, but for whatever reason again when I added them in, it just wouldn't work consistently. If anyone has any ideas on how to fix that it would be appreciated!&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;As explained in the video, I have used the five buttons available on the LCD shield to page through the emails and delete any that I don't want.&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div id="q-tt" style="text-align: left;"&gt;&lt;div id="t621" style="text-align: left;"&gt;&lt;img src="http://docs.google.com/File?id=ddxwhmsv_154d2vd9pdr_b" style="height: 377px; width: 408px;" /&gt;&lt;br /&gt;I will post the software in subsequent entries, but for now I will just explain that I decided to go with using a mail "pre-processor" application written in PHP. Originally I wanted to do everything on the Arduino so it would be a complete, stand-alone solution, but, alas, it just proved to be too hard for the Arduino's limited text processing abilities and my small brain. Basically, even with the Duemilanova based on the ATMEGA328, you really can't load a string array with more than a couple of hundred characters before the Arduino locks up. Unfortunately, you need to look through at least the first 1,500 - 2,000 characters to get the "from" and "subject" info I wanted. I looking into using &lt;a href="http://www.arduino.cc/en/Reference/PROGMEM" id="m4fe" title="PROGMEM"&gt;PROGMEM&lt;/a&gt;, but I just couldn't get my head around it (looks like all that fancy "pointer" stuff I can never figure out!). Then there's the &lt;a href="http://arduiniana.org/2009/03/new-flash-library/" id="dqpy" title="Arduiniana Flash library"&gt;Arduiniana Flash library&lt;/a&gt;, but it seems limited to strings you load at the beginning, rather than dynamic strings.&lt;br /&gt;&lt;br /&gt;Finally, I just decided to go with a pre-processor written in PHP. I already know enough PHP to be functional and it is excellent for text processing. When I went to figure out how to do sockets programming with PHP, the first tutorial I found was on writing a script to access a POP3 email server (&lt;a href="http://www.devshed.com/c/a/PHP/Socket-Programming-With-PHP/" id="aa3_" title="check it out"&gt;check it out&lt;/a&gt;)! Using a pre-processor isn't cheating too much. Tom Igoe uses one in Making Things Talk for his "Networked Air Quality Meter" project. Of course, on a much vaster scale, that is essentially how the RIM Blackberry email system works - emails are routed through their preprocessor software which compresses and reroutes them them down to the smartphone.&lt;br /&gt;&lt;br /&gt;That is enough for now. Next up will be the Arduino software &amp;amp; PHP script.&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4454770415619038436-8961486254839188059?l=opensource-torchris.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://opensource-torchris.blogspot.com/feeds/8961486254839188059/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://opensource-torchris.blogspot.com/2010/05/arduino-email-manager-part-1.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4454770415619038436/posts/default/8961486254839188059'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4454770415619038436/posts/default/8961486254839188059'/><link rel='alternate' type='text/html' href='http://opensource-torchris.blogspot.com/2010/05/arduino-email-manager-part-1.html' title='Arduino Email Manager - Part 1 - Overview'/><author><name>Torchris</name><uri>http://www.blogger.com/profile/05149708403435853046</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='26' src='http://1.bp.blogspot.com/_Q6HcmhbUwp8/SYHApptPSoI/AAAAAAAAABQ/Ggl9qnbr7gE/S220/altered-clown.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4454770415619038436.post-3721506822311428166</id><published>2010-01-21T19:34:00.001-08:00</published><updated>2010-01-22T06:06:58.427-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Ethernet Shield'/><category scheme='http://www.blogger.com/atom/ns#' term='adafruit'/><category scheme='http://www.blogger.com/atom/ns#' term='Ethernet'/><category scheme='http://www.blogger.com/atom/ns#' term='servo'/><category scheme='http://www.blogger.com/atom/ns#' term='Arduino'/><category scheme='http://www.blogger.com/atom/ns#' term='networking'/><title type='text'>Arduino Motion Control over Ethernet</title><content type='html'>Watching the numbers on Google Analytics definitely tells me my reading public doesn't care about my welding projects! So, let's get back to the Arduino.&lt;br /&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;When I set up to do my POP3 project, I ended up buying an Arduino Ethernet shield and an Adafruit Ethernet shield plus a Lantronix Xport. Having both, I figured it would be a good challenge to get both talking to each other and the result is this fairly simple project which actually ended up taking a lot of thought. It is loosely based on "Networked Game" project in Tom Igoe's indispensable book "&lt;a href="http://oreilly.com/catalog/9780596510510" id="ycn-" title="Making Things Talk"&gt;Making Things Talk&lt;/a&gt;", but Tom's example does the much harder job of writing everything in the low-level serial commands to the Xport while I am lazy and used the published libraries! The challenge here is that the two network shields have two different Arduino libraries which really don't work quite the same way. Also, the Adafruit library is pretty light on explanation and the &lt;a href="http://www.ladyada.net/make/eshield/examples.html" id="wwg6" title="examples"&gt;examples&lt;/a&gt;&amp;nbsp;provided have no comments in the code!&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Here is the basic setup of this project, basically the accelerometer on the "server" controls two servos on the "client":&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_Q6HcmhbUwp8/S1keP9_7fZI/AAAAAAAAADk/5Zav7aDqEnA/s1600-h/arduino_dwg.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/_Q6HcmhbUwp8/S1keP9_7fZI/AAAAAAAAADk/5Zav7aDqEnA/s320/arduino_dwg.png" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;The servos, of course, could be hooked up to any number of things like the X-Y axis of a camera mount or a motion base for a game of some kind. Conceptually, of course, through the magic of the Internet and with the right networking setup, the client could be in New York and the server in Instanbul. Also, through the miracle of standard IP protocols I can use one make of shield to successfully communicate with another using two totally different libraries!&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Here is a quick video of the rig in action:&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;object height="505" width="640"&gt;&lt;param name="movie" value="http://www.youtube.com/v/AzrZsmLLFps&amp;hl=en_GB&amp;fs=1&amp;"&gt;&lt;/param&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;/param&gt;&lt;param name="allowscriptaccess" value="always"&gt;&lt;/param&gt;&lt;embed src="http://www.youtube.com/v/AzrZsmLLFps&amp;hl=en_GB&amp;fs=1&amp;" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="640" height="505"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Note that the servos jitter slightly when they are hooked up because of slight variations of the analog readings on the accelerometer. I could probably do some averaging to smooth out the readings to eliminate that jitter.&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;The Server&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;The server is actually very simple. I used the Adafruit ADXL335 accelerometer (&lt;a href="http://www.adafruit.com/index.php?main_page=product_info&amp;amp;cPath=35&amp;amp;products_id=163" id="rm1b" title="info"&gt;info&lt;/a&gt;) that is hooked up to the first three analog pins on the Arduino Diecimilia. The Arduino reads and sends out the X, Y and Z axis, but the client only uses the X and Y values because I only have two servos. It would be pretty easy to build support in for all three axes on the client. Apart from the accelerometer, the only other component is the LED that indicates connected or not connected.&lt;br /&gt;&lt;br /&gt;&lt;div id="auaf" style="text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div id="baj6" style="text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div id="qct6" style="text-align: left;"&gt;&lt;div id="qx12" style="text-align: left;"&gt;&lt;img src="http://docs.google.com/File?id=ddxwhmsv_148sq2g72hg_b" style="height: 455px; width: 320px;" /&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;The code is equally simple. It reads the accelerometer and when it receives a "g" from the client it prints out the X, Y &amp;amp; Z readings. When it receives an "x" it ends the session. That's it! Note that this uses the Ethernet.h library distributed with the Arduino software.&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;pre class="cpp" name="code"&gt;* Simple Ethernet Server&lt;br /&gt;*&lt;br /&gt;* A simple server that shows the value of the analog input pins 0 - 2 &lt;br /&gt;* which are connected to an ADXL335 Accelerometer.&lt;br /&gt;&lt;br /&gt;by Chris Armour, Jan 2010&lt;br /&gt;*/&lt;br /&gt;&lt;br /&gt;#include &lt;Ethernet.h&gt;&lt;br /&gt;&lt;br /&gt;byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED }; //Setting the MAC address&lt;br /&gt;byte ip[] = { 192, 168, 0, 177 }; //IP address of the server&lt;br /&gt;int XPin = 0;&lt;br /&gt;int YPin = 1;&lt;br /&gt;int ZPin = 2;&lt;br /&gt;int ValX = 0;&lt;br /&gt;int ValY = 0;&lt;br /&gt;int ValZ = 0;&lt;br /&gt;int ledPin = 9;&lt;br /&gt;char c;&lt;br /&gt;&lt;br /&gt;Server server(54321); //This is the port the server listens on.&lt;br /&gt;&lt;br /&gt;//==============Setup pins, server &amp; serial ===================//&lt;br /&gt;&lt;br /&gt;void setup()&lt;br /&gt;{&lt;br /&gt;Ethernet.begin(mac, ip);&lt;br /&gt;server.begin();&lt;br /&gt;Serial.begin(9600);&lt;br /&gt;pinMode(ledPin, OUTPUT); &lt;br /&gt;digitalWrite(ledPin, LOW);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;//=====================Main loop =============================//&lt;br /&gt;&lt;br /&gt;void loop()&lt;br /&gt;{&lt;br /&gt;digitalWrite(ledPin, LOW); //If there is no client connected the LED is off.&lt;br /&gt;Client client = server.available();&lt;br /&gt;&lt;br /&gt;while (client.connected()) {&lt;br /&gt;&lt;br /&gt;if (client.available()) {&lt;br /&gt;digitalWrite(ledPin, HIGH);  &lt;br /&gt;char c = client.read(); //Read one character at a time.&lt;br /&gt;Serial.print("Value received:  ");&lt;br /&gt;Serial.println(c); &lt;br /&gt;&lt;br /&gt;if (c == 'g') { //"g means "get"&lt;br /&gt;ValX = analogRead(XPin);&lt;br /&gt;ValY = analogRead(YPin);&lt;br /&gt;ValZ = analogRead(ZPin);&lt;br /&gt;Serial.print("Value sent:  ");&lt;br /&gt;Serial.print(ValX);&lt;br /&gt;Serial.print(",");&lt;br /&gt;Serial.print(ValY);&lt;br /&gt;Serial.print(",");&lt;br /&gt;Serial.println(ValZ);&lt;br /&gt;client.print("&gt;");&lt;br /&gt;client.print(ValX);&lt;br /&gt;client.print(",");&lt;br /&gt;client.print(ValY);&lt;br /&gt;client.print(",");&lt;br /&gt;client.println(ValZ);&lt;br /&gt;break;&lt;br /&gt;}&lt;br /&gt;if (c == 'x'){ //x means kill the session.&lt;br /&gt;digitalWrite(ledPin, LOW); //turn off the LED&lt;br /&gt;client.flush();&lt;br /&gt;client.stop();&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;delay(50);&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;The Client&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The client is a slightly more complex beast in that it has a switch to initiate a connection, an LED to indicate the connection state and the servos:&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;img src="http://docs.google.com/File?id=ddxwhmsv_147gs55mfd8_b" style="height: 621px; width: 561px;" /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The code is also somewhat more involved. Part of that is because of using the AF_Xport library from Adafruit which takes a bit more fiddling, but also because the client needs the extra logic to initiate and disengage the connection. The main problem area is on resetting the Xport which doesn't always seem to want to connect on the first try so I had to build a loop in to retry the reset until it connects. This is a bit inelegant, but it looks like others have had this problem too.&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;pre class="cpp" name="code"&gt;/*&lt;br /&gt;A network client based on Adafruit Ethernet Shield using the &lt;br /&gt;Xport ethernet-to-serial adapter. It moves servos based on analog&lt;br /&gt;input from a server with an ADXL335 Accelerometer.&lt;br /&gt;&lt;br /&gt;by Chris Armour, Jan 2010&lt;br /&gt;*/&lt;br /&gt;&lt;br /&gt;#include &lt;NewSoftSerial.h&gt;&lt;br /&gt;#include &lt;AF_XPort.h&gt;&lt;br /&gt;#include &lt;Servo.h&gt;&lt;br /&gt;#define XPORT_RXPIN 2&lt;br /&gt;#define XPORT_TXPIN 3&lt;br /&gt;#define XPORT_RESETPIN 4&lt;br /&gt;#define XPORT_DTRPIN 5&lt;br /&gt;#define XPORT_CTSPIN 6&lt;br /&gt;#define XPORT_RTSPIN 7&lt;br /&gt;#define IPADDR "192.168.0.177" //IP Address of the Arduino Server&lt;br /&gt;#define PORT 54321 //IP port of the server&lt;br /&gt;&lt;br /&gt;AF_XPort xport = AF_XPort(XPORT_RXPIN, XPORT_TXPIN, XPORT_RESETPIN, XPORT_DTRPIN, XPORT_RTSPIN, XPORT_CTSPIN);&lt;br /&gt;&lt;br /&gt;uint8_t ret; //The return variable needs to be formated as a unsigned integer of length 8 bits &lt;br /&gt;int Xval = 0;&lt;br /&gt;int Yval = 0;&lt;br /&gt;int Xservo = 0;&lt;br /&gt;int Yservo = 0;&lt;br /&gt;int buttonPin = 11;&lt;br /&gt;int buttonWas = 0;&lt;br /&gt;int buttonIs = 1;&lt;br /&gt;int ledState = 0; //I believe these are actually flipped 0 = On 1 = off&lt;br /&gt;int ledPin = 13;&lt;br /&gt;boolean ConnectState = false;&lt;br /&gt;char linebuffer[16]; //Very small line buffer because we just need the X-Y readings.&lt;br /&gt;Servo Xservobj;&lt;br /&gt;Servo Yservobj;&lt;br /&gt;int loopCount = 0;&lt;br /&gt;&lt;br /&gt;//===============Setup pins, servo, xport ==========//&lt;br /&gt;void setup()  &lt;br /&gt;{&lt;br /&gt; pinMode(buttonPin, INPUT);&lt;br /&gt; pinMode(ledPin, OUTPUT);&lt;br /&gt; Serial.begin(9600);&lt;br /&gt; xport.begin(9600);&lt;br /&gt; delay(300);&lt;br /&gt; Serial.println("Finished Setup...");&lt;br /&gt; Xservobj.attach(9);&lt;br /&gt; Yservobj.attach(8);&lt;br /&gt; buttonIs = digitalRead(buttonPin);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;//===============Functions===================//&lt;br /&gt;&lt;br /&gt;void getButton() { &lt;br /&gt;  buttonWas = buttonIs; // Set the old state of the button to be the current state since we're creating a new current state. &lt;br /&gt;  buttonIs = digitalRead(buttonPin); //Read the buttong state.&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;void errorBlink(){ //Flash 4 times for an error&lt;br /&gt;     for (int x=0; x &lt;=3; x++){  &lt;br /&gt;   digitalWrite(ledPin, HIGH);  &lt;br /&gt;    delay(100);  &lt;br /&gt;    digitalWrite(ledPin,LOW);  &lt;br /&gt;    delay(100);  &lt;br /&gt;   }  &lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;char * resetXport(){ //Handles the regular reset of the Xport, returns reset errors&lt;br /&gt;        ret = xport.reset();&lt;br /&gt;       switch (ret) {&lt;br /&gt;          case  ERROR_TIMEDOUT: {&lt;br /&gt;           Serial.println("Timed out on reset!");&lt;br /&gt;           errorBlink();&lt;br /&gt;         return 0;&lt;br /&gt;      }&lt;br /&gt;      case ERROR_BADRESP:  {&lt;br /&gt;         Serial.println("Bad response on reset!");&lt;br /&gt;         errorBlink();&lt;br /&gt;         return 0;&lt;br /&gt;    }&lt;br /&gt;  case ERROR_NONE: {&lt;br /&gt;     Serial.println("Reset OK!");&lt;br /&gt;     break;&lt;br /&gt;    }&lt;br /&gt;    default:&lt;br /&gt;      Serial.println("Unknown error");&lt;br /&gt;      errorBlink();&lt;br /&gt;      return 0;&lt;br /&gt;       }&lt;br /&gt;  delay(250);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;char * ConnectToggle(){ //This function turns the connection on or off&lt;br /&gt;  &lt;br /&gt;  if (ledState == 1){ //if the LED is off, then the client is not connected.&lt;br /&gt;  resetXport(); //run the reset function&lt;br /&gt;  ret = xport.connect(IPADDR, PORT);&lt;br /&gt;  switch (ret) { //swtich case handles various error states&lt;br /&gt;    case  ERROR_TIMEDOUT: {&lt;br /&gt;     Serial.println("Timed out on connect");&lt;br /&gt;      ConnectState = false;&lt;br /&gt;      errorBlink();&lt;br /&gt;     return 0;&lt;br /&gt;  }&lt;br /&gt;  case ERROR_BADRESP:  {&lt;br /&gt;     Serial.println("Failed to connect");&lt;br /&gt;      ConnectState = false;&lt;br /&gt;      loopCount++;&lt;br /&gt;      Serial.print("Loop count =");&lt;br /&gt;      Serial.println(loopCount);&lt;br /&gt;      ConnectToggle();&lt;br /&gt;      if (loopCount &gt;  2){  //For reasons I have not been able to figure out, it usually takes two tries to connect    &lt;br /&gt;         errorBlink();&lt;br /&gt;         ConnectState = false;&lt;br /&gt;         break;&lt;br /&gt;  }&lt;br /&gt;  }&lt;br /&gt;  case ERROR_NONE: {&lt;br /&gt;    Serial.println("Connected..."); &lt;br /&gt;    ConnectState = true;&lt;br /&gt;    Serial.println(ConnectState);&lt;br /&gt;    digitalWrite(ledPin, HIGH);&lt;br /&gt;    ledState = 0;&lt;br /&gt;    loopCount = 0;&lt;br /&gt;    break;&lt;br /&gt;  }&lt;br /&gt;  default:&lt;br /&gt;    Serial.println("Unknown error");&lt;br /&gt;     ConnectState = false;&lt;br /&gt;     errorBlink();&lt;br /&gt;    return 0;&lt;br /&gt; }&lt;br /&gt; }&lt;br /&gt;  else { //Toggle off connection&lt;br /&gt;    ledState = 1;&lt;br /&gt;    digitalWrite(ledPin, LOW); //turn OFF the LED&lt;br /&gt;    xport.println("x"); //Send the x command that kills the session.&lt;br /&gt;    delay(100); &lt;br /&gt;    xport.disconnect(); &lt;br /&gt;    Serial.println("Disconnected.");&lt;br /&gt;    ConnectState = false;&lt;br /&gt;  }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;void fetchStuff() { //Gets the linebuffer&lt;br /&gt;   xport.flush(100);&lt;br /&gt;   xport.println("g"); &lt;br /&gt;   ret=xport.readline_timeout(linebuffer, 16, 200); // get first line&lt;br /&gt;   while(ret!=0){&lt;br /&gt;     ret=xport.readline_timeout(linebuffer,16,200);&lt;br /&gt;  }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;void moveServos(){ //Note that the server sends out the X, Y &amp; Z values, but Z is not used. It could be.&lt;br /&gt;   Xval = (((linebuffer[1] - 48) * 100) + ((linebuffer[2] - 48) * 10) + (linebuffer[3] - 48)); //Extract X value &amp; convert the ASCII to integers&lt;br /&gt;//  Serial.print("Xval:  ");&lt;br /&gt;//  Serial.println(Xval, DEC); &lt;br /&gt;  &lt;br /&gt;  Xservo = map(Xval, 275, 425, 0, 180); //Map the range of X values from the server to the servos&lt;br /&gt;   Serial.print("Xservo:  ");&lt;br /&gt;  Serial.println(Xservo, DEC);&lt;br /&gt;  Xservobj.write(Xservo);&lt;br /&gt;  delay(15);  &lt;br /&gt;   &lt;br /&gt;   Yval = (((linebuffer[5] - 48) * 100) + ((linebuffer[6] - 48) * 10) + (linebuffer[7] - 48));//Extract Y value &amp; convert the ASCII to integers&lt;br /&gt;//   Serial.print("Yval:  ");&lt;br /&gt;//   Serial.println(Yval, DEC); &lt;br /&gt;&lt;br /&gt;  Yservo = map(Yval, 275, 425, 0, 180); //Map the range of Y values from the server to the servos&lt;br /&gt;   Serial.print("Yservo:  ");&lt;br /&gt;  Serial.println(Yservo, DEC);&lt;br /&gt;  Yservobj.write(Yservo);&lt;br /&gt;  delay(15);     &lt;br /&gt;}&lt;br /&gt;  &lt;br /&gt;//==============Main loop==================//&lt;br /&gt;&lt;br /&gt;void loop()   { // run over and over again&lt;br /&gt;&lt;br /&gt;getButton(); //Run to check if button has been pressed.&lt;br /&gt;&lt;br /&gt;if((buttonIs == 1) &amp;&amp; (buttonWas == 0)){&lt;br /&gt;  ConnectToggle(); //If there is a change in the button state, toggle the connection on or off.&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;if (ConnectState == true){ //If the client is connected, do some work!!&lt;br /&gt;  fetchStuff();&lt;br /&gt;  moveServos();&lt;br /&gt;  }&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Further work&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The system needs a way to detect dropped connections - possibly using "millis()" to determine if a response or query has taken too long. As well, I really should smooth out those analog readings so the servos don't jitter! As well, I might just build a motion ase of some sort to hook up to the servos so they can do something slightly more cool that just flap their arms.&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;So, that's my first Arduino project in a few months! Thanks for the comments and questions. The site has apparently had over 11,000 hits, which completely amazes me. Please keep the comments and suggestions coming. I think next up will be another Chinese knock-off phone review.&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4454770415619038436-3721506822311428166?l=opensource-torchris.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://opensource-torchris.blogspot.com/feeds/3721506822311428166/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://opensource-torchris.blogspot.com/2010/01/arduino-motion-control-over-ethernet_21.html#comment-form' title='10 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4454770415619038436/posts/default/3721506822311428166'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4454770415619038436/posts/default/3721506822311428166'/><link rel='alternate' type='text/html' href='http://opensource-torchris.blogspot.com/2010/01/arduino-motion-control-over-ethernet_21.html' title='Arduino Motion Control over Ethernet'/><author><name>Torchris</name><uri>http://www.blogger.com/profile/05149708403435853046</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='26' src='http://1.bp.blogspot.com/_Q6HcmhbUwp8/SYHApptPSoI/AAAAAAAAABQ/Ggl9qnbr7gE/S220/altered-clown.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_Q6HcmhbUwp8/S1keP9_7fZI/AAAAAAAAADk/5Zav7aDqEnA/s72-c/arduino_dwg.png' height='72' width='72'/><thr:total>10</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4454770415619038436.post-4146462095711726842</id><published>2009-12-14T19:33:00.001-08:00</published><updated>2009-12-14T19:40:37.728-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='China'/><category scheme='http://www.blogger.com/atom/ns#' term='Gianttech'/><category scheme='http://www.blogger.com/atom/ns#' term='plasma cutter'/><title type='text'>Gianttech Plasma Cutter</title><content type='html'>As mentioned in the previous post, I have bought a plasma cutter a short while ago from the good folks at &lt;a title="http://www.plasmametalcutter.com/" href="http://www.plasmametalcutter.com/" id="wnko"&gt;http://www.plasmametalcutter.com/&lt;/a&gt;. Since I only have 110 service in the garage, I had to opt for the Cut40D model (which is confusingly called the Slice40D on the face of the unit). This model features auto-switching between 110 and 220. It comes with a 220 plug on the end, but it is easy enough to switch it for a 110 style plug. I opted for the 110 20 AMP style plug.&lt;br /&gt;&lt;br /&gt;All in all, it is a very good study unit. It slices through sheet metal like it isn't even there and so far does fine up to at least 1/4" mild steel. I haven't yet tried it out on thicker stock, but I'm not sure if it could go to a full 1/2" or not. Most of my projects are with 1/8" angle iron stock and it blasts through that with no problem. Like welding, you need to watch the safety precautions and it takes some practise to make steady cuts - especially straight lines.&lt;br /&gt;&lt;br /&gt;The Gianttech folks I bought the unit off of were very helpful, however shipping up here to Canada took quite a while, but as a hobbyist I wasn't in a huge hurry. I also bought the package of extra consumables available for the unit since I read that these can be used up quickly. I have had to change the tip once, but I think that is because I fried it when I was learning how to use the unit. Now that I have more practise, I am not noticing much deterioration of the tip or other consumables.&lt;br /&gt;&lt;br /&gt;I also had to upgrade my air compressor to an 8 gallon 2+ HP unit. I ended up buy &lt;a title="this unit" href="http://www.bosstoolsupply.com/index.asp?PageAction=VIEWPROD&amp;amp;ProdID=14665" id="e7.a"&gt;this unit&lt;/a&gt; from Boss Tools. It is a very sturdy compressor that seems to deliver loads of pressure! While the Cut40D comes with a combination air regulator and filter, on the advice of my welding teacher, I also added in an extra filter (&lt;a title="this unit" href="http://www.canadiantire.ca/AST/browse/6/Tools/1/CompressorsAirTools/CompressorFittings/PRD%7E0588125P/Mini%2BGeneral-Purpose%2BFilter.jsp" id="a0mh"&gt;this item&lt;/a&gt;). Apparently, the drier and cleaner the air, the better the cutting and the longer the consumables will last.&lt;br /&gt;&lt;br /&gt;Here is a quick video of the cutter in action (note that I keep calling it the "Slice40D" since that is what the face of the unit says):&lt;br /&gt;&lt;br /&gt;&lt;object width="480" height="385"&gt;&lt;param name="movie" value="http://www.youtube.com/v/LUPo7RA4X1o&amp;amp;hl=en_GB&amp;amp;fs=1&amp;amp;"&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;param name="allowscriptaccess" value="always"&gt;&lt;embed src="http://www.youtube.com/v/LUPo7RA4X1o&amp;amp;hl=en_GB&amp;amp;fs=1&amp;amp;" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="480" height="385"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br /&gt;&lt;br /&gt;I only had a couple of small issues with the unit. Like many Chinese tools, the manual was laughably short. My Lincoln Electric MIG welder came with an encyclopedia compared to the Gianttech cutter! However, what was there was adequate to get started.&lt;br /&gt;&lt;br /&gt;Another issue was that I initially got a lot of air leakage from the hoses connecting the regulator/filter unit to the cutter. First, I replaced the hose clamps and that mostly fixed it, then I replaced the 1/4" NPT-hose barb fitting off of the regulator and that fixed it. Again, pretty small stuff, and I suppose typical of the small "fit and finish" items you find on Chinese tools (my lathe &amp;amp; milling machine also needed minor tweaks). For the money, I am frankly amazed with how well it works. If I were running a full welding shop, I would probably opt for a heavy duty Miller machine or something, but for a "weekend warrior" hobbyist like me it works great!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4454770415619038436-4146462095711726842?l=opensource-torchris.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://opensource-torchris.blogspot.com/feeds/4146462095711726842/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://opensource-torchris.blogspot.com/2009/12/gianttech-plasma-cutter.html#comment-form' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4454770415619038436/posts/default/4146462095711726842'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4454770415619038436/posts/default/4146462095711726842'/><link rel='alternate' type='text/html' href='http://opensource-torchris.blogspot.com/2009/12/gianttech-plasma-cutter.html' title='Gianttech Plasma Cutter'/><author><name>Torchris</name><uri>http://www.blogger.com/profile/05149708403435853046</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='26' src='http://1.bp.blogspot.com/_Q6HcmhbUwp8/SYHApptPSoI/AAAAAAAAABQ/Ggl9qnbr7gE/S220/altered-clown.jpg'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4454770415619038436.post-5756168308957322565</id><published>2009-12-14T19:07:00.001-08:00</published><updated>2009-12-14T19:08:40.387-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='arc welding'/><category scheme='http://www.blogger.com/atom/ns#' term='plasma cutter'/><category scheme='http://www.blogger.com/atom/ns#' term='table'/><title type='text'>Plasma Cutting Table</title><content type='html'>Plasma Cutting Table&lt;br /&gt;&lt;br /&gt;Maintaining my blistering pace of a posting every month or so, here is another project write-up along the metal working lines. I recently bought a Gianttech plasma cutter from the good people at &lt;a title="http://www.plasmametalcutter.com" href="http://www.plasmametalcutter.com/" id="x-wu"&gt;http://www.plasmametalcutter.com&lt;/a&gt; (which I will post about shortly). It became obvious pretty quickly that just cutting things on the edge of the welding table wouldn't work very well - and risked damaging my beautiful 3/16 steel top for the welding table. So, the answer was to build a simple plasma cutting table.&lt;br /&gt;&lt;br /&gt;At it's most basic, a plasma cutting table is just a set of steel slats turned on their end that conduct electricity to the workpiece, but won't interfere with the cutting action because of their thin profile. I decided that the most reasonable design was to go for 1 1/5" slats of 1/8" thick mild steel. I also figured that the grating part of the table would take a lot of abuse from cutting so it would be good to make it so it could be easily turned over and eventually replaced. The basic idea then was to build the grate as one unit, then have it be able to be set onto the base frame to make the completed table. The base frame is made from good ol' 1 1/2" x 1/8" angle iron. The table surface area is 2' x 2'.&lt;br /&gt;&lt;img src="http://www.blogger.com/post-edit.g?blogID=4454770415619038436&amp;amp;postID=5756168308957322565" alt="" /&gt;&lt;div id="ok7x" style="text-align: left;"&gt;&lt;br /&gt;The first parts that I made (which I didn't take pictures of) were two angle iron squares. One makes up the top frame and the other is the cross brace for the legs.&lt;br /&gt;&lt;br /&gt;Here is the construction process for the grate - I just used corner clamps to keep adding in more and more slats. They are positioned just slightly over 1 1/2" apart so they space out evenly:&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div id="jql7" style="text-align: left;"&gt;&lt;img src="http://docs.google.com/File?id=ddxwhmsv_137f5bvxjfz_b" width="432" height="577" /&gt;&lt;br /&gt;&lt;br /&gt;When it was done - and with a bit of grinding and fitting - the grate fit perfectly into the top frame:&lt;br /&gt;&lt;br /&gt;&lt;div id="xlcl" style="text-align: left;"&gt;&lt;img src="http://docs.google.com/File?id=ddxwhmsv_138dt7crqgb_b" width="438" height="329" /&gt;&lt;br /&gt;&lt;br /&gt;Here are the grate, squares and legs waiting for assembly:&lt;br /&gt;&lt;br /&gt;&lt;div id="e16_" style="text-align: left;"&gt;&lt;img src="http://docs.google.com/File?id=ddxwhmsv_139chss22kb_b" width="436" height="582" /&gt;&lt;br /&gt;&lt;br /&gt;...and here is the completed unit:&lt;br /&gt;&lt;br /&gt;&lt;div id="tlwo" style="text-align: left;"&gt;&lt;img src="http://docs.google.com/File?id=ddxwhmsv_140djdd8dgp_b" width="435" height="580" /&gt;&lt;/div&gt;&lt;br /&gt;Ah, the astute observer will notice, why isn't the grate nestled neatly in the top frame the way it was designed? Because i managed to weld it together &lt;u&gt;upside down&lt;/u&gt;! Arrgghh! Another lesson that WELDING IS PERMANENT! Double check everything before reaching for the welding gun. However, I was able to weld some extra angle iron onto the top frame to hold the grate. So, it ends up being an inch or so higher than I might have liked, but otherwise is very usable and the top is still easily replaceable:&lt;br /&gt;&lt;br /&gt;&lt;div id="cjyl" style="text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div id="kag5" style="text-align: left;"&gt;&lt;img src="http://docs.google.com/File?id=ddxwhmsv_142dxk2xxg9_b" width="422" height="563" /&gt;&lt;br /&gt;&lt;br /&gt;Here is the whole welding shop on wheels:&lt;br /&gt;&lt;br /&gt;&lt;div id="cg.2" style="text-align: left;"&gt;&lt;img style="width: 648px; height: 486px;" src="http://docs.google.com/File?id=ddxwhmsv_143cw63xtdr_b" /&gt;&lt;/div&gt;&lt;br /&gt;&lt;/div&gt;It's all stores up nice and compact and when I need to work, I can just swing the welder and cutter out on their trolley.&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4454770415619038436-5756168308957322565?l=opensource-torchris.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://opensource-torchris.blogspot.com/feeds/5756168308957322565/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://opensource-torchris.blogspot.com/2009/12/plasma-cutting-table.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4454770415619038436/posts/default/5756168308957322565'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4454770415619038436/posts/default/5756168308957322565'/><link rel='alternate' type='text/html' href='http://opensource-torchris.blogspot.com/2009/12/plasma-cutting-table.html' title='Plasma Cutting Table'/><author><name>Torchris</name><uri>http://www.blogger.com/profile/05149708403435853046</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='26' src='http://1.bp.blogspot.com/_Q6HcmhbUwp8/SYHApptPSoI/AAAAAAAAABQ/Ggl9qnbr7gE/S220/altered-clown.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4454770415619038436.post-3391154471542599770</id><published>2009-12-05T12:42:00.000-08:00</published><updated>2009-12-05T13:01:18.192-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='mobile'/><category scheme='http://www.blogger.com/atom/ns#' term='Lixin e80'/><category scheme='http://www.blogger.com/atom/ns#' term='China'/><category scheme='http://www.blogger.com/atom/ns#' term='GSM'/><title type='text'>Death of the Lixin e80</title><content type='html'>Well, I suppose it shouldn't come as too much of a surprise that the e80 has already given up the ghost!&lt;br /&gt;&lt;br /&gt;It has been given a couple of good tests lately. A few weeks back a colleague of mine from overseas came over to do some work, so I lent him the e80 along with a &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_0"&gt;pre&lt;/span&gt;-paid Rogers SIM. (Yes, Rogers will, rather reluctantly and with a lot of ifs and buts, sell you just the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_1"&gt;pre&lt;/span&gt;-paid SIM.) In use, my colleague reported very poor battery life and the charger started to smoke rather alarmingly!&lt;br /&gt;&lt;br /&gt;When I got the phone back, it seemed to be just dead. It wouldn't boot up, nothing and I suspected the battery was dead. I then tried getting a real, &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_2"&gt;Nokia&lt;/span&gt; branded BL-4B battery off of eBay (&lt;$10). It seemed to try to charge up, but wouldn't boot, so I decided that since it seemed to be just about dead anyway, I would dismantle the whole thing to see if maybe there was an obvious loose connector or something. I also had another &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_3"&gt;USB&lt;/span&gt; style charger I could use to replace the one that smoked itself!&lt;br /&gt;&lt;br /&gt;The phone wasn't too hard to dismantle completely (sorry, forgot to take a picture) and when disassembled, it would start up just fine. So, after a few tries at reassembling it, I did manage to get it back together and get it working. I ran it for a few weeks and it seemed to be behaving normally, but I just left it running on my desk and I wasn't carrying it around or using much - just testing standby time.&lt;br /&gt;&lt;br /&gt;So, since it seemed to be behaving OK, I decided to take it with me on a business trip to the US and use it with my T-Mobile SIM. Big problems ensued! While the charger didn't catch fire or anything the problem was that the phone would loose it's charge withing less than two or three hours on standby! What was worse is that the battery level indicator wasn't terribly accurate - it would look like it was at 2/3 charged and then 15 minutes later would be dead! Anyway, it is just not &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_4"&gt;usable&lt;/span&gt; to carry a round a phone that may die any minute, so I am going to declare this unit fried and move on.&lt;br /&gt;&lt;br /&gt;Interestingly, a recent article in The Economist (which you can read &lt;a href="http://www.economist.com/businessfinance/displaystory.cfm?story_id=14931575"&gt;here &lt;/a&gt;if you are a subscriber) quotes a Chinese consultant as saying "despite China’s booming exports of grey-market phones, domestic sales have started to fall. Customers have realised that they break easily and come with no guarantees." Still, these folks seem to be very inventive and I suspect they will come back with better quality, functionality and prices - just like the Japanese car manufacturers did in the 1970s and 80s.&lt;br /&gt;&lt;br /&gt;I am, of course, a bit disappointed, but I don't feel terribly ripped off since the original price wasn't too bad and, anyway, my i9 still works just fine. I actually have just purchased the most recent &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_5"&gt;Sciphone&lt;/span&gt; Dream G2 Android phone off of eBay to give that a try! I will write that one up as soon as I receive it.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4454770415619038436-3391154471542599770?l=opensource-torchris.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://opensource-torchris.blogspot.com/feeds/3391154471542599770/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://opensource-torchris.blogspot.com/2009/12/death-of-lixin-e80.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4454770415619038436/posts/default/3391154471542599770'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4454770415619038436/posts/default/3391154471542599770'/><link rel='alternate' type='text/html' href='http://opensource-torchris.blogspot.com/2009/12/death-of-lixin-e80.html' title='Death of the Lixin e80'/><author><name>Torchris</name><uri>http://www.blogger.com/profile/05149708403435853046</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='26' src='http://1.bp.blogspot.com/_Q6HcmhbUwp8/SYHApptPSoI/AAAAAAAAABQ/Ggl9qnbr7gE/S220/altered-clown.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4454770415619038436.post-4841333383325991103</id><published>2009-11-16T08:18:00.001-08:00</published><updated>2009-11-16T08:19:08.803-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='projects'/><category scheme='http://www.blogger.com/atom/ns#' term='MIG'/><category scheme='http://www.blogger.com/atom/ns#' term='arc welding'/><category scheme='http://www.blogger.com/atom/ns#' term='GMAW'/><title type='text'>My Welding Cart</title><content type='html'>Having finished up my welding table, the next step was to have something to actually put my welder on rather than having it sit on the floor. So, I built the following which is based on a plan from "Welding Complete" from Creative Publishing International (available from Amazon &lt;a title="here" href="http://www.amazon.ca/Welding-Complete-Techniques-Project-Instructions/dp/1589234553/ref=sr_1_1?ie=UTF8&amp;amp;s=books&amp;amp;qid=1258386835&amp;amp;sr=8-1" id="vqw_"&gt;here&lt;/a&gt;). However, I needed to modify the original plan to make it a bit wider so my plasma cutter would have a place to stay.&lt;br /&gt;&lt;br /&gt;Here is the drawing- which omits the wheels which were just purchased from the local home center:&lt;br /&gt;&lt;br /&gt;&lt;div id="ia5x" style="text-align: left;"&gt;&lt;div id="ffbg" style="text-align: left;"&gt;&lt;img src="http://docs.google.com/File?id=ddxwhmsv_130g2tcfjfb_b" width="717" height="454" /&gt;&lt;/div&gt;&lt;br /&gt;&lt;/div&gt;I won't bother going through all the build since it was basically the same as the welding table, but one thing I forgot to get a picture of was the correct way to align the upright components for welding, which is like this:&lt;br /&gt;&lt;br /&gt;&lt;div id="aocn" style="text-align: left;"&gt;&lt;img src="http://docs.google.com/File?id=ddxwhmsv_131fns4m6g6_b" width="435" height="580" /&gt;&lt;br /&gt;&lt;br /&gt;Use a carpenter's square to ensure the uprights are at a perfect 90 degrees before welding! I missed this crucial step with one of the legs on my welding table and it will be ever so slightly out of square forever now. Welding is definitely a measure THREE times, cut once, measure TWO MORE TIMES then weld type of process.&lt;br /&gt;&lt;br /&gt;Here is the whole frame before painting. The hooks are to hang cables off of, but I am a bit worried I will be catching my knees on them.&lt;br /&gt;&lt;br /&gt;&lt;div id="lkmz" style="text-align: left;"&gt;&lt;img src="http://docs.google.com/File?id=ddxwhmsv_132gg3htfhf_b" width="528" height="396" /&gt;&lt;br /&gt;&lt;br /&gt;Finally, a good thick coat of tractor green paint covers a multitude of sins! Actually, we have a pool pump in the same garage as the welding gear and occasionally small amounts of chlorine gas seep out and rust steel instantly, so I really need to paint everything to preserve it. I also put the rubber matting on the help protect the finish and provide some extra electrical insulation.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div id="z8p." style="text-align: left;"&gt;&lt;img src="http://docs.google.com/File?id=ddxwhmsv_133ch3wmnd2_b" width="545" height="409" /&gt;&lt;br /&gt;&lt;br /&gt;Here is the whole team! Note that the welding cart is extra wide so the plasma cutter can go beside it.&lt;br /&gt;&lt;br /&gt;&lt;div id="z485" style="text-align: left;"&gt;&lt;img src="http://docs.google.com/File?id=ddxwhmsv_134gzv8tqhh_b" width="550" height="412" /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;Next up... Bringing some order to my chaotic garage and workshop, which is hardly a project worth blogging about! I will be welding up some shelves and cabinets as part of the process and I will post that later. I also promise to get back to the Arduino soon. I have another Ethernet shield I haven't yet got assembled and I really want to look at networking two Arduinos together and having them do something halfway useful!&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4454770415619038436-4841333383325991103?l=opensource-torchris.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://opensource-torchris.blogspot.com/feeds/4841333383325991103/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://opensource-torchris.blogspot.com/2009/11/my-welding-cart.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4454770415619038436/posts/default/4841333383325991103'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4454770415619038436/posts/default/4841333383325991103'/><link rel='alternate' type='text/html' href='http://opensource-torchris.blogspot.com/2009/11/my-welding-cart.html' title='My Welding Cart'/><author><name>Torchris</name><uri>http://www.blogger.com/profile/05149708403435853046</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='26' src='http://1.bp.blogspot.com/_Q6HcmhbUwp8/SYHApptPSoI/AAAAAAAAABQ/Ggl9qnbr7gE/S220/altered-clown.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4454770415619038436.post-7894334292445696097</id><published>2009-11-05T19:52:00.001-08:00</published><updated>2009-11-05T19:54:56.838-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SMAW'/><category scheme='http://www.blogger.com/atom/ns#' term='arc welding'/><category scheme='http://www.blogger.com/atom/ns#' term='table'/><category scheme='http://www.blogger.com/atom/ns#' term='GMAW'/><title type='text'>Welding Table Construction</title><content type='html'>In honour of Monty Python's 40th Anniversary... And now for something completely different!&lt;br /&gt;&lt;br /&gt;I believe way back in the original start of the blog, I explained that I also did a lot of machining including designing &amp;amp; building steam engines a few years ago. I had always meant to take a welding course, and on a whim I decided to finally do that this fall. So, the last few Saturdays I have been struggling out of bed at 6:30 AM to get into to weld with a huge stick welder (Shielded Metal Arc Welding - SWAM) process. Naturally, I have gotten totally obsessed and decided to get a welder for myself!&lt;br /&gt;&lt;br /&gt;Originally, I wanted to get a 240 VAC stick welder, but my friendly neighborhood electrician told me the garage wiring just wasn't up to it, and this is hardly something I want to do inside the house! After some research, I settled on a Lincoln Electric MIG-Pak 140 unit which runs off of regular 120 VAC (similar to &lt;a title="this" href="http://www.mylincolnelectric.com/Catalog/equipmentdatasheet.aspx?p=42420" id="wsg8"&gt;this&lt;/a&gt;) that does Metal Inert Gas arc welding (aka GMAW - Gas-shielded Metal Arc Welding). Fortuitously, it went on a good sale and I picked up a bottle of C02/Argon shielding gas, a leather welders coat and an auto-darkening welding helmet and I was set!&lt;br /&gt;&lt;br /&gt;The technique and setup for the MIG welding is quite different from the big Hobart industrial units I am using in class, but MIG welding is pretty easy to at least pick up the basics of. The good thing with getting used to using the big welder in class is it gives you a very healthy respect for all the safety precautions and you get all the good theory on how everything is supposed to work and the various types of welds as well as the good advice of an experienced instructor.&lt;br /&gt;&lt;br /&gt;So, after fooling around with my welder to get a feel for how it performs with various thicknesses of metal and so on, I decided the first traditional project for a starting welder is to build a metal welding table. I need the extra surface space in the shop and I definitely need a metal surface table for arc welding.&lt;br /&gt;&lt;br /&gt;Step 1 - I worked up a design to get the rough dimensions and the shopping list for the metal store:&lt;br /&gt;&lt;br /&gt;&lt;div id="bn1y" style="text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div id="ioir" style="text-align: left;"&gt;&lt;img src="http://docs.google.com/File?id=ddxwhmsv_125wmmtgqdn_b" width="891" height="698" /&gt;&lt;br /&gt;&lt;br /&gt;This used 1 1/2 inch square tubing for the legs, 1 1/2 angle iron for the frame and 3/16 thick sheet for the table top.&lt;br /&gt;&lt;br /&gt;Step 2 - I bought the table top already cut to size and then cut down the frame and leg pieces from the ten foot lengths I bought. Here are the parts laid out before welding:&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div id="owyt" style="text-align: left;"&gt;&lt;img style="width: 648px; height: 538.25px;" src="http://docs.google.com/File?id=ddxwhmsv_115dh7q5ffd_b" /&gt;&lt;br /&gt;&lt;br /&gt;Step 2 - First I welded the frame that supports the top. The parts were cut mitered and then I put them on some firebricks on the top itself - on the assumption that the top is more level that the old floor of my garage!&lt;br /&gt;&lt;br /&gt;&lt;div id="xofi" style="text-align: left;"&gt;&lt;img src="http://docs.google.com/File?id=ddxwhmsv_126f99khchs_b" width="510" height="681" /&gt;&lt;/div&gt;&lt;br /&gt;Step 3 - With the top frame done, then I welded the plates for the caster wheels to the bottom of the legs:&lt;br /&gt;&lt;br /&gt;&lt;div id="ute-" style="text-align: left;"&gt;&lt;div id="rnop" style="text-align: left;"&gt;&lt;img src="http://docs.google.com/File?id=ddxwhmsv_127gx2wxh2x_b" width="510" height="403" /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;Not too bad MIG welds considering I am just starting out!&lt;br /&gt;&lt;br /&gt;&lt;div id="c3zv" style="text-align: left;"&gt;&lt;img src="http://docs.google.com/File?id=ddxwhmsv_117f6dtcpfm_b" width="511" height="363" /&gt;&lt;br /&gt;&lt;br /&gt;Step 4 - I welded the leg assemblies to the frame assemblies. I wish I had captured the proper way of lining up the legs perfectly perpendicular to the frame! I actually messed up the first leg and it went on &lt;u&gt;slightly &lt;/u&gt;out of true, but the other three legs went on perfectly. You will see later that it's not too bad and the one leg being slightly out won't be too big an impact. Once the legs are welded onto the frame, I needed to grind down the welds on the top of the frame so it would mate properly to the table top:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div id="cbgr" style="text-align: left;"&gt;&lt;img src="http://docs.google.com/File?id=ddxwhmsv_118gkxpk6fx_b" width="509" height="431" /&gt;&lt;br /&gt;&lt;br /&gt;Step 5 - The frame and leg assembly was welded to the top. Here I use an intermittent rather than a continuous weld:&lt;br /&gt;&lt;br /&gt;&lt;div id="l2fp" style="text-align: left;"&gt;&lt;img src="http://docs.google.com/File?id=ddxwhmsv_119dbjqtgf9_b" width="506" height="592" /&gt;&lt;br /&gt;&lt;br /&gt;Step 6 - Roll it out of the shop and paint it! The slats are 1 1/2 inch wide 1/8 thick strapping I added to make a shelf for storing stock and other bits &amp;amp; pieces. Can you tell which leg is slightly out of alignment?&lt;br /&gt;&lt;br /&gt;&lt;div id="sjkb" style="text-align: left;"&gt;&lt;img style="width: 648px; height: 486px;" src="http://docs.google.com/File?id=ddxwhmsv_120gh8k6mgv_b" /&gt;&lt;br /&gt;&lt;br /&gt;Here it is with good double coat of primer:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div id="dlh4" style="text-align: left;"&gt;&lt;img style="width: 648px; height: 486px;" src="http://docs.google.com/File?id=ddxwhmsv_121hcbbctfj_b" /&gt;&lt;br /&gt;&lt;br /&gt;Finally, it got a good heavy coat of Tremclad basic green glossy paint so it looks like a tractor!&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div id="yrmj" style="text-align: left;"&gt;&lt;img style="width: 648px; height: 486px;" src="http://docs.google.com/File?id=ddxwhmsv_1236hhx4mdp_b" /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;A nice substantial first welding project and something very useful for the shop! Next up will be a cart to put the welder on and my new plasma cutter which I should get next week.&lt;br /&gt;&lt;br /&gt;Some day, I will combine the Arduino, welding and maching stuff into one project, promise!&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4454770415619038436-7894334292445696097?l=opensource-torchris.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://opensource-torchris.blogspot.com/feeds/7894334292445696097/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://opensource-torchris.blogspot.com/2009/11/welding-table-construction.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4454770415619038436/posts/default/7894334292445696097'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4454770415619038436/posts/default/7894334292445696097'/><link rel='alternate' type='text/html' href='http://opensource-torchris.blogspot.com/2009/11/welding-table-construction.html' title='Welding Table Construction'/><author><name>Torchris</name><uri>http://www.blogger.com/profile/05149708403435853046</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='26' src='http://1.bp.blogspot.com/_Q6HcmhbUwp8/SYHApptPSoI/AAAAAAAAABQ/Ggl9qnbr7gE/S220/altered-clown.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4454770415619038436.post-821956888661318565</id><published>2009-09-29T18:39:00.003-07:00</published><updated>2009-09-29T18:45:35.150-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='i9'/><category scheme='http://www.blogger.com/atom/ns#' term='MKT6205'/><category scheme='http://www.blogger.com/atom/ns#' term='Lixin'/><category scheme='http://www.blogger.com/atom/ns#' term='unlocked GSM'/><title type='text'>Exporting contacts to Lixin e80 and i9</title><content type='html'>&lt;b&gt;&lt;/b&gt;I recently had a question on my YouTube page about importing contacts into the Lixin phone. Now, I'm &lt;u&gt;NOT &lt;/u&gt;Lixin Tech Support, but I have worked out a way to do this that works for both the i9 &amp;amp; the Lixin e80 phone. I am afraid these only apply to Windows. I have no idea if there is a way to do this on Mac OS or Linux.&lt;br /&gt;&lt;br /&gt;After cruising around the i9 support forum, I found a piece of software called PhoneSuite (available from &lt;a title="here" href="http://www.mediafire.com/download.php?zmmiyznmjz1" id="cizl"&gt;here&lt;/a&gt;). This is a piece of software supposedly from MediaTek that allows communication with the MKT6205 phones similar to phone interface software suites from other manufactures. It allows you (supposedly) to upload your contacts and manage pictures and ring tones on the phone. I have never used these features, but I did figure out the contacts thing.&lt;br /&gt;&lt;br /&gt;Phonesuite doesn't have an install routine, you just run unzip it into a folder somewhere and run Phonesuite.exe. It looks like something that has been whipped up in Java. Anyway, first go to the "Settings" dialog:&lt;br /&gt;&lt;br /&gt;&lt;div id="j13l" style="text-align: left;"&gt;&lt;div id="z36v" style="text-align: left;"&gt;&lt;img style="width: 648px; height: 476.978px;" src="http://docs.google.com/File?id=ddxwhmsv_111fnptw4c9_b" /&gt;&lt;/div&gt;&lt;br /&gt;You need to select the MTK6205 option and whatever COM port the phone is on. To get the phone communicating with PhoneSuite:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Plug in the USB cable from the phone to an available USB on your PC.&lt;/li&gt;&lt;li&gt;Select "COM Port" on the e80 or i9.&lt;/li&gt;&lt;li&gt;In PhoneSuite, select the COM (serial) port your phone is on - usually it will be a number higher than the COM 1 &amp;amp; COM 2 ports which refer to your PC's RS232 port.&lt;/li&gt;&lt;/ol&gt;There is an option to just load the phone book from Outlook. You can try this, but it didn't work for me. When I select this, first Outlook will ask if Phonesuite can access your address book. Once you give permission to allow the access, then I get:&lt;br /&gt;&lt;br /&gt;&lt;div id="k-c1" style="text-align: left;"&gt;&lt;img src="http://docs.google.com/File?id=ddxwhmsv_112g2x5tbf7_b" width="323" height="138" /&gt;&lt;/div&gt;&lt;br /&gt;The application then will completely die! It seems that PhoneSuite dies when it hits any standard phone number characters like "(",")" or "-"!&lt;br /&gt;&lt;br /&gt;After much trial and error, I found that you can import contacts from a CSV file - a comma delimited text file created by a spreadsheet program like Excel.&lt;br /&gt;&lt;br /&gt;First, Export your contacts from Outlook to a CSV file.&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Go to "File" &amp;gt; "Import and Export".&lt;/li&gt;&lt;li&gt;Select Export to a file and click Next.&lt;/li&gt;&lt;li&gt;Select "Comma separated values" - either DOS or Windows, I don't think it matters.&lt;/li&gt;&lt;li&gt;In "Folder to Export" select "Contacts".&lt;/li&gt;&lt;li&gt;Select a file name.&lt;/li&gt;&lt;li&gt;Click "Finish" and it will proceed to export everything to a CSV file.&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;If you look at the file in Excel, you will see that you have loads and loads of headings! Here is a partial list:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Title&lt;/li&gt;&lt;li&gt;First Name&lt;/li&gt;&lt;li&gt;Middle Name&lt;/li&gt;&lt;li&gt;Last Name&lt;/li&gt;&lt;li&gt;Suffix&lt;/li&gt;&lt;li&gt;Company&lt;/li&gt;&lt;li&gt;Department&lt;/li&gt;&lt;li&gt;Job Title&lt;/li&gt;&lt;li&gt;Business Street&lt;/li&gt;&lt;li&gt;Business Street 2&lt;/li&gt;&lt;li&gt;Business Street 3&lt;/li&gt;&lt;li&gt;Business City&lt;/li&gt;&lt;li&gt;and on and on and on...&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;However, PhoneSuite can only accept the following fields:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Name&lt;/li&gt;&lt;li&gt;Mobile&lt;/li&gt;&lt;li&gt;Home&lt;/li&gt;&lt;li&gt;Company&lt;/li&gt;&lt;li&gt;Email&lt;/li&gt;&lt;li&gt;Office&lt;/li&gt;&lt;li&gt;Fax&lt;/li&gt;&lt;li&gt;Birthday&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;This is where it gets tedious! You will need to go into Excel and cut out all the columns you don't need and merge columns like first &amp;amp; last name. What you need to end up with is a spreadsheet that looks like:&lt;br /&gt;&lt;table class="zeroBorder" style="width: 876px; height: 87px;" border="1" cellpadding="0" cellspacing="0"&gt;&lt;br /&gt;&lt;tbody&gt;&lt;tr style="height: 12.75pt;" height="17"&gt;&lt;br /&gt;&lt;td style="height: 12.75pt; width: 71pt;" width="95" height="17"&gt;Name&lt;/td&gt;&lt;br /&gt;&lt;td style="width: 77pt;" width="103"&gt;Mobile&lt;/td&gt;&lt;br /&gt;&lt;td style="width: 88pt;" width="117"&gt;Home&lt;/td&gt;&lt;br /&gt;&lt;td style="width: 88pt;" width="117"&gt;Company&lt;/td&gt;&lt;br /&gt;&lt;td style="width: 116pt;" width="155"&gt;Email&lt;/td&gt;&lt;br /&gt;&lt;td style="width: 91pt;" width="121"&gt;Office&lt;/td&gt;&lt;br /&gt;&lt;td style="width: 74pt;" width="98"&gt;Fax&lt;/td&gt;&lt;br /&gt;&lt;td style="width: 77pt;" width="102"&gt;Birthday&lt;/td&gt;&lt;br /&gt;&lt;/tr&gt;&lt;br /&gt;&lt;tr style="height: 12.75pt;" height="17"&gt;&lt;br /&gt;&lt;td style="height: 12.75pt;" height="17"&gt;Test User&lt;/td&gt;&lt;br /&gt;&lt;td&gt;+15555555555&lt;/td&gt;&lt;br /&gt;&lt;td&gt;+125555555555&lt;/td&gt;&lt;br /&gt;&lt;td&gt;Test Company&lt;/td&gt;&lt;br /&gt;&lt;td&gt;who.are@you.com&lt;/td&gt;&lt;br /&gt;&lt;td&gt;+135555555555&lt;/td&gt;&lt;br /&gt;&lt;td&gt;+145555555555&lt;/td&gt;&lt;br /&gt;&lt;td class="xl22" align="right"&gt;1/4/2004&lt;/td&gt;&lt;br /&gt;&lt;/tr&gt;&lt;br /&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;How do you get rid of the "(",")" &amp;amp; "-"? You need to do a search for these characters and replace them with nothing. Just check the Excel documentation on how to do this.&lt;br /&gt;&lt;br /&gt;Once you have everything cleaned up, save the contacts file as a CSV within Excel. Just go "File" &amp;gt; "Save as" and select "CSV".&lt;br /&gt;&lt;br /&gt;Now, to get it into PhoneSuite and with the phone connected:&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div id="g3bk" style="text-align: left;"&gt;&lt;ul&gt;&lt;li&gt;Click the File icon in the upper left:&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div id="q9oc" style="text-align: left;"&gt;&lt;div id="bd:i" style="text-align: left;"&gt;&lt;img style="width: 648px; height: 486px;" src="http://docs.google.com/File?id=ddxwhmsv_113d5sq4qdb_b" /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div id="oei1" style="text-align: left;"&gt;&lt;ul&gt;&lt;li&gt;Select "Import" and navigate to the CSV file you just created.&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;This should import all your contacts into a "PC Folder" called "Import".&lt;/li&gt;&lt;li&gt;Select all the contacts you just imported and drag them to the "Handset Folder".&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;If everything is set up right, they should all transfer to your i9 or e80 and be accessible. If you get "Invalid Characters" warning, then you have to go back and scrub the file further in Excel and look for pesky tray brackets or dashes!&lt;br /&gt;&lt;br /&gt;It is kludgy, but it does work. For my Samsung T509, I never could figure out a way to do this!&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4454770415619038436-821956888661318565?l=opensource-torchris.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://opensource-torchris.blogspot.com/feeds/821956888661318565/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://opensource-torchris.blogspot.com/2009/09/exporting-contacts-to-lixin-e80-i9_29.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4454770415619038436/posts/default/821956888661318565'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4454770415619038436/posts/default/821956888661318565'/><link rel='alternate' type='text/html' href='http://opensource-torchris.blogspot.com/2009/09/exporting-contacts-to-lixin-e80-i9_29.html' title='Exporting contacts to Lixin e80 and i9'/><author><name>Torchris</name><uri>http://www.blogger.com/profile/05149708403435853046</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='26' src='http://1.bp.blogspot.com/_Q6HcmhbUwp8/SYHApptPSoI/AAAAAAAAABQ/Ggl9qnbr7gE/S220/altered-clown.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4454770415619038436.post-8369107738668472942</id><published>2009-09-08T18:18:00.001-07:00</published><updated>2009-09-08T18:23:11.046-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Ethernet Shield'/><category scheme='http://www.blogger.com/atom/ns#' term='Arduino'/><category scheme='http://www.blogger.com/atom/ns#' term='POP3'/><title type='text'>Further on the POP3 email checker</title><content type='html'>Well, since this project has been a bit of a surpirse hit, I thought I would include a few further notes and refinements.&lt;br /&gt;&lt;br /&gt;This is a small change to the updateClient function that just flashes the LED rapidly four times to indicate the network is down:&lt;br /&gt;&lt;br /&gt;&lt;pre name="code" class="cpp"&gt;&lt;br /&gt;void updateClient() //This function contacts the POP3 server&lt;br /&gt;{&lt;br /&gt;  if ((millis() - updateTimer) &amp;gt; 5000)&lt;br /&gt;  {&lt;br /&gt;    Ethernet.begin(mac, ip);&lt;br /&gt;//    Serial.println("connecting...");&lt;br /&gt;    delay(1000);&lt;br /&gt;    if (client.connect())&lt;br /&gt;    {&lt;br /&gt;//    Serial.println("connected");&lt;br /&gt;    client.println("user Pop.User"); //Insert your usual email login name&lt;br /&gt;    client.println("pass YourPassword"); //And your password here&lt;br /&gt;    client.println("quit");&lt;br /&gt;    client.println();&lt;br /&gt;    clientConnected = true;&lt;br /&gt;    }&lt;br /&gt;    else&lt;br /&gt;    {&lt;br /&gt;//    Serial.println("connection failed");&lt;br /&gt;// Flash four time rapidly to indicate network down.&lt;br /&gt;      for (int x = 0; x &amp;lt; 4; x++){&lt;br /&gt;              digitalWrite(ledPin, HIGH); &lt;br /&gt;              delay(100);                &lt;br /&gt;              digitalWrite(ledPin, LOW);  &lt;br /&gt;              delay(100); &lt;br /&gt;      }&lt;br /&gt;    }&lt;br /&gt;    updateTimer = millis();&lt;br /&gt;  }&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;What is odd is that when I have tried this with another LED it blinks very dimly - even when I move around which digital pin the other LED is coming from. Very odd and I still haven't figured out what is causing that.&lt;br /&gt;&lt;br /&gt;Another thing to watch for is that this assumes that the number of emails comes through in array position 106 &amp;amp; 107 (I then subtract 48 to make the ASCII code into an integer):&lt;br /&gt;&lt;br /&gt;&lt;pre name="code" class="cpp"&gt;&lt;br /&gt;          mailNum1 = inString[106] - 48; //Array position 106 contains the first digit&lt;br /&gt;          mailNum2 = inString[107] - 48; //Array position 107 contains the 2nd digit if it is available&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;This, of course, may vary depending on how many characters there are in your POP3 server name and so on. I would recommend starting with the basic commands for getting the POP3 string back:&lt;br /&gt;&lt;br /&gt;&lt;pre name="code" class="cpp"&gt;&lt;br /&gt;#include &amp;lt;Ethernet.h&amp;gt;&lt;br /&gt;&lt;br /&gt;byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };&lt;br /&gt;byte ip[] = { 192,168,0,172 };&lt;br /&gt;byte server[] = { XXX, XXX, XXX, XXX }; // IP address of your POP3 server&lt;br /&gt;&lt;br /&gt;Client client(server, 110);&lt;br /&gt;&lt;br /&gt;long updateTimer;&lt;br /&gt;boolean clientConnected = false;&lt;br /&gt;&lt;br /&gt;void setup()&lt;br /&gt;{&lt;br /&gt; Serial.begin(9600);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;void loop()&lt;br /&gt;{&lt;br /&gt; updateClient();&lt;br /&gt; checkAvail();&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;void updateClient()&lt;br /&gt;{&lt;br /&gt; if ((millis() - updateTimer) &amp;gt; 10000)&lt;br /&gt; {&lt;br /&gt;   Ethernet.begin(mac, ip);&lt;br /&gt;   Serial.println("connecting...");&lt;br /&gt;   delay(1000);&lt;br /&gt;   if (client.connect())&lt;br /&gt;   {&lt;br /&gt; Serial.println("connected");&lt;br /&gt; client.println("user user.name"); //Insert your usual email login name&lt;br /&gt; client.println("pass YourEmailPassword"); //And your password here&lt;br /&gt; client.println("quit");&lt;br /&gt; client.println();&lt;br /&gt; clientConnected = true;&lt;br /&gt;   }&lt;br /&gt;   else&lt;br /&gt;   {&lt;br /&gt; Serial.println("connection failed");&lt;br /&gt;   }&lt;br /&gt;   updateTimer = millis();&lt;br /&gt; }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;void checkAvail()&lt;br /&gt;{&lt;br /&gt; if (clientConnected)&lt;br /&gt; {&lt;br /&gt;   if (client.available())&lt;br /&gt;   {&lt;br /&gt; char c = client.read();&lt;br /&gt; Serial.print(c);&lt;br /&gt;   }&lt;br /&gt;   if (!client.connected())&lt;br /&gt;   {&lt;br /&gt; Serial.println();&lt;br /&gt; Serial.println("disconnecting.");&lt;br /&gt; client.stop();&lt;br /&gt; clientConnected = false;&lt;br /&gt;   }&lt;br /&gt; }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Then watching the output in the serial window, which will look something like:&lt;br /&gt;&lt;br /&gt;&lt;pre name="code" class="cpp"&gt;&lt;br /&gt;connecting...&lt;br /&gt;connected&lt;br /&gt;+OK hello from popgate 2.43 on pop108.xxx.xxx.xxx.xxx.xxx&lt;br /&gt;+OK password required.&lt;br /&gt;+OK maildrop ready, 0 messages (0 octets) (16335883)&lt;br /&gt;+OK server signing off.&lt;br /&gt;&lt;br /&gt;disconnecting.&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;You can then use this output to figure out the right position in the array for mailNum1 &amp;amp; mailNum2.&lt;br /&gt;&lt;br /&gt;Hope that helps someone out there. It has been very flattering to see how many folks are interested in building this for themselves. As I explained in the first post, once you have the raw number of emails as an integer you can process with Arduino, you can do all sorts of interesting things beyond just flashing and LED!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4454770415619038436-8369107738668472942?l=opensource-torchris.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://opensource-torchris.blogspot.com/feeds/8369107738668472942/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://opensource-torchris.blogspot.com/2009/09/further-on-pop3-email-checker.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4454770415619038436/posts/default/8369107738668472942'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4454770415619038436/posts/default/8369107738668472942'/><link rel='alternate' type='text/html' href='http://opensource-torchris.blogspot.com/2009/09/further-on-pop3-email-checker.html' title='Further on the POP3 email checker'/><author><name>Torchris</name><uri>http://www.blogger.com/profile/05149708403435853046</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='26' src='http://1.bp.blogspot.com/_Q6HcmhbUwp8/SYHApptPSoI/AAAAAAAAABQ/Ggl9qnbr7gE/S220/altered-clown.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4454770415619038436.post-3326023623329505027</id><published>2009-09-03T17:46:00.001-07:00</published><updated>2009-09-03T19:32:40.225-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ATMega328'/><category scheme='http://www.blogger.com/atom/ns#' term='email'/><category scheme='http://www.blogger.com/atom/ns#' term='Ethernet'/><category scheme='http://www.blogger.com/atom/ns#' term='Arduino'/><category scheme='http://www.blogger.com/atom/ns#' term='POP3'/><title type='text'>Arduino POP3 Email Checker</title><content type='html'>Since it turns out people actually occasionally READ this blog, I decided it was time to go back to do an Arduino project and try something different. Since I hadn't done any Arduino work with the Internet before, I decided to try something I thought would be relatively simple - having the Arduino check my email and give me some sort of visual indication of how many emails I have. I started out with:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;a title="A new Arduino Duemilanove with ATMega328 processor" href="http://www.robotshop.ca/arduino-usb-microcontroller-board.html" id="vnqu"&gt;Arduino Duemilanove with ATMega328 processor&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a title="Arduino Ethernetshield" href="http://www.robotshop.ca/arduino-ethernet-shield.html" id="w:n."&gt;Arduino Ethernet shield&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;Both were bought from the good people at Robotshop.ca.&lt;br /&gt;&lt;br /&gt;&lt;img src="http://docs.google.com/File?id=ddxwhmsv_106sx5v8jgb_b" width="431" height="568" /&gt;&lt;br /&gt;&lt;br /&gt;These are just combined with a high intensity LED - which really should have a resistor and will have one eventually!&lt;br /&gt;&lt;br /&gt;&lt;img src="http://docs.google.com/File?id=ddxwhmsv_107ckv7k2dg_b" width="454" height="264" /&gt;&lt;br /&gt;&lt;br /&gt;Here is a quick video - sorry it is a bit murky and the LED is a bit bright!&lt;br /&gt;&lt;br /&gt;&lt;object width="445" height="364"&gt;&lt;param name="movie" value="http://www.youtube.com/v/T1nG-naOe2s&amp;amp;hl=en&amp;amp;fs=1&amp;amp;border=1"&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;param name="allowscriptaccess" value="always"&gt;&lt;embed src="http://www.youtube.com/v/T1nG-naOe2s&amp;amp;hl=en&amp;amp;fs=1&amp;amp;border=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="445" height="364"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br /&gt;&lt;br /&gt;This was actually probably the hardest Arduino code I ever wrote! For one thing, I hadn't done anything substantial with the Arduino for a while and I found I had forgotten much of what I thought I knew. Also, getting the timing right and getting the number of emails out of the return string actually proved pretty difficult. I made things more difficult for myself by trying to use the &lt;a title="String library" href="http://www.arduino.cc/en/Tutorial/TextString" id="gn.0"&gt;String library&lt;/a&gt; (formerly TextString), which for some reason didn't return consistent results and was generally not documented and finicky. Then I found the usual LED 13 wouldn't work properly - perhaps because the Ethernet Shield was interfering with it. All-in-all, this small program must have taken me three weeks to write!&lt;br /&gt;&lt;br /&gt;I did have a bit of help with the code from Digger450 on the Arduino forum in &lt;a href="http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1250892060/8#8"&gt;this exchange&lt;/a&gt;, which I am very grateful for!&lt;br /&gt;&lt;br /&gt;However, now that it is done, this is a nice little demo of Ardunio on the Internet that does do something at least semi-useful. My next extension may be to hook it up to a servo so that it shows my emails on a physical chart or something. I could also use my SparkFun SerialLCD unit to display the subject lines or something.&lt;br /&gt;&lt;br /&gt;Here is the source code:&lt;br /&gt;&lt;br /&gt;&lt;pre name="code" class="cpp"&gt;&lt;br /&gt;/*=================================================&lt;br /&gt;Ethernet POP3 Mail Checker &amp;amp; indicator&lt;br /&gt;&lt;br /&gt;Checks how many messages are waiting on the POP 3 server&lt;br /&gt;and flashed LED on Pin 9 to indicate number of messages.&lt;br /&gt;&lt;br /&gt;It will handle up to 99 messages in the POP3 mailbox.&lt;br /&gt;&lt;br /&gt;Uncomment the serial lines for troubleshooting.&lt;br /&gt;&lt;br /&gt;Copyright by Chris Armour&lt;br /&gt;3 September 2009&lt;br /&gt;http://opensourceprojects-torchris.blogspot.com/&lt;br /&gt;&lt;br /&gt;===================================================*/&lt;br /&gt;&lt;br /&gt;#include &amp;lt;Ethernet.h&amp;gt;&lt;br /&gt;&lt;br /&gt;byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };&lt;br /&gt;byte ip[] = { 192,168,0,167 }; // IP address you wish to assign to Arduino&lt;br /&gt;byte server[] = { XXX, XXX, XXX, XXX }; // IP address of your POP3 server&lt;br /&gt;char inString[165]; // Number of characters to be collected&lt;br /&gt;int i = 0;&lt;br /&gt;int mailNum1 = 0; // First digit of the email number&lt;br /&gt;int mailNum2 = 0; // Second digit&lt;br /&gt;int mailTotal = 0; // Total # of messsage&lt;br /&gt;char d;&lt;br /&gt;int ledPin = 9;&lt;br /&gt;&lt;br /&gt;Client client(server, 110); //The default POP port is 110&lt;br /&gt;&lt;br /&gt;long updateTimer;&lt;br /&gt;boolean clientConnected = false;&lt;br /&gt;&lt;br /&gt;void setup()&lt;br /&gt;{&lt;br /&gt;//  Serial.begin(9600);&lt;br /&gt;pinMode(ledPin, OUTPUT);&lt;br /&gt;digitalWrite(ledPin, LOW);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;void loop()&lt;br /&gt;{&lt;br /&gt;   &lt;br /&gt;updateClient();&lt;br /&gt;d = checkAvail();&lt;br /&gt;if (d &amp;gt;= 10){&lt;br /&gt;getMailNum();&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;/*========================================&lt;br /&gt;        Functions&lt;br /&gt;=========================================*/&lt;br /&gt;&lt;br /&gt;void updateClient() //This function contacts the POP3 server&lt;br /&gt;{&lt;br /&gt;if ((millis() - updateTimer) &amp;gt; 5000)&lt;br /&gt;{&lt;br /&gt; Ethernet.begin(mac, ip);&lt;br /&gt;//    Serial.println("connecting...");&lt;br /&gt; delay(1000);&lt;br /&gt; if (client.connect())&lt;br /&gt; {&lt;br /&gt;//    Serial.println("connected");&lt;br /&gt; client.println("user Your.Name"); //Insert your usual email login name&lt;br /&gt; client.println("pass PassWord"); //And your password here&lt;br /&gt; client.println("quit");&lt;br /&gt; client.println();&lt;br /&gt; clientConnected = true;&lt;br /&gt; }&lt;br /&gt; else&lt;br /&gt; {&lt;br /&gt;//    Serial.println("connection failed");&lt;br /&gt; }&lt;br /&gt; updateTimer = millis();&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;char checkAvail() //This checks if there is data available and returns a char&lt;br /&gt;{&lt;br /&gt;if (clientConnected)&lt;br /&gt;{&lt;br /&gt; if (client.available())&lt;br /&gt; {&lt;br /&gt; char c = client.read();&lt;br /&gt;     return(c);&lt;br /&gt; }&lt;br /&gt; if (!client.connected())&lt;br /&gt; {&lt;br /&gt;//    Serial.println();&lt;br /&gt;//    Serial.println("disconnecting.");&lt;br /&gt; client.stop();&lt;br /&gt; clientConnected = false;&lt;br /&gt; }&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;int getMailNum() //This actually loads the char returned by checkAvail() and puts in into an array&lt;br /&gt;{&lt;br /&gt;inString[i] = d;&lt;br /&gt;i++;&lt;br /&gt;if (i == 165){&lt;br /&gt;   i = 0;&lt;br /&gt;       client.flush();&lt;br /&gt;       mailNum1 = inString[106] - 48; //Array position 106 contains the first digit&lt;br /&gt;       mailNum2 = inString[107] - 48; //Array position 107 contains the 2nd digit if it is available&lt;br /&gt;       if ((mailNum2 &amp;gt;= 0) &amp;amp;&amp;amp; (mailNum2 &amp;lt;= 9)){ //If mailNum2 is present, then it is a two digit mail count&lt;br /&gt;         mailTotal = (mailNum1 * 10) + mailNum2; //when 2 digits are present, multiply the 1st by 10 then add to mailTotal&lt;br /&gt;//            Serial.print("Total emails:  ");&lt;br /&gt;//            Serial.println(mailTotal);&lt;br /&gt;          blinkLED(); //Run the blink function as many times as there are emails&lt;br /&gt;       }&lt;br /&gt;       else {&lt;br /&gt;         if ((mailNum1 &amp;gt;= 0) &amp;amp;&amp;amp; (mailNum1 &amp;lt;= 9)){//if there is only one digit, then that is mailTotal&lt;br /&gt;         mailTotal = mailNum1;&lt;br /&gt;//        Serial.print("Total emails:  ");&lt;br /&gt;//        Serial.println(mailTotal);&lt;br /&gt;         blinkLED(); //Blink the LED&lt;br /&gt;         }&lt;br /&gt;         }&lt;br /&gt;     }&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt;void blinkLED(){ //Blinks the LED for as many times as indicated by mailTotal&lt;br /&gt;         for(int x = mailTotal; x &amp;gt;= 1; x--){&lt;br /&gt;           digitalWrite(ledPin, HIGH);&lt;br /&gt;           delay(200);             &lt;br /&gt;           digitalWrite(ledPin, LOW);&lt;br /&gt;           delay(200);&lt;br /&gt;         }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4454770415619038436-3326023623329505027?l=opensource-torchris.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://opensource-torchris.blogspot.com/feeds/3326023623329505027/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://opensource-torchris.blogspot.com/2009/09/arduino-pop3-email-checker.html#comment-form' title='23 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4454770415619038436/posts/default/3326023623329505027'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4454770415619038436/posts/default/3326023623329505027'/><link rel='alternate' type='text/html' href='http://opensource-torchris.blogspot.com/2009/09/arduino-pop3-email-checker.html' title='Arduino POP3 Email Checker'/><author><name>Torchris</name><uri>http://www.blogger.com/profile/05149708403435853046</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='26' src='http://1.bp.blogspot.com/_Q6HcmhbUwp8/SYHApptPSoI/AAAAAAAAABQ/Ggl9qnbr7gE/S220/altered-clown.jpg'/></author><thr:total>23</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4454770415619038436.post-7077893375791918901</id><published>2009-08-08T11:12:00.001-07:00</published><updated>2009-08-08T18:17:13.481-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Lixin'/><category scheme='http://www.blogger.com/atom/ns#' term='GSM'/><category scheme='http://www.blogger.com/atom/ns#' term='unlocked'/><category scheme='http://www.blogger.com/atom/ns#' term='e80'/><category scheme='http://www.blogger.com/atom/ns#' term='review'/><title type='text'>Lixin e80 GSM Phone Review</title><content type='html'>&lt;h3&gt;Why do this?&lt;br /&gt;&lt;/h3&gt;You know, this &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_0"&gt;reviewing&lt;/span&gt; cheap Chinese &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_1"&gt;GSM&lt;/span&gt; phones could be a whole new area for this blog. This hardly qualifies as "open source", but then it is also an interesting phenomenon. Sure, the phones have laughable manuals, no support and &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_2"&gt;oddball&lt;/span&gt; features, but on the other hand, they do have impressive basic functionality and come at a reasonable price. See my &lt;a title="earlier blog" href="http://opensourceprojects-torchris.blogspot.com/2009/02/cect-i9-phone.html" id="ms8y"&gt;earlier blog&lt;/a&gt; on the i9 on the strange way they are produced. Here is another interesting tidbit from the i9 forums (available &lt;a title="here" href="http://www.i9forum.co.uk/" id="o-i2"&gt;here&lt;/a&gt;, but you need to join the forum to access it) about how the clone phones are made:&lt;br /&gt;&lt;br /&gt;&lt;div style="margin-left: 40px;"&gt;The clone manufacturing business is not done in the primary plant of&lt;br /&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_3"&gt;CECT&lt;/span&gt;, nor in any primary Manufacturing plant. They are made in the&lt;br /&gt;private plants, small and numerous, thus the varying differences in the&lt;br /&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_4"&gt;os&lt;/span&gt;. Before leaving for China we met with Mentor Graphics. They build&lt;br /&gt;the &lt;span class="posthilit"&gt;Nucleus&lt;/span&gt; &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_5"&gt;os&lt;/span&gt; which is the base &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_6"&gt;os&lt;/span&gt; for the phone.  We also met with &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_7"&gt;MediaTek&lt;/span&gt; in &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_8"&gt;Tiawan&lt;/span&gt;, the makers of the MT6225 chip.&lt;br /&gt;&lt;br /&gt;It was very very very difficult to get into an area that actually manufactures the i9. We &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_9"&gt;finaly&lt;/span&gt; did.&lt;br /&gt;&lt;br /&gt;But they are only one of several locations.  And one of several variations.  And many only manufacture one portion of the unit.&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;These phones also give some insight into what Chinese consumers are getting their hands on and how quickly the manufacturers capabilities are growing. In my view, this is like looking at the first generations of &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_10"&gt;Volkswagens&lt;/span&gt;, &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_11"&gt;Toyotas&lt;/span&gt; or &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_12"&gt;Hondas&lt;/span&gt; imported into Western markets - easy to scoff at but potentially a serious game changer!&lt;br /&gt;&lt;br /&gt;Anyway, if there are any readers of this blog who want me to review another phone, just contact me and send it along and I'll have a go. While these units are cheap, I can't afford to buy a new one every week!&lt;br /&gt;&lt;br /&gt;What set this off is that I decided I wanted something smaller that either my i9 or my &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_13"&gt;Samsung&lt;/span&gt; phone that I could use in the US with my T-Mobile &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_14"&gt;pre&lt;/span&gt;-paid SIM card. I trolled through eBay and, as usual, there is a whole crazy &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_15"&gt;eco&lt;/span&gt;system of these kinds of unlocked &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_16"&gt;GSM&lt;/span&gt; phones. I decided against the iPhone "mini" knock-offs (imagine, ripping off a phone that doesn't exist!) and went for just basic voice functionality. After a bit of sifting and sorting, I decided on the "&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_17"&gt;Lixin&lt;/span&gt; e80", which is a nice, small, basic phone.&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;Basics&lt;br /&gt;&lt;/h3&gt;&lt;br /&gt;After placing the order with the usual small, anonymous vendor in &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_18"&gt;Hong&lt;/span&gt; Kong, the unit &lt;u&gt;eventually&lt;/u&gt; arrived. The shipping is free, but you do have to be prepared for about three weeks delivery time. The total cost was around $80 &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_19"&gt;USD&lt;/span&gt;. I could probably have gotten the unit for cheaper, but with the shipping charges it would have worked out the same so I figured this was fair enough.&lt;br /&gt;&lt;br /&gt;Here is a basic shot of the back and front of the phone:&lt;div&gt;&lt;br /&gt;&lt;table class="" id="mdih" border="1" bordercolor="#000000" cellpadding="3" cellspacing="0" width="527" height="459"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;br /&gt;&lt;td&gt;&lt;br /&gt;&lt;div id="oemi" style="text-align: left;"&gt;&lt;img src="http://docs.google.com/File?id=ddxwhmsv_90d6tgccfd_b" width="221" height="413" /&gt;&lt;/div&gt;&lt;br /&gt;&lt;/td&gt;&lt;br /&gt;&lt;td&gt;&lt;img src="http://docs.google.com/File?id=ddxwhmsv_91g45mw3t3_b" width="273" height="408" /&gt;&lt;/td&gt;&lt;br /&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;br /&gt;&lt;/table&gt;&lt;br /&gt;&lt;/div&gt;As usual, good luck trying to find anything from the web about the unit! Going to &lt;a title="www.lixin.com" href="http://www.lixin.com/" id="ao.."&gt;www.lixin.com&lt;/a&gt; &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_20"&gt;yields&lt;/span&gt; an entirely Chinese website and when you run it through &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_21"&gt;Google's&lt;/span&gt; translator, it seems to just be a listing of various enterprises. The packaging isn't too much more help in explaining the features:&lt;br /&gt;&lt;br /&gt;&lt;div id="ogi2" style="text-align: left;"&gt;&lt;img style="width: 648px; height: 271.076px;" src="http://docs.google.com/File?id=ddxwhmsv_102hd3ttqdz_b" /&gt;&lt;br /&gt;&lt;br /&gt;Then, of course, there is the hilariously &lt;a title="Engrish" href="http://www.engrish.com/" id="e4.a"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_22"&gt;Engrish&lt;/span&gt;&lt;/a&gt; manual:&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div id="rphg" style="text-align: left;"&gt;&lt;img src="http://docs.google.com/File?id=ddxwhmsv_101fcdxqhgm_b" width="853" height="637" /&gt;&lt;br /&gt;&lt;br /&gt;There are various feature lists from various vendors selling the phone in Asia and the Middle East, such as:&lt;br /&gt;&lt;br /&gt;&lt;p style="margin-left: 40px;"&gt;&lt;span style="font-size:85%;"&gt;&lt;b&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;Hot Spot&lt;/span&gt;&lt;/b&gt; &lt;/span&gt;&lt;/p&gt;&lt;ul style="margin-left: 40px;"&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;Dual &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_23"&gt;sim&lt;/span&gt; card dual standby&lt;/span&gt; &lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;Dual Camera&lt;/span&gt;&lt;/span&gt; &lt;/li&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_24"&gt;Bluetooth&lt;/span&gt; A2DP&lt;/span&gt; &lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;FM radio(can output voice)&lt;/span&gt;&lt;/span&gt; &lt;/li&gt;&lt;li&gt;&lt;span style="color: rgb(0, 0, 255);font-size:85%;" &gt;Schedule FM record&lt;/span&gt; &lt;/li&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;E-book reader&lt;/span&gt; &lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;MP4,MP3   &lt;/span&gt;  &lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="color: rgb(0, 0, 255);font-size:85%;" &gt;Quad band:&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_25"&gt;GSM&lt;/span&gt;850/900/1800/1900MHZ&lt;/span&gt; &lt;/li&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;Magic voice:change your voice to others&lt;/span&gt;    &lt;/span&gt;&lt;span style="font-size:85%;"&gt; &lt;/span&gt; &lt;/li&gt;&lt;li&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&lt;span style="color: rgb(0, 0, 255);font-size:85%;" &gt;Language :English/French/Spanish/Portuguese/Italian/Turkish/Arabic/Persian&lt;/span&gt;&lt;/span&gt; &lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;That helps a bit, I guess.&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;Out of the box&lt;/h3&gt;&lt;br /&gt;The phone comes with a charger, headphones, spare battery, a sync cable/charger and a highly amusing manual:&lt;br /&gt;&lt;br /&gt;&lt;img src="http://docs.google.com/File?id=ddxwhmsv_98gcqz98dv_b" width="475" height="356" /&gt;&lt;br /&gt;&lt;br /&gt;When I got it, I actually found this was a pretty pleasant form factor, which a nice texture and feel in the hand. The quality of the manufacturing ("fit and finish") is very good really. It's main important features are:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Dual SIM&lt;/li&gt;&lt;li&gt;Quad-band &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_26"&gt;GSM&lt;/span&gt;&lt;/li&gt;&lt;li&gt;Back and front cameras&lt;/li&gt;&lt;li&gt;Built-in flashlight&lt;/li&gt;&lt;li&gt;Micro SD support&lt;/li&gt;&lt;li&gt;FM Radio&lt;/li&gt;&lt;li&gt;MP3 &amp;amp; Video player&lt;/li&gt;&lt;li&gt;The usual voice, &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_27"&gt;SMS&lt;/span&gt; &amp;amp; &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_28"&gt;MMS&lt;/span&gt; support&lt;/li&gt;&lt;li&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_29"&gt;GPRS&lt;/span&gt; data access.&lt;/li&gt;&lt;/ul&gt;A couple more shots:&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;table class="" id="h2f:" border="1" bordercolor="#000000" cellpadding="3" cellspacing="0" width="680" height="439"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;br /&gt;&lt;td width="50%"&gt;&lt;img src="http://docs.google.com/File?id=ddxwhmsv_93g3mf8wck_b" width="316" height="212" /&gt;&lt;br /&gt;&lt;br /&gt;It supports a &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_30"&gt;Nokia&lt;/span&gt; charger jack as well charger jack for small 2mm connectors. Handy if you don't have the right charger around!&lt;br /&gt;&lt;br /&gt;&lt;/td&gt;&lt;br /&gt;&lt;td width="50%"&gt;&lt;img src="http://docs.google.com/File?id=ddxwhmsv_94ck5tvfd2_b" width="306" height="430" /&gt;&lt;br /&gt;&lt;br /&gt;The LED flashlight is pretty bright!&lt;br /&gt;&lt;br /&gt;&lt;/td&gt;&lt;br /&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;br /&gt;&lt;/table&gt;&lt;br /&gt;&lt;/div&gt;&lt;h3&gt;Mandatory video&lt;br /&gt;&lt;/h3&gt;&lt;br /&gt;Here is a video where I run through some of the useful and less useful features:&lt;br /&gt;&lt;br /&gt;&lt;object width="425" height="344"&gt;&lt;param name="movie" value="http://www.youtube.com/v/qSu5x5Ue_QU&amp;amp;hl=en&amp;amp;fs=1&amp;amp;"&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;param name="allowscriptaccess" value="always"&gt;&lt;embed src="http://www.youtube.com/v/qSu5x5Ue_QU&amp;amp;hl=en&amp;amp;fs=1&amp;amp;" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;Operating System&lt;/h3&gt;&lt;br /&gt;The phone appears to run a variant of the &lt;a title="Nucleus OS" href="http://www.mentor.com/products/embedded_software/nucleus_rtos/" id="hv1p"&gt;Nucleus OS&lt;/a&gt; from Mentor Graphics and the flow of most of the menus is somewhat similar to the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_31"&gt;CECT&lt;/span&gt; i9. The processor is the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_32"&gt;MKT&lt;/span&gt;6225, which is a bit underpowered for doing much more than basic features - which is all this phone does. It does ship with two batteries, which is pretty useful if you're going to be away from the charger for a long time. So far, I would say the battery life isn't stellar, but then I haven't really run an specific tests on that.&lt;br /&gt;&lt;br /&gt;The phone seems to have basically no on-board memory, but it will accept standard &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_33"&gt;MicroFlash&lt;/span&gt; cards. Supposedly it will accept up to 16 GB cards, but I'd be surprised. It has no problem reading my 2 GB card.&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;Voice and Data&lt;/h3&gt;The voice quality on the calls seems to be fine so far and reception is at least adequate. The volume in both hand-free and regular mode is quite high (in contrast to my &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_34"&gt;Samsung&lt;/span&gt; T509). In fact, the e80 can be &lt;b&gt;too&lt;/b&gt; loud so you need to watch that you don't hurt your ears!&lt;br /&gt;&lt;br /&gt;It does pair to my Blueant Z9 Bluetooth headset with no problem at all and provides perfectly good Bluetooth voice quality. I don't have any Bluetooth headphones, so I can't test that (yet).&lt;br /&gt;&lt;br /&gt;The dual SIM feature is handy if you are travelling around to places that offer &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_35"&gt;pre&lt;/span&gt;-paid SIM cards or you just want to have one SIM for personal and one for work. You can choose to have both online and able to receive calls at the same time or choose to only &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_36"&gt;receive&lt;/span&gt; calls on one (if you don't want work bugging you!). When you are busy on one SIM, calls into the other roll over to voicemail. What would be cool is if it gave you an indication that you &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_37"&gt;had&lt;/span&gt; a call on the other SIM and allow you to put the first one on hold - or even conference the two &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_38"&gt;SIMs&lt;/span&gt; together! Alas, that will have to wait.&lt;br /&gt;&lt;br /&gt;The phone does support &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_39"&gt;GPRS&lt;/span&gt; data (if you have it turned on your SIM card, that is). I was able to get it working, but it did take a lot of time fiddling with the settings to get it right. You need to do a &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_40"&gt;lot&lt;/span&gt; of Googling around to find the correct settings for your carrier, but I found the Rogers settings documented in various places. The set up is basically the same as those for the i9. The actual performance of the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_41"&gt;GPRS&lt;/span&gt; features seemed pretty poor. After all the fooling around it took to get it working, I would say the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_42"&gt;GPRS&lt;/span&gt; is probably not all that &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_43"&gt;usable&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;&lt;div id="xh9i" style="text-align: left;"&gt;&lt;h3&gt;Size&lt;/h3&gt;&lt;br /&gt;Just to get a sense of the size of the unit, here it is with (L to R) &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_44"&gt;Samsung&lt;/span&gt; T509, &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_45"&gt;Lixin&lt;/span&gt; e80, Real iPhone 3G, &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_46"&gt;CECT&lt;/span&gt; i9:&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div id="gtyw" style="text-align: left;"&gt;&lt;div id="qd0a" style="text-align: left;"&gt;&lt;div id="eu31" style="text-align: left;"&gt;&lt;img style="width: 648px; height: 337.838px;" src="http://docs.google.com/File?id=ddxwhmsv_958vqvv5c4_b" /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;table class="" id="t934" style="color: rgb(0, 0, 0);" border="1" cellpadding="3" cellspacing="0" width="898" height="496"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td width="50%"&gt;This shows the &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_47"&gt;comparison&lt;/span&gt; to the thickness of an iPhone 3G:&lt;br /&gt;&lt;br /&gt;&lt;img src="http://docs.google.com/File?id=ddxwhmsv_99d3r9tjg3_b" width="288" height="487" /&gt;&lt;br /&gt;&lt;/td&gt;&lt;td width="50%"&gt;&lt;div id="i33p" style="text-align: left;"&gt;It has a nice feel in the hand - quite small.&lt;br /&gt;&lt;br /&gt;&lt;img src="http://docs.google.com/File?id=ddxwhmsv_100hgv45wx7_b" width="532" height="460" /&gt;&lt;/div&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;h3&gt;Camera and media:&lt;/h3&gt;&lt;br /&gt;The back and front cameras, as you might expect, are pretty poor. The phone is labelled, improbably, as 8 Mega Pixels, but the best resolution of either camera is 640 x 480. Here area couple of shots at full size from my yard:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div id="rw.q" style="text-align: left;"&gt;&lt;img style="width: 640px; height: 480px;" src="http://docs.google.com/File?id=ddxwhmsv_96dgh3xgfw_b" /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div id="rxlr" style="text-align: left;"&gt;&lt;img style="width: 640px; height: 480px;" src="http://docs.google.com/File?id=ddxwhmsv_97gd9fz2hj_b" /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The multimedia capabilities seem to be &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_48"&gt;adequate&lt;/span&gt;. The FM radio reception is a bit poor - &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_49"&gt;especially&lt;/span&gt; without the headphones (I think these act as an antenna). The ability to record live bits of the radio is interesting. Supposedly the MP3 player supports playback of lyrics.&lt;br /&gt;&lt;br /&gt;It does play back *.3&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_50"&gt;gp&lt;/span&gt; videos stored on the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_51"&gt;microflash&lt;/span&gt; card. I haven't had much luck encoding my own, but the couple of clips that come with the phone aren't too bad. It will record full motion video, but it is quite poor quality.&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;Connecting to a PC and syncing &lt;/h3&gt;&lt;br /&gt;When you hook it up to a &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_52"&gt;USB&lt;/span&gt; port, you are offered three choices:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Mass storage&lt;/li&gt;&lt;li&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_53"&gt;Webcam&lt;/span&gt;&lt;/li&gt;&lt;li&gt;COM port&lt;/li&gt;&lt;/ol&gt;Mass storage allows you to access the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_54"&gt;MicroFlash&lt;/span&gt; card and store files and so on just like a thumb drive. Like the i9, it does have the interesting capability of acting as a &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_55"&gt;webcam&lt;/span&gt; on your PC for use with services like &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_56"&gt;Skype&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;When in the "COM port" mode, it is possible to do a limited amount of syncing of the phone using the same &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_57"&gt;PhoneSuite&lt;/span&gt; software which appears to be from Media &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_58"&gt;Tek&lt;/span&gt;. You can Google to find the software or get it from the i9 forums. I was able to import my contact list, but it took quite a bit of work since the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_59"&gt;PhoneSuite&lt;/span&gt; software would die if it ran into characters it didn't like or blank fields. Basically, I had to export my contacts to &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_60"&gt;CSV&lt;/span&gt; format and then manually massage them until they would import. If anyone is interested enough, I can describe the format. I suspect you can also use it as a tethered data service for &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_61"&gt;GPRS&lt;/span&gt;, but I haven't tested that.&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;Conclusion&lt;/h3&gt;&lt;br /&gt;Let's be clear, this is NO &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_62"&gt;iPHone&lt;/span&gt;! The iPhone, of course, is more of a general purpose mobile computing platform than just a phone, anyway. The e80's  data features are poor, it does not support Java Mobile, so you cannot run other applications or games on it and the features/interface are a bit quirky. However, it also does somethings my iPhone can't (or didn't do until recently):&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Dual SIM&lt;/li&gt;&lt;li&gt;&lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_63"&gt;Removable&lt;/span&gt; battery&lt;/li&gt;&lt;li&gt;Act as a &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_64"&gt;USB&lt;/span&gt; thumb drive&lt;/li&gt;&lt;li&gt;A handy little flashlight that isn't a downlaoded App!&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_65"&gt;MMS&lt;/span&gt; (only available recently on the iPhone via the 3.0 OS)&lt;/li&gt;&lt;li&gt;Back &amp;amp; front cameras&lt;/li&gt;&lt;/ul&gt;The &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_66"&gt;Lixin&lt;/span&gt; e80 is a decent, voice only phone set. One you might buy for your kids or keep around as a secondary phone on a &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_67"&gt;pre&lt;/span&gt;-paid SIM card. What might it point to? Just wait until these guys get a slightly faster processor and Android going!&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4454770415619038436-7077893375791918901?l=opensource-torchris.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://opensource-torchris.blogspot.com/feeds/7077893375791918901/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://opensource-torchris.blogspot.com/2009/08/lixin-e80-gsm-phone-review.html#comment-form' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4454770415619038436/posts/default/7077893375791918901'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4454770415619038436/posts/default/7077893375791918901'/><link rel='alternate' type='text/html' href='http://opensource-torchris.blogspot.com/2009/08/lixin-e80-gsm-phone-review.html' title='Lixin e80 GSM Phone Review'/><author><name>Torchris</name><uri>http://www.blogger.com/profile/05149708403435853046</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='26' src='http://1.bp.blogspot.com/_Q6HcmhbUwp8/SYHApptPSoI/AAAAAAAAABQ/Ggl9qnbr7gE/S220/altered-clown.jpg'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4454770415619038436.post-7800879217264891049</id><published>2009-08-06T17:06:00.001-07:00</published><updated>2009-08-08T11:22:24.197-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='solar heater'/><category scheme='http://www.blogger.com/atom/ns#' term='temperature'/><title type='text'>Temperature Perfrormance</title><content type='html'>I finally have some actual performance data on the first solar cell.&lt;br /&gt;&lt;br /&gt;This is from a test run that I did with 100 litres of water in a black plastic container over about 6 1/2 hours:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;table class="" id="wpto" border="1" bordercolor="#000000" cellpadding="3" cellspacing="0"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td width="20%"&gt;&lt;b&gt;Time&lt;br /&gt;&lt;/b&gt;&lt;/td&gt;&lt;td width="20%"&gt;&lt;b&gt;Water Temp&lt;/b&gt;&lt;/td&gt;&lt;td width="20%"&gt;&lt;b&gt;Outlet Temp&lt;/b&gt;&lt;/td&gt;&lt;td width="20%"&gt;&lt;b&gt;Box Temp&lt;br /&gt;&lt;/b&gt;&lt;/td&gt;&lt;td width="20%"&gt;&lt;b&gt;Ambient&lt;/b&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td width="20%"&gt;11:00:00&lt;/td&gt;&lt;td width="20%"&gt;20 &lt;br /&gt;&lt;/td&gt;&lt;td width="20%"&gt;21.7&lt;/td&gt;&lt;td width="20%"&gt;37 &lt;br /&gt;&lt;/td&gt;&lt;td width="20%"&gt;20&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td width="20%"&gt;12:10:00&lt;/td&gt;&lt;td width="20%"&gt;27 &lt;br /&gt;&lt;/td&gt;&lt;td width="20%"&gt;28.4&lt;br /&gt;&lt;/td&gt;&lt;td width="20%"&gt;30&lt;br /&gt;&lt;/td&gt;&lt;td width="20%"&gt;20&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td width="20%"&gt;13:36:00&lt;/td&gt;&lt;td width="20%"&gt;33&lt;br /&gt;&lt;/td&gt;&lt;td width="20%"&gt;34.4&lt;br /&gt;&lt;/td&gt;&lt;td width="20%"&gt;43.5&lt;br /&gt;&lt;/td&gt;&lt;td width="20%"&gt;22&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td width="20%"&gt;15:00:00&lt;/td&gt;&lt;td width="20%"&gt;36&lt;br /&gt;&lt;/td&gt;&lt;td width="20%"&gt;37.2&lt;br /&gt;&lt;/td&gt;&lt;td width="20%"&gt;47&lt;br /&gt;&lt;/td&gt;&lt;td width="20%"&gt;23&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td width="20%"&gt;17:17:00&lt;/td&gt;&lt;td width="20%"&gt;37.8&lt;br /&gt;&lt;/td&gt;&lt;td width="20%"&gt;37.8&lt;br /&gt;&lt;/td&gt;&lt;td width="20%"&gt;30.5&lt;br /&gt;&lt;/td&gt;&lt;td width="20%"&gt;23&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td width="20%"&gt;18:20:00&lt;/td&gt;&lt;td width="20%"&gt;35.5&lt;br /&gt;&lt;/td&gt;&lt;td width="20%"&gt;35.3&lt;br /&gt;&lt;/td&gt;&lt;td width="20%"&gt;29&lt;br /&gt;&lt;/td&gt;&lt;td width="20%"&gt;22&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;br /&gt;This shows the unit can pick up a fair amount of heat - 17.8 degrees C in around 6 hours. Since 1 Litre of water is equal to 1 Kg of water and it takes 1 Kcal to heat 1 Kg of water 1 degree, this means the system put 1780 Kcal of heat into the water which equals 7,447,520 joules or 2.0687 kilowatt hours.&lt;br /&gt;&lt;br /&gt;This shows the result graphically:&lt;br /&gt;                         &lt;br /&gt;&lt;div id="uj9l" style="text-align: left;"&gt;&lt;img style="width: 587px; height: 392px;" src="http://docs.google.com/File?id=ddxwhmsv_86hrs54kf7_b" /&gt;&lt;br /&gt;What is interesting here is that as soon as the sun goes off of the tubes and box cools down, the system actually starts to radiate heat and &lt;u&gt;&lt;b&gt;cool&lt;/b&gt;&lt;/u&gt; the water!&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;div id="hnp:" style="text-align: left;"&gt;As to whether this would help with the pool situation, the numbers aren't very encouraging! If it can heat 100 litres of water by 17.8°, this means it would heat 1,000 litres by 1.78° and 10,000 litres by only 0.178°! Unfortunately, the pool probably holds 40,000 litres, so even two solar units might only provide 0.112°! Well, I will continue with unit #2 and then see where it goes. I can also work on the positioning and angles for the units as well. Currently they are just pointed roughly South, but it may be worth checking different positions.&lt;br /&gt;&lt;br /&gt;By the way, when I checked how much the 100 litres of water in the container was heated &lt;u&gt;&lt;b&gt;without &lt;/b&gt;&lt;/u&gt;the solar heater it was only one or two degrees, so the unit certainly does something!&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4454770415619038436-7800879217264891049?l=opensource-torchris.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://opensource-torchris.blogspot.com/feeds/7800879217264891049/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://opensource-torchris.blogspot.com/2009/08/temperature-perfrormance.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4454770415619038436/posts/default/7800879217264891049'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4454770415619038436/posts/default/7800879217264891049'/><link rel='alternate' type='text/html' href='http://opensource-torchris.blogspot.com/2009/08/temperature-perfrormance.html' title='Temperature Perfrormance'/><author><name>Torchris</name><uri>http://www.blogger.com/profile/05149708403435853046</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='26' src='http://1.bp.blogspot.com/_Q6HcmhbUwp8/SYHApptPSoI/AAAAAAAAABQ/Ggl9qnbr7gE/S220/altered-clown.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4454770415619038436.post-7601820365820183850</id><published>2009-08-01T19:30:00.001-07:00</published><updated>2009-08-01T19:31:53.550-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='solar heating submersible pump'/><title type='text'>Got it working!</title><content type='html'>Well, after some pause to get the right pump and to have the weather align, the first solar panel now is working - although, as expected, it doesn't actually have the oomph yet to really impact the pool's temperature.&lt;br /&gt;&lt;br /&gt;Here are a few stats from today's run of about 5 hours:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Average pool temperature ran around 22°C - the impact of the cell was negligible.&lt;/li&gt;&lt;li&gt;The internal temperature of the box itself was around 35°C while the unit was running.&lt;/li&gt;&lt;li&gt;The outlet temperature was around 24°C showing that heat was, in fact, transferring to the water.&lt;/li&gt;&lt;li&gt;When I turned it off for an hour or so and then started it up, the water temp was 60°C - which shows it can develop some pretty good heating!&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;I did have to buy a &lt;a title="new pump" href="http://www.canadiantire.ca/AST/browse/8/KitchenBath/Plumbing/WaterPumps/PRD%7E0623557P/Star%2BUtility%2BPump.jsp" id="db8v"&gt;new pump&lt;/a&gt; since my old one was just too small. This one is a nice little 1/4 HP submersible pump that has the benefit of running very quietly. I'm not 100% sure it will be able to pump through three units, but I at least think it will be able to handle two.&lt;br /&gt;&lt;br /&gt;&lt;div id="fzyn" style="text-align: left;"&gt;&lt;img src="http://docs.google.com/File?id=ddxwhmsv_83gkkmr3cq_b" width="446" height="408" /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;This shows the general arrangement. The pump is in the pool and the cell is propped up pointing south. This is just temporary until I prove out the design, then it's up to the roof of the garage.&lt;br /&gt;&lt;br /&gt;&lt;div id="s1:y" style="text-align: left;"&gt;&lt;img src="http://docs.google.com/File?id=ddxwhmsv_80fj3pj2c8_b" width="395" height="526" /&gt;&lt;br /&gt;&lt;br /&gt;Another shot from the front:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div id="ije9" style="text-align: left;"&gt;&lt;img src="http://docs.google.com/File?id=ddxwhmsv_81pz2dhgcv_b" width="395" height="526" /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div id="d6yn" style="text-align: left;"&gt;When I get it a bit more proved in, I'll try running my Arduino monitoring system then have the monitoring system actually turn the pump on and off.&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;The key thing I learned from the run today is that the cell needs to have the air purged out of it before it will run, so I need to hook it to the hose to flush the air and then quickly get the pump hooked up to it. In future, I may have to build an Arduino and solenoid valve based solution to handle the start-up purging automatically.&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4454770415619038436-7601820365820183850?l=opensource-torchris.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://opensource-torchris.blogspot.com/feeds/7601820365820183850/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://opensource-torchris.blogspot.com/2009/08/got-it-working.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4454770415619038436/posts/default/7601820365820183850'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4454770415619038436/posts/default/7601820365820183850'/><link rel='alternate' type='text/html' href='http://opensource-torchris.blogspot.com/2009/08/got-it-working.html' title='Got it working!'/><author><name>Torchris</name><uri>http://www.blogger.com/profile/05149708403435853046</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='26' src='http://1.bp.blogspot.com/_Q6HcmhbUwp8/SYHApptPSoI/AAAAAAAAABQ/Ggl9qnbr7gE/S220/altered-clown.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4454770415619038436.post-1799047128168224320</id><published>2009-07-28T18:17:00.001-07:00</published><updated>2009-07-28T18:20:39.773-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='solar water heating CPVC plexiglas assembly'/><title type='text'>First Full Scale Solar Pool Heater Cell!</title><content type='html'>&lt;div&gt;Good heavens but it has been a long time since I have updated this blog! What will happen to my advertising revenues?&lt;br /&gt;&lt;br /&gt;In this installment, I just wanted to run through the step-by-step of building the first cell of my solar pool heater project. Eventually, I will likely have three of these units and (assuming we ever get any sun this summer) they will bring the water temperature up from the current low 70s F (20s C) to something closer to 80 F (26 C). The construction turned out to be very easy, really, and just used common items from the hardware store. No fancy, high-tolerance machining - just rough &amp;amp; ready carpentry. I'll post a CAD drawing after I have built a couple of them.&lt;br /&gt;&lt;br /&gt;So far I have not been able to get good performance data because of the weather, but a "bucket test" yesterday showed it could get around 20 liters of water up to around 50 C (122 F)! When I have a bit more performance data I will post it. This will just be the construction.&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;1.    Assemble the base.&lt;br /&gt;&lt;br /&gt;I Started off with an 8 foot by 2 foot sheet of plywood - basically half the standard sheet of 4 by 8. This was left over from some of the work we had done in the attic. I added a couple of 1 inch by 2 inch boards across to act as supports and cross bracing:&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;div id="f88c" style="text-align: left;"&gt;&lt;div style="margin-left: 40px;"&gt;&lt;img src="http://docs.google.com/File?id=ddxwhmsv_72hskpkpft_b" width="395" height="527" /&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;2.    Layout the tubing.&lt;br /&gt;&lt;br /&gt;&lt;div style="margin-left: 40px;"&gt;I am using standard 1/2 inch &lt;a title="CPVC" href="http://en.wikipedia.org/wiki/Chlorinated_polyvinyl_chloride" id="ayof"&gt;CPVC&lt;/a&gt; tubing bought from the local home center. The elbows loop the tubes back to provide a complete circuit. There is about 140 feet of tubing in this box. Everything went together very smoothly, but the glue for the CPVC is foul stuff! Even working outdoors it was making me dizzy. Still, goes together super easily and is permanently bonded in &amp;lt;5 minutes. The brackets are just standard 1/2 brackets. They fit the tubing a bit loosely, but I figure that makes sense to handle thermal expansion.&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div id="nx2w" style="text-align: left;"&gt;&lt;br /&gt;&lt;div id="pbno" style="text-align: left; margin-left: 40px;"&gt;&lt;img src="http://docs.google.com/File?id=ddxwhmsv_73cbtwrtdk_b" width="398" height="529" /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div id="rzr4" style="text-align: left;"&gt;3.    Build a box.&lt;br /&gt;&lt;br /&gt;&lt;div style="margin-left: 40px;"&gt;Nothing hard here - just used 1 by 3 inch boards to build up the sides cut out holes for the intake &amp;amp; output.&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div id="iycv" style="text-align: left;"&gt;&lt;div style="margin-left: 40px;"&gt;&lt;img src="http://docs.google.com/File?id=ddxwhmsv_74g3ksckhb_b" width="394" height="523" /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;4.     Paint it black.&lt;br /&gt;&lt;br /&gt;&lt;div style="margin-left: 40px;"&gt;Astute observers will note that black absorbs heat better than white &amp;amp; wood color! This is just some matte black barbecue spray paint I got on sale. This shot shows the size of the unit a bit better. Eight feet is pretty tall actually!&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;div id="x31m" style="text-align: left;"&gt;&lt;div style="margin-left: 40px;"&gt;&lt;img src="http://docs.google.com/File?id=ddxwhmsv_759gsncwdc_b" width="391" height="519" /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;5.    Weather proof paint.&lt;br /&gt;&lt;br /&gt;&lt;div style="margin-left: 40px;"&gt;I put a thick coat of exterior alkyd on the back &amp;amp; sides so that it would be weather proof when eventually mounted on the roof of the garage. I also inadvertently put a pretty good coat on my patio stones!&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;div id="a7dn" style="text-align: left;"&gt;&lt;div style="margin-left: 40px;"&gt;&lt;img src="http://docs.google.com/File?id=ddxwhmsv_76dz8rz4cm_b" width="391" height="522" /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;6.    Finally a 1.4 inch Plexiglas top.&lt;br /&gt;&lt;br /&gt;&lt;div style="margin-left: 40px;"&gt;This will weatherproof the tubes, but I am also assuming somewhat of a "greenhouse effect" to help increase the temperature.&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;div id="edb0" style="text-align: left;"&gt;&lt;div style="margin-left: 40px;"&gt;&lt;img src="http://docs.google.com/File?id=ddxwhmsv_77j7jx8fj_b" width="387" height="516" /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;And here you have it! This is it running it's first "bucket test" on 18 litres or so of water. As I said earlier, it did get the water over 50 degrees Celsius, but it wasn't a good run because of some leakage around the hose clamps.&lt;br /&gt;&lt;br /&gt;&lt;div id="bgn6" style="text-align: left; margin-left: 40px;"&gt;&lt;img src="http://docs.google.com/File?id=ddxwhmsv_78gvt3kkzr_b" width="386" height="515" /&gt;&lt;/div&gt;&lt;br /&gt;I plan to try it with a couple of larger volumes of water just to assess its "performance envelope" and then hook it up to the pool. My guess is it would have a negligible impact on the pool and I will need to wait until its two brothers are built to have it really make a difference!&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4454770415619038436-1799047128168224320?l=opensource-torchris.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://opensource-torchris.blogspot.com/feeds/1799047128168224320/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://opensource-torchris.blogspot.com/2009/07/1st-full-scale-solar-pool-heater-cell.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4454770415619038436/posts/default/1799047128168224320'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4454770415619038436/posts/default/1799047128168224320'/><link rel='alternate' type='text/html' href='http://opensource-torchris.blogspot.com/2009/07/1st-full-scale-solar-pool-heater-cell.html' title='First Full Scale Solar Pool Heater Cell!'/><author><name>Torchris</name><uri>http://www.blogger.com/profile/05149708403435853046</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='26' src='http://1.bp.blogspot.com/_Q6HcmhbUwp8/SYHApptPSoI/AAAAAAAAABQ/Ggl9qnbr7gE/S220/altered-clown.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4454770415619038436.post-3257669709042165122</id><published>2009-05-25T18:55:00.001-07:00</published><updated>2009-05-25T18:56:17.804-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='solar water heating'/><title type='text'>Results of today's run</title><content type='html'>And here is what I got from running the heater all day with 18 litres of water:&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;table class="" id="mpev" border="1" bordercolor="#000000" cellpadding="3" cellspacing="0" width="575" height="138"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td width="25%"&gt;&lt;b&gt;Time&lt;br /&gt;&lt;/b&gt;&lt;/td&gt;&lt;td width="25%"&gt;&lt;b&gt;Ambient Temperature&lt;br /&gt;&lt;/b&gt;&lt;/td&gt;&lt;td width="25%"&gt;&lt;b&gt;Water Temperature&lt;br /&gt;&lt;/b&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td width="25%"&gt;10:15 AM&lt;br /&gt;&lt;/td&gt;&lt;td width="25%"&gt;16°C&lt;br /&gt;&lt;/td&gt;&lt;td width="25%"&gt;14.5°C&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td width="25%"&gt;12:15 PM&lt;br /&gt;&lt;/td&gt;&lt;td width="25%"&gt;21°C&lt;/td&gt;&lt;td width="25%"&gt;30.6°C&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td width="25%"&gt;2:15 PM&lt;br /&gt;&lt;/td&gt;&lt;td width="25%"&gt;21°C&lt;/td&gt;&lt;td width="25%"&gt;37.6°C&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td width="25%"&gt;4:15 PM&lt;br /&gt;&lt;/td&gt;&lt;td width="25%"&gt;22°C&lt;/td&gt;&lt;td width="25%"&gt;38.7°C&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td width="25%"&gt;6:15&lt;br /&gt;&lt;/td&gt;&lt;td width="25%"&gt;19.4°C&lt;/td&gt;&lt;td width="25%"&gt;33°C&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;br /&gt;&lt;div id="nzha" style="text-align: left;"&gt;And for those who think visually:&lt;br /&gt;&lt;br /&gt;&lt;img style="width: 450px; height: 320px;" src="http://docs.google.com/File?id=ddxwhmsv_70cknpmbgr_b" /&gt;&lt;/div&gt;&lt;br /&gt;Not boiling hot, but definitly hot bathwater, which is fine for this run.&lt;br /&gt;&lt;br /&gt;So, there you have it. I may try running it with a larger volume of water to see how that works.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4454770415619038436-3257669709042165122?l=opensource-torchris.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://opensource-torchris.blogspot.com/feeds/3257669709042165122/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://opensource-torchris.blogspot.com/2009/05/results-of-today-run.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4454770415619038436/posts/default/3257669709042165122'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4454770415619038436/posts/default/3257669709042165122'/><link rel='alternate' type='text/html' href='http://opensource-torchris.blogspot.com/2009/05/results-of-today-run.html' title='Results of today&amp;#39;s run'/><author><name>Torchris</name><uri>http://www.blogger.com/profile/05149708403435853046</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='26' src='http://1.bp.blogspot.com/_Q6HcmhbUwp8/SYHApptPSoI/AAAAAAAAABQ/Ggl9qnbr7gE/S220/altered-clown.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4454770415619038436.post-5869305917338575454</id><published>2009-05-24T18:45:00.001-07:00</published><updated>2009-05-24T18:48:36.101-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='solar heater'/><category scheme='http://www.blogger.com/atom/ns#' term='water'/><category scheme='http://www.blogger.com/atom/ns#' term='CPVC'/><title type='text'>Solar Water Heater Prototype</title><content type='html'>&lt;h1&gt;&lt;/h1&gt;Well, it has been a while, hasn't it? Too much work and house stuff have kept me from doing very much for the last few months. This project is a bit of a change since it doesn't actually involve any Arduinos or fancy microcontroller web stuff - just some good old-fashioned basic carpentry and plumbing! No fancy 3-D drawings or source code or nothing. I just eye-balled everything for this project and built it from scraps on the cheap.&lt;br /&gt;&lt;br /&gt;Those one or two who have ever read this blog, will remember that all this started with my freezing cold pool and the need to find a cost-efficient way to raise the water temp a bit. Having worked out most of the Arduino software control issues I need to be concerned with, and with the weather being nice, I have built a small prototype of a solar water heater just to check out the heater characteristics and give me some ideas of just how big the final unit will need to be.&lt;br /&gt;&lt;br /&gt;I decided to build this with CPVC (&lt;span style="font-family:arial;font-size:-1;"&gt;Chlorinated Poly Vinyl Chloride&lt;/span&gt;) tubing, which is cheap and amazingly easy to work with. First I built a collector element our of CPVC:&lt;br /&gt;&lt;br /&gt;&lt;img src="http://docs.google.com/File?id=ddxwhmsv_59c4kz97gw_b" width="511" height="383" /&gt;&lt;br /&gt;&lt;div id="i1ds" style="text-align: left;"&gt;&lt;br /&gt;This is about 2 feet square and is about 10 feet or so of tubing. It really does go together amazingly fast. It probably took me all of an hour to get this cut and assembled. The glue is pretty foul, though! Next time I'll wear gloves.&lt;br /&gt;&lt;br /&gt;This is the collector element installed into it's box:&lt;br /&gt;&lt;br /&gt;&lt;div id="kyk4" style="text-align: left;"&gt;&lt;div id="hnp." style="text-align: left;"&gt;&lt;img src="http://docs.google.com/File?id=ddxwhmsv_65c3t6x7fd_b" width="527" height="501" /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;From there, the collector &amp;amp; box were painted matt black and then got a Plexiglas cover:&lt;br /&gt;&lt;br /&gt;&lt;div id="yx3a" style="text-align: left;"&gt;&lt;div id="dmmj" style="text-align: left;"&gt;&lt;img src="http://docs.google.com/File?id=ddxwhmsv_66f23t4wcd_b" width="546" height="381" /&gt;&lt;/div&gt;&lt;br /&gt;Here it is all set up:&lt;br /&gt;&lt;br /&gt;&lt;div id="skp7" style="text-align: left;"&gt;&lt;div id="nrm9" style="text-align: left;"&gt;&lt;img src="http://docs.google.com/File?id=ddxwhmsv_68f8t7b5dw_b" width="541" height="630" /&gt;&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;The water is circulated via a small submersible pump I bought off of eBay (&lt;a title="click here for description" href="http://cgi.ebay.ca/ws/eBayISAPI.dll?ViewItem&amp;amp;ssPageName=STRK:MEWNX:IT&amp;amp;item=260386082500" id="rgnx"&gt;click here for description&lt;/a&gt;). It actually moves a pretty good volume of water - it's rated at 200 gallons per hour. It still feels odd &lt;u&gt;plugging in&lt;/u&gt; something underwater!!&lt;br /&gt;&lt;br /&gt;&lt;div id="jvwa" style="text-align: left;"&gt;&lt;div id="sq_5" style="text-align: left;"&gt;&lt;img src="http://docs.google.com/File?id=ddxwhmsv_67ct4hd2gc_b" width="538" height="486" /&gt;&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;So, does it work??&lt;br /&gt;&lt;br /&gt;For a very small prototype, it does work quite well. When I filled up the collector with water and let it sit in the sun with no circulation, it heated the litre or so of water in the tubes up to 49°C (120°F) in half an hour. The water was too hot to put my hand into!&lt;br /&gt;&lt;br /&gt;With the circulating pump running, it heated 14 litres of water from 18°C (65°F) to 29°C (85°F) in 90 minutes. This was in late afternoon sun (between 5PM and 6:30 PM) so that is probably on the low end of its performance. I'm going to do more testing tomorrow in full sun earlier in the day and see just how hot it will go. I will also have to do some Googling to find the formulae that say how many calories or energy this is and so on.&lt;br /&gt;&lt;br /&gt;Presumably from this I can make some determination about how this would scale up to larger sizes and if a reasonable sized rig (i.e., one that is not too big to build or install - probably 10 times the size of this unit) would have any appreciable impact on the temperature of the pool, which is where this all started!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4454770415619038436-5869305917338575454?l=opensource-torchris.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://opensource-torchris.blogspot.com/feeds/5869305917338575454/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://opensource-torchris.blogspot.com/2009/05/solar-water-heater-prototype.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4454770415619038436/posts/default/5869305917338575454'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4454770415619038436/posts/default/5869305917338575454'/><link rel='alternate' type='text/html' href='http://opensource-torchris.blogspot.com/2009/05/solar-water-heater-prototype.html' title='Solar Water Heater Prototype'/><author><name>Torchris</name><uri>http://www.blogger.com/profile/05149708403435853046</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='26' src='http://1.bp.blogspot.com/_Q6HcmhbUwp8/SYHApptPSoI/AAAAAAAAABQ/Ggl9qnbr7gE/S220/altered-clown.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4454770415619038436.post-1947472504379160334</id><published>2009-03-16T11:47:00.001-07:00</published><updated>2009-03-16T11:56:12.424-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='moisture'/><category scheme='http://www.blogger.com/atom/ns#' term='solenoid'/><category scheme='http://www.blogger.com/atom/ns#' term='iDuino'/><category scheme='http://www.blogger.com/atom/ns#' term='Arduino'/><title type='text'>Simple Arduino Fluid Control</title><content type='html'>Now that I am an actual iPhone user, I should be writing up a comparison with my i9 phone, but for now, another small Arduino project will have to suffice.&lt;br /&gt;&lt;br /&gt;Diligent readers will remember that all this started with a desire on my part of make a solar pool heater using the the Arduino. Of course, the critical part of that is to be able to control valves &amp;amp; pumps and move liquid around.&lt;br /&gt;&lt;br /&gt;This is my first project to start investigating this. This includes a 12 VDC solenoid valve that I bought off of eBay (&lt;a title="click here for details" href="http://cgi.ebay.ca/1-4-Electric-Solenoid-Valve-12-volt-Air-Water-BBTF_W0QQitemZ300296128000QQcmdZViewItemQQptZLH_DefaultDomain_0?hash=item300296128000&amp;amp;_trksid=p3911.c0.m14&amp;amp;_trkparms=72%3A1215%7C66%3A2%7C65%3A12%7C39%3A1%7C240%3A1318" id="zljo"&gt;click here for details&lt;/a&gt;) and a simple moisture detector circuit I previously used on another project. When the system starts up, the valve is closed and pushing the button off of Pin 12 opens the solenoid valve controlled by Pin 4. When the water level reaches the moisture detector on Pin 5, then the valve closes. To restart, you can lower lower the water level and push the button again and the cycle will run over.&lt;br /&gt;&lt;br /&gt;Here is a video of the operation (keen observers will note that this is actually a more breadboardable &lt;a title="iDuino" href="http://store.fundamentallogic.com/ecom/index.php?main_page=product_info&amp;amp;cPath=2&amp;amp;products_id=10" id="yi:0"&gt;iDuino&lt;/a&gt; not a proper "Arduino"):&lt;br /&gt;&lt;br /&gt;&lt;embed id="VideoPlayback" src="http://video.google.com/googleplayer.swf?docid=8889486602303878852&amp;hl=en&amp;fs=true" style="width:400px;height:326px" allowFullScreen="true" allowScriptAccess="always" type="application/x-shockwave-flash"&gt; &lt;/embed&gt;&lt;br /&gt;&lt;br /&gt;Yes, the green colored water is in honor of Saint Patrick's Day and to make it easier to see.&lt;br /&gt;&lt;br /&gt;Here is the circuit diagram:&lt;br /&gt;&lt;br /&gt;&lt;div id="mz0g" style="padding: 1em 0pt; text-align: left;"&gt;&lt;img src="http://docs.google.com/File?id=ddxwhmsv_55dc2d4zd3_b" height="637" width="657" /&gt;&lt;br /&gt;&lt;br /&gt;I am gradually getting better with Eagle CAD!&lt;br /&gt;&lt;br /&gt;The software is equally simple:&lt;br /&gt;&lt;br /&gt;&lt;pre name="code" class="cpp"&gt;&lt;br /&gt;/*&lt;br /&gt;Solenoid control&lt;br /&gt;copyright Chris Armour 2009&lt;br /&gt; */&lt;br /&gt;&lt;br /&gt;int ValvePin = 4;                // Solenoid valve connected to pin 4&lt;br /&gt;int SwPin = 12;&lt;br /&gt;int buttonWas = 0; // The state of the switch (pushed = 1, not pushed = 0) last time we looked&lt;br /&gt;int buttonIs = 0; // Current state of the switch&lt;br /&gt;int LEDPin = 13;&lt;br /&gt;int MoistPin = 5;&lt;br /&gt;int val = 0;&lt;br /&gt;&lt;br /&gt;void setup()                    // run once, when the sketch starts&lt;br /&gt;{&lt;br /&gt;  pinMode(ValvePin, OUTPUT);      // sets the digital pin as output&lt;br /&gt;  pinMode(SwPin, INPUT);&lt;br /&gt;  pinMode(LEDPin, OUTPUT);&lt;br /&gt;  Serial.begin(9600);&lt;br /&gt;  buttonIs = digitalRead(SwPin); //Read the initial state of the switch!&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;//===========Functions=====================//&lt;br /&gt;void getButton() { &lt;br /&gt;  buttonWas = buttonIs; // Set the old state of the button to be the current state since we're creating a new current state.&lt;br /&gt;  buttonIs = digitalRead(SwPin); // Read the button state&lt;br /&gt;} &lt;br /&gt;&lt;br /&gt;void openValve(){&lt;br /&gt;    digitalWrite(ValvePin, HIGH);&lt;br /&gt;    digitalWrite(LEDPin,HIGH);&lt;br /&gt;    Serial.println("Valve Open");&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;void closeValve(){&lt;br /&gt;  digitalWrite(ValvePin, LOW);&lt;br /&gt;  digitalWrite(LEDPin,LOW);&lt;br /&gt;  Serial.println("Valve closed");&lt;br /&gt;}&lt;br /&gt;  &lt;br /&gt;//=================Main Loop===================//&lt;br /&gt;void loop()                     // run over and over again&lt;br /&gt;{&lt;br /&gt; getButton();&lt;br /&gt;  &lt;br /&gt;  if((buttonIs==1)&amp;&amp;(buttonWas==0)) { &lt;br /&gt;    openValve();&lt;br /&gt;      }&lt;br /&gt;  &lt;br /&gt;  val = analogRead(MoistPin);&lt;br /&gt;  &lt;br /&gt;  if((val &gt; 500)){ &lt;br /&gt;    closeValve();&lt;br /&gt;      }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Putting the Valve Open &amp;amp; Valve Closed commands into functions greatly simplifies the main loop, which will make it easier to extend. The only tricky part was getting the momentary pushbutton switch initialized correctly. FOr some reason, it was always starting with the valve in the open state as if the button had been pushed. This requires you put the "&lt;span style="font-family:Verdana;"&gt;buttonIs = digitalRead(SwPin);" into the setup section in order to get the right values set for the intial state of the switch. This seems a bit odd to me since I would have thought that this would be taken care of by the intial declaration of the variable&lt;/span&gt;. It must be something about the Arduiono boot up process that accidentally sets "buttonIs" to something unexpected!&lt;br /&gt;&lt;br /&gt;That it for now. The next step will be to add in a pump so that when the water level is reached and the valve shuts the pump turns on and send the water back to the reservoir. This would make this a perpetual cycle of draining and pumping.&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4454770415619038436-1947472504379160334?l=opensource-torchris.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://opensource-torchris.blogspot.com/feeds/1947472504379160334/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://opensource-torchris.blogspot.com/2009/03/simple-arduino-fluid-control.html#comment-form' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4454770415619038436/posts/default/1947472504379160334'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4454770415619038436/posts/default/1947472504379160334'/><link rel='alternate' type='text/html' href='http://opensource-torchris.blogspot.com/2009/03/simple-arduino-fluid-control.html' title='Simple Arduino Fluid Control'/><author><name>Torchris</name><uri>http://www.blogger.com/profile/05149708403435853046</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='26' src='http://1.bp.blogspot.com/_Q6HcmhbUwp8/SYHApptPSoI/AAAAAAAAABQ/Ggl9qnbr7gE/S220/altered-clown.jpg'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4454770415619038436.post-8967924154559110154</id><published>2009-02-19T17:18:00.001-08:00</published><updated>2009-02-20T06:33:13.315-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='i9'/><category scheme='http://www.blogger.com/atom/ns#' term='mobile'/><category scheme='http://www.blogger.com/atom/ns#' term='China'/><category scheme='http://www.blogger.com/atom/ns#' term='GSM'/><category scheme='http://www.blogger.com/atom/ns#' term='SIM'/><title type='text'>CECT i9 Phone</title><content type='html'>Perhaps this posting isn't very "open source" and you Mac fans out there might actually call this "ripped off source", but it's my blog and I can write what I want!&lt;br /&gt;&lt;br /&gt;I need to travel on business to the US relatively often and very occasionally Asia. In the course of this, I discovered very quickly that roaming charges &lt;b&gt;SUCK&lt;/b&gt;! I also discovered what most people in the world who are not Canadian take for granted - pre-paid, low-cost SM SIM cards. Imagine that, there are places in the world that don't tie you into long term contracts on handsets and where cellular phone companies compete for your business? It must be nice.&lt;br /&gt;&lt;br /&gt;So, I ended up getting an unlocked GSM phone (a Samsung T509) and a T-Mobile SIM and another SIM from Maxis in Malaysia. I've gotten a bit tired of the Samsung, so I was browsing around for something else and I came upon something called the "CECT i9", which is one of a flurry of iPhone clones available from China. If you search eBay for "i9" you will come up with a bunch of folks selling them. What intrigued me as I did research was this description from the i9 informal support forum of how the phone is actually produced:&lt;br /&gt;&lt;br /&gt;&lt;p class="MsoNormal" style="margin-left: 0.5in;"&gt;&lt;span style="color: rgb(191, 0, 0);font-family:Times New Roman;font-size:100%;"  &gt;&lt;span style="color: rgb(191, 0, 0);"&gt;&lt;span style="font-size:100%;"&gt;Q.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; Does CECT make the i9 phone?&lt;br /&gt;&lt;span style="color: rgb(0, 191, 0);"&gt;&lt;span style="color: rgb(0, 191, 0);"&gt;A.&lt;/span&gt;&lt;/span&gt; Not directly. This is the same for the P168 &amp;amp; many iPhone clones. Though CECT  may actually produce the parts for the i9 model phones, there does not seem to actually be a single manufacturer, but rather many smaller businesses which use their parts to build the phones &amp;amp; sell them, so there are usually no brand or manufacturer names on any of the i9, i9+, or i9-3G phones that are sold! No one can tell you if any particular i9 being sold right now is going to be any better than another because of the fact that the true&lt;br /&gt;identity of the manufacturer is almost always unknown, &amp;amp; the features of the phone are directly affected by which version of the firmware the phone has on it. The newest youtube.com videos of the i9 phones are usually going to be those made of ones with the latest firmware versions &amp;amp; most features, so watch various youtube videos on the i9+ &amp;amp; look for one that has the features you like, then try &amp;amp; purchase from a reliable seller; ask them what features &amp;amp; firmware version are on the phone you are buying (even&lt;br /&gt;show them the youtube link to an i9 phone with features you want), &amp;amp; hope that what you receive is exactly what they described.&lt;/p&gt;I'm not sure if this exactly qualifies as "open source", but my wife rather cleverly referred to it as "Wiki Manufacturing", which reminds me of the mystery of counterfeit cars written up in &lt;a title="The Economist a while back" href="http://www.economist.com/business/displaystory.cfm?story_id=E1_RJGTRPR&amp;amp;source=login_payBarrier" id="axzj"&gt;The Economist a while back&lt;/a&gt;. What else could be manufactured this way and could it be extended to products that aren't "knock-offs"?&lt;br /&gt;&lt;br /&gt;So, I threw caution to the wind and bought one off of eBay for something slightly under $100. It took a long time to arrive and I thought perhaps I had been rooked, but it did finally show up a few days ago. Here is a picture of the rather familiar face:&lt;br /&gt;&lt;img src="http://docs.google.com/File?id=ddxwhmsv_47gtk5p3d5_b" height="513" width="428" /&gt;&lt;br /&gt;&lt;br /&gt;And here is a video of the actual thing working (sorry for the mumbling commentary!):&lt;br /&gt;&lt;br /&gt;&lt;embed id="VideoPlayback" src="http://video.google.com/googleplayer.swf?docid=-1550563920821223458&amp;amp;hl=en&amp;amp;fs=true" style="width: 400px; height: 326px;" allowfullscreen="true" allowscriptaccess="always" type="application/x-shockwave-flash"&gt;&lt;/embed&gt;&lt;br /&gt;&lt;br /&gt;Just to be clear, I don't own an iPhone, so I really can't compare it directly to the real thing, but it does have several things you can't get from Apple:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Unlocked&lt;/li&gt;&lt;li&gt;Dual SIMs online simultaneously&lt;br /&gt;&lt;/li&gt;&lt;li&gt;FM Radio&lt;/li&gt;&lt;li&gt;Stylus&lt;/li&gt;&lt;li&gt;Change your own battery!&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;Here is is in comparison to my Samsung T509, BlackBerry Pearl (which is my day-to-day phone):&lt;br /&gt;&lt;br /&gt;&lt;img src="http://docs.google.com/File?id=ddxwhmsv_48hphv5zd5_b" height="283" width="463" /&gt;&lt;br /&gt;&lt;br /&gt;The screen is pretty bright and crisp and the touch screen is quite responsive, even if the interface is a bit quirky!&lt;br /&gt;&lt;img src="http://docs.google.com/File?id=ddxwhmsv_49c692ngr4_b" height="458" width="363" /&gt;&lt;br /&gt;&lt;br /&gt;It is about the same thickness as my BlackBerry Pearl:&lt;br /&gt;&lt;img src="http://docs.google.com/File?id=ddxwhmsv_50f823skfm_b" height="431" width="289" /&gt;&lt;br /&gt;&lt;br /&gt;It has a nice feel in the hand and sits flat on a surface if you are trying to type something. The "shake" feature is interesting, but really not very useful. In fact, I would prefer to be able to turn it off in the media player because it switches songs almost as soon as you touch the phone!&lt;br /&gt;&lt;br /&gt;The phone comes with:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;2 batteries&lt;/li&gt;&lt;li&gt;headphones&lt;/li&gt;&lt;li&gt;USB cable&lt;/li&gt;&lt;li&gt;Up to 8GB Micro SD expansion&lt;br /&gt;&lt;/li&gt;&lt;li&gt;charger that you plug the USB cable into&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;The headset is pretty cheap and, unfortunately, uses a proprietary plug:&lt;br /&gt;&lt;br /&gt;&lt;img src="http://docs.google.com/File?id=ddxwhmsv_51cc84b7f4_b" height="282" width="342" /&gt;&lt;br /&gt;&lt;br /&gt;It supports Bluetooth and paired very easily with both my Blue Ant headset and with my Mac. There is some rudimentary ability to synch up contacts, but that's about it. The camera is very poor (like most cell phones, frankly)! Here are some sample shots:&lt;br /&gt;&lt;img src="http://docs.google.com/File?id=ddxwhmsv_52d8j99shh_b" height="292" width="390" /&gt;&lt;img src="http://docs.google.com/File?id=ddxwhmsv_53f65cscdp_b" height="291" width="389" /&gt;&lt;div id="ut7e" style="padding: 1em 0pt; text-align: left;"&gt;&lt;br /&gt;However, it will record video and audio reasonably well and it can be stored on the Micro SD card and transferred around via USB or Bluetooth quite easily.&lt;br /&gt;&lt;br /&gt;The support model is almost as quirky as the phone experience. In keeping with the "Wiki Manufacturing" of the product, there is no central manufacturer website, there is no fancy "app store" and precious little documentation that comes with the phone. There is a very active user help forum (&lt;a title="click here" href="http://www.i9forum.co.uk/phpBB3/index.php" id="b12q"&gt;click here&lt;/a&gt;, but you will need to join before you can see the content). This forum has a huge amount of useful information and discussion, but like most internet forums, it is also full of outdated information and "rat hole" discussions.&lt;br /&gt;&lt;br /&gt;Probably the most valuable feature is that it does support Java mobile (J2ME), which does allow you download and install Java apps quite easily. The Java memory size is limited to only 2MB and the phones processor is pretty slow, so you need to be careful what you install! The best Java app I have installed so far is Opera Mini 4, which actually works like a charm!&lt;br /&gt;&lt;br /&gt;This comes to some of the bigger drawbacks - the phone only supports GPRS data (no EDGE or 3G) and it lacks any email functionality. Opera Mini works basically OK with GPRS as long as you stick to the simpler "mobile editions" of websites, but the lack of email is rather frustrating. It seems like the only email client that can be made to work is an open source project called &lt;a title="MujMail" href="http://www.mujmail.org/" id="gyq8"&gt;MujMail&lt;/a&gt; , but unfortunately this is only very awkwardly adapted to the touchscreen. You can at least get web-based mail with Opera Mini, but no push capabilities (which I normally have turned off on my BlackBerry).&lt;br /&gt;&lt;br /&gt;Finally, the good old fashioned voice features seem to work fine. Both SIM cards are online at the same time, so you can make or receive calls on either SIM whenever you want. This allows you to chose which SIM currently has the best deal for time where ever you are at. In a more enlightened world, you could have one pre-paid SIM with the best, rock bottom cheap voice plan and the other with the best data plan. There are lots of features for tracking the exact number of minutes and cost of calls &amp;amp; SMS on the phone so you can manage your calling costs closely.&lt;br /&gt;&lt;br /&gt;Over all, this isn't a bad phone really. It certainly isn't an iPhone, but then for around $100 it does offer a number of features you can't get on the iPhone. It is definitely a superior phone to my Samsung T509 which cost about the same from TigerDirect (and has no multimedia and won't synch contacts). In a recent online poll in the support forums users were asked to rate their i9s on a scale of 1 to 5. Many people dumped on the quirkiness and non-iPhone-ness of the unit and rated it a 2, but many others said, for what you pay it, it is quite decent and gave it a 3.5 to 4. I think I am in the 3.5 to 4 camp. If it had more processor and memory and could run a true open source OS like Android, whoever these mysterious, anonymous manufacturers are would have a pretty nifty phone!&lt;br /&gt;&lt;br /&gt;Anyone want to buy my Samsung T509?&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4454770415619038436-8967924154559110154?l=opensource-torchris.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://opensource-torchris.blogspot.com/feeds/8967924154559110154/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://opensource-torchris.blogspot.com/2009/02/cect-i9-phone.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4454770415619038436/posts/default/8967924154559110154'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4454770415619038436/posts/default/8967924154559110154'/><link rel='alternate' type='text/html' href='http://opensource-torchris.blogspot.com/2009/02/cect-i9-phone.html' title='CECT i9 Phone'/><author><name>Torchris</name><uri>http://www.blogger.com/profile/05149708403435853046</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='26' src='http://1.bp.blogspot.com/_Q6HcmhbUwp8/SYHApptPSoI/AAAAAAAAABQ/Ggl9qnbr7gE/S220/altered-clown.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4454770415619038436.post-5770147071187974335</id><published>2009-02-15T19:41:00.001-08:00</published><updated>2009-02-15T19:55:52.781-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='AFSoftSerial'/><category scheme='http://www.blogger.com/atom/ns#' term='rfid'/><category scheme='http://www.blogger.com/atom/ns#' term='Arduino'/><category scheme='http://www.blogger.com/atom/ns#' term='Motor Shield'/><title type='text'>RFID Arduino Door Lock</title><content type='html'>Back again after a short hiatus...&lt;br /&gt;&lt;br /&gt;This project actually looks rather silly and this time I have a video to prove it! A while back I bought an Adafruit Motor Shield (&lt;a title="click here for more info" href="http://www.ladyada.net/make/mshield/" id="qxk9"&gt;click here for more info&lt;/a&gt;) and a couple of servo motors. I was looking around for a quick project when I remembered my old friend the RFID reader (which you will remember from &lt;a title="this" href="http://opensourceprojects-torchris.blogspot.com/2009/01/rfid-facebook-updater.html" id="ozkp"&gt;this&lt;/a&gt; post). Perhaps because my day job involves the hotel industry, I thought why not have a try at building a door lock?&lt;br /&gt;&lt;br /&gt;I am actually rather proud of this one, because I actually set about the design process in a proper organized fashion. I thought about what I wanted it to do and then drew a diagram of what pins I would use then I set about designing the software in a reasonably organized way. I must be getting the hang of this - only a moderate amount of banging my head on my desk!&lt;br /&gt;&lt;br /&gt;Without further ado, here is the exciting multimedia part of tonight's presentation!&lt;br /&gt;&lt;br /&gt;&lt;embed id="VideoPlayback" src="http://video.google.com/googleplayer.swf?docid=8831581741059099442&amp;amp;hl=en&amp;amp;fs=true" style="width: 640px; height: 480px;" allowfullscreen="true" allowscriptaccess="always" type="application/x-shockwave-flash"&gt;&lt;/embed&gt;&lt;br /&gt;&lt;br /&gt;Now for a couple of quick pictures. This shows the inside mechanism:&lt;br /&gt;&lt;img src="http://docs.google.com/File?id=ddxwhmsv_43fz9qvmcx_b" height="619" width="601" /&gt;&lt;br /&gt;&lt;br /&gt;And here is the RFID reader on the outside of the door:&lt;br /&gt;&lt;img style="width: 400px; height: 490px;" src="http://docs.google.com/File?id=ddxwhmsv_44fsbt278r_b" /&gt;&lt;br /&gt;&lt;br /&gt;Oh no, another poorly drawn Eagle CAD schematic:&lt;br /&gt;&lt;div id="ms37" style="padding: 1em 0pt; text-align: left;"&gt;&lt;img src="http://docs.google.com/File?id=ddxwhmsv_45dvsc24gx_b" height="401" width="549" /&gt;&lt;br /&gt;&lt;br /&gt;Hardwarewise, it is very simple. The only oddity here is that I have actually used the Analog pins of the Arduino as Digital pins. This is done quite simply by calling them pins 14 - 19. Why? This is because the Motor Sheild either uses or covers up most of the usual digital pins. Really, for a simple servo motoro like this, I am not actually using all those digitial pins, and, in fact, I probably don't need the Motor Sheild at all. An Arduino can drive a simple servo without any extra circuitry. However, I wanted to set this up so that a stepper motor could be substituted in later on.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Software&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;So, here is the code that makes it work:&lt;br /&gt;&lt;pre name="code" class="cpp"&gt;&lt;br /&gt;/* ======== Arduino RFID door lock ============&lt;br /&gt;&lt;br /&gt;copyright Chris Armour, Feb 2009&lt;br /&gt;&lt;br /&gt;*/&lt;br /&gt;&lt;br /&gt;#include &amp;lt;AFSoftSerial.h&amp;gt; //Adafruit soft serial library - slightly modified!&lt;br /&gt;#include &amp;lt;ServoTimer1.h&amp;gt; //Ada Motorshield servo library&lt;br /&gt;&lt;br /&gt;// =========Initialize variables and so on =========================//&lt;br /&gt;ServoTimer1 servo1;&lt;br /&gt;AFSoftSerial rfidSerial =  AFSoftSerial(14,15);&lt;br /&gt;//Note that this uses a version of the AFSoftSerial library modified to support pin numbers &amp;gt; 9.&lt;br /&gt;int LEDPin = 16;&lt;br /&gt;int incomingByte[16];&lt;br /&gt;int oldCardNum = 0;&lt;br /&gt;int newCardNum = 0;&lt;br /&gt;int goodCardNum1 = 56;&lt;br /&gt;int goodCardNum2 = 51;&lt;br /&gt;int Angle = 0;&lt;br /&gt;int LockState = 1; //1 = unlocked 0 = locked&lt;br /&gt;int LockLED = 17;&lt;br /&gt;int InButton = 18;&lt;br /&gt;int buttonWas = 0; // The state of the switch (pushed = 1, not pushed = 0) last time we looked&lt;br /&gt;int buttonIs = 0; // Current state of the switch&lt;br /&gt;&lt;br /&gt;//==========Setup pins &amp;amp; servo ===============//&lt;br /&gt;void setup() {&lt;br /&gt;Serial.begin(9600);&lt;br /&gt;rfidSerial.begin(9600);&lt;br /&gt;pinMode(LEDPin, OUTPUT);&lt;br /&gt;pinMode(LockLED, OUTPUT);&lt;br /&gt;pinMode(InButton, INPUT);&lt;br /&gt;servo1.attach(10);&lt;br /&gt;servo1.write(Angle);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;//===========Functions=====================//&lt;br /&gt;void getButton() {&lt;br /&gt;buttonWas = buttonIs; // Set the old state of the button to be the current state since we're creating a new current state.&lt;br /&gt;buttonIs = digitalRead(InButton); // Read the button state&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;void openClose(){ //Evaluates the LockState variable&lt;br /&gt; digitalWrite(LEDPin, HIGH); //Turns on pass/fail LED&lt;br /&gt;   if (LockState == 1){&lt;br /&gt;     Angle = 180; //Turns servo to UNLOCKED position&lt;br /&gt;     LockState = 0; //toggles Lockstate&lt;br /&gt;     digitalWrite(LockLED,HIGH); //Turns on LockLED to show door UNLOCKED&lt;br /&gt;     }&lt;br /&gt;   else {&lt;br /&gt;     Angle = 0; //turns servo to LOCKED position&lt;br /&gt;     LockState = 1; //toggles lock state&lt;br /&gt;     digitalWrite(LockLED,LOW); //Turns off LockLED to show door LOCKED&lt;br /&gt;     }&lt;br /&gt;   servo1.write(Angle); //Move the servo appropriately&lt;br /&gt;   delay(1000);&lt;br /&gt;   digitalWrite(LEDPin,LOW); //after 1 second, turn off the pass/fail LED&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;//================= Main loop =========================//&lt;br /&gt;&lt;br /&gt;void loop() {&lt;br /&gt;&lt;br /&gt;getButton();&lt;br /&gt;if((buttonIs==1)&amp;amp;&amp;amp;(buttonWas==0)) { //If the button has been pushed, call openClose to toggle the state of the servo &amp;amp; LEDs.&lt;br /&gt; openClose();&lt;br /&gt;   }&lt;br /&gt;&lt;br /&gt;if(incomingByte[11] &amp;gt; 0){&lt;br /&gt; oldCardNum = incomingByte[11]; //Sets the value of the last read RFID card to oldCardNum. Just using the 12 digit of the card ID.&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;if(rfidSerial.available() &amp;gt; 0) { //If the AFSoftSerial RX pin reads new incoming data.&lt;br /&gt; for (int i=0; i &amp;lt;= 16; i++){ //It reads the next 16 characters&lt;br /&gt;     delay(10);&lt;br /&gt; incomingByte[i] = rfidSerial.read();&lt;br /&gt;     newCardNum = incomingByte[11]; //Pick out ASCII character #12 since it is unique across the 5 cards I have.&lt;br /&gt;      }&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;if(oldCardNum != newCardNum) {  //Check if a new card # has been received.&lt;br /&gt;  if(newCardNum == goodCardNum1 || newCardNum == goodCardNum2){ //If the new card number equals either of the key cards.&lt;br /&gt;    openClose(); //run the openClose function&lt;br /&gt;   }&lt;br /&gt;else { //If the card isn't a good card, flash the pass/fail indicator 3 times.&lt;br /&gt;  for (int x=0; x &amp;lt;=3; x++){&lt;br /&gt;  digitalWrite(LEDPin, HIGH);&lt;br /&gt;   delay(100);&lt;br /&gt;   digitalWrite(LEDPin,LOW);&lt;br /&gt;   delay(100);&lt;br /&gt;  }&lt;br /&gt;}&lt;br /&gt;Serial.println(newCardNum); //serial output for debugging.&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;I am actually rather proud of this code. It uses actual functions for getting the value of the button and for evaluating the lock/unlock state. Of the five RFID cards that I have, two of them are hard coded as "good cards" and the other three trigger the flashing LEDs as "bad cards".&lt;br /&gt;&lt;br /&gt;The main thing to note in this software is that the Lady Ada AFSoftSerial library had to be modified to use the Analog Pins (i.e., digital pins in the range 14 to 19). Apparently the AFSoftSerial library is hard coded to work with pins below 13. This is the one time I actually had to ASK SOMEONE for help on something related to the Arduino (in contrast to the Gumstix, which took endless asking to get working!). Anyway, &lt;a title="here is a link to the forum posting for those who are curious" href="http://forums.ladyada.net/viewtopic.php?f=25&amp;amp;t=8716" id="dd2m"&gt;here is a link to the forum posting for those who are curious&lt;/a&gt;. It is a simple fix that user mtbf0 came up with, but it was over my head!!&lt;br /&gt;&lt;br /&gt;That's enough for this project. This one was fun since it actually moves and potentially does useful work!&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4454770415619038436-5770147071187974335?l=opensource-torchris.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://opensource-torchris.blogspot.com/feeds/5770147071187974335/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://opensource-torchris.blogspot.com/2009/02/rfid-arduino-door-lock.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4454770415619038436/posts/default/5770147071187974335'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4454770415619038436/posts/default/5770147071187974335'/><link rel='alternate' type='text/html' href='http://opensource-torchris.blogspot.com/2009/02/rfid-arduino-door-lock.html' title='RFID Arduino Door Lock'/><author><name>Torchris</name><uri>http://www.blogger.com/profile/05149708403435853046</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='26' src='http://1.bp.blogspot.com/_Q6HcmhbUwp8/SYHApptPSoI/AAAAAAAAABQ/Ggl9qnbr7gE/S220/altered-clown.jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4454770415619038436.post-6308101062165540414</id><published>2009-01-28T19:34:00.001-08:00</published><updated>2009-01-29T05:57:49.612-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SQLite'/><category scheme='http://www.blogger.com/atom/ns#' term='RSS'/><category scheme='http://www.blogger.com/atom/ns#' term='weather'/><category scheme='http://www.blogger.com/atom/ns#' term='php'/><category scheme='http://www.blogger.com/atom/ns#' term='Gumstix'/><category scheme='http://www.blogger.com/atom/ns#' term='Arduino'/><title type='text'>Gumstix Arduino Software</title><content type='html'>I would ask the programmers out there to bear with me! I am a pretty poor coder  - probably the result of having two history degrees or being frequently dropped on my head as a child. I tend to not comment my code and I usually work from a single thing that works and just barnacle on elaborations rather than neatly putting things into functions and properly planning my work. I like working in PHP because it has all the ease of C without some of the traps (like handling strings or declaring variables).&lt;br /&gt;&lt;br /&gt;So, for my sensor network, the Gumstix Linux box is running PHP 5.0 and the Cherokee web server. This seems to be very robust and I haven't had to reboot it in ages. The main webpage comes up on my internal network like this:&lt;br /&gt;&lt;div id="fhsz" style="padding: 1em 0pt; text-align: left;"&gt;&lt;img style="width: 650px; height: 506px;" src="http://docs.google.com/File?id=ddxwhmsv_40c357bvc9_b" /&gt;&lt;/div&gt;This displays the main info off of the remote sensors and also takes an RSS feed off of &lt;a title="www.weatherunderground.com" href="http://www.weatherunderground.com/" id="brgl"&gt;www.weatherunderground.com&lt;/a&gt; for the current weather in Hamilton, Ontario. This allows me to cross-check the temp readings with the actual weather reported for the area. Note that this still includes a "moisture" reading, but the sensor is now been taken off the system. This was my attempt to detect if it was raining or not based on &lt;a title="this circuit" href="http://www.faludi.com/2006/11/02/moisture-sensor-circuit/" id="kqyo"&gt;this circuit&lt;/a&gt; from Rob Faludi. &lt;br /&gt;&lt;br /&gt;The LED2 On button allows me to control the secondary LED on the remote unit. This is essentially just a way to test remote controlling a digital output over the web and the Zigbee link. When you click the button, it launches a small script that sends out an "h", which turns the light ON. The button will then toggle to the "off" mode and when you press it again it sends an "l" (lower case L) to turn off the LED.&lt;br /&gt;&lt;br /&gt;Below is the source code in all it's messy glory. It uses the indispensable "php_serial.class.php" class from Remy Sanchez (&lt;a title="found here" href="http://www.phpclasses.org/browse/package/3679.html" id="j.0_"&gt;found here&lt;/a&gt; ) which is absolutely essential to do anything between PHP and your serial port. The script then grabs the Weather Underground RSS feed and generates the HTML to load the web page.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Arduino.php:&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre name="code" class="cpp"&gt;&lt;br /&gt;&amp;lt;?php&lt;br /&gt;include "php_serial.class.php";&lt;br /&gt;&lt;br /&gt;// configure the serial port using php_serial.class.php&lt;br /&gt; $serial = new phpSerial;&lt;br /&gt; $serial-&gt;deviceSet("/dev/ttyS2");&lt;br /&gt; $serial-&gt;confBaudRate(9600);&lt;br /&gt; $serial-&gt;confParity("none");&lt;br /&gt; $serial-&gt;confCharacterLength(8);&lt;br /&gt; $serial-&gt;confStopBits(1);&lt;br /&gt; $serial-&gt;confFlowControl("none");&lt;br /&gt; $serial-&gt;deviceOpen();&lt;br /&gt;&lt;br /&gt; $serial-&gt;sendMessage("g");&lt;br /&gt; usleep(100000);&lt;br /&gt; $serial-&gt;flush;&lt;br /&gt; $read = $serial-&gt;readPort();&lt;br /&gt; $ard_array = explode(',',$read,7);&lt;br /&gt;&lt;br /&gt; if (empty($ard_array[6])){&lt;br /&gt;  usleep(100000);&lt;br /&gt;  $serial-&gt;sendMessage("g");&lt;br /&gt;  usleep(100000);&lt;br /&gt;  $read = $serial-&gt;readPort();&lt;br /&gt;  $ard_array = explode(',',$read,7); &lt;br /&gt; }&lt;br /&gt;&lt;br /&gt; if ($ard_array[0] == 1) {&lt;br /&gt;  $plusMinus = "-";&lt;br /&gt; } elseif ($ard_array[0] == 0){&lt;br /&gt;  $plusMinus = "+";&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt;$weather = &lt;br /&gt;simplexml_load_file('http://www.weatherunderground.com/auto/rss_full/global/stations/71297.xml?units=both');&lt;br /&gt;&lt;br /&gt;echo "&amp;lt;!DOCTYPE html PUBLIC '-//W3C//DTD HTML 4.01 Transitional//EN'&gt;";&lt;br /&gt;echo "&amp;lt;html&gt;";&lt;br /&gt;echo "&amp;lt;head&gt;";&lt;br /&gt;echo "&amp;lt;meta content='text/html; charset=ISO-8859-1'&lt;br /&gt; http-equiv='content-type'&gt;";&lt;br /&gt;echo "&amp;lt;meta http-equiv='refresh' content='6'&gt;";&lt;br /&gt;echo "&amp;lt;img style='float: left; width: 81px; height: 90px;' &lt;br /&gt;src='images/arduino-nano.jpg'&gt;";&lt;br /&gt;echo " &amp;lt;title&gt;Arduino Control&amp;lt;/title&gt;";&lt;br /&gt;echo "&amp;lt;/head&gt;";&lt;br /&gt;echo "&amp;lt;body&gt;";&lt;br /&gt;echo "&amp;lt;br&gt;";&lt;br /&gt;echo "&amp;lt;h1&gt;&amp;lt;span style='font-family: Arial;'&gt;Arduino Control Panel&amp;lt;/h1&gt;";&lt;br /&gt;echo "&amp;lt;br&gt;&amp;lt;/br&gt;";&lt;br /&gt;echo "&amp;lt;table style='text-align: left; width: 50%;' border='1'&lt;br /&gt; cellpadding='2' cellspacing='2'&gt;";&lt;br /&gt;echo "&amp;lt;tbody&gt;";&lt;br /&gt;echo "&amp;lt;tr&gt;";&lt;br /&gt;echo "&amp;lt;th&gt;Deg C&amp;lt;/th&gt;";&lt;br /&gt;echo "&amp;lt;th&gt;Light Level&amp;lt;/th&gt;";&lt;br /&gt;echo "&amp;lt;th&gt;LED 1 ON/OFF&amp;lt;/th&gt;";&lt;br /&gt;echo "&amp;lt;th&gt;Moisture&amp;lt;/th&gt;";&lt;br /&gt;echo "&amp;lt;th&gt;LED 2 ON/OFF&amp;lt;/th&gt;&amp;lt;/tr&gt;";&lt;br /&gt;echo "&amp;lt;tr&gt;";&lt;br /&gt;echo "&amp;lt;td&gt;$plusMinus$ard_array[1]&amp;lt;/td&gt;";&lt;br /&gt;echo "&amp;lt;td&gt;$ard_array[2]&amp;lt;/td&gt;";&lt;br /&gt;echo "&amp;lt;td&gt;$ard_array[3]&amp;lt;/td&gt;";&lt;br /&gt;echo "&amp;lt;td&gt;$ard_array[4]&amp;lt;/td&gt;";&lt;br /&gt;echo "&amp;lt;td&gt;$ard_array[5]&amp;lt;/td&gt;";&lt;br /&gt;echo "&amp;lt;/tr&gt;";&lt;br /&gt;echo "&amp;lt;/tbody&gt;";&lt;br /&gt;echo "&amp;lt;/table&gt;";&lt;br /&gt;echo "&amp;lt;br&gt;";&lt;br /&gt;echo "&amp;lt;h2&gt;&amp;lt;span style='font-family: Arial;'&gt;Current Weather in Hamilton&amp;lt;/h2&gt;";&lt;br /&gt;foreach ($weather-&gt;channel-&gt;item as $item) {&lt;br /&gt;                $w = $item-&gt;description . "";&lt;br /&gt;                $newchar = str_replace("|", "", $w);&lt;br /&gt;                $newestchar = str_replace("Temperature","Current temp", $newchar);&lt;br /&gt;                $newest2char = str_replace("Â°F","F",$newestchar);&lt;br /&gt;                $newest3char = str_replace("Â°C","C",$newest2char);&lt;br /&gt;                $newest4char = str_replace("percent","%",$newest3char);&lt;br /&gt;                $newest5char = str_replace(" / "," ",$newest4char);&lt;br /&gt;                $newest6char = str_replace("  "," ",$newest5char);&lt;br /&gt;                $newest7char = str_replace("Direction:","Dir:",$newest6char);&lt;br /&gt;                $newerchar = trim($newest7char);&lt;br /&gt;                $wchar = substr($newerchar,0,80);&lt;br /&gt;&lt;br /&gt;$wchar = substr($newerchar,0,300);&lt;br /&gt;&lt;br /&gt;echo "&amp;lt;table style='text-align: left; width: 50%;' border='1'&lt;br /&gt; cellpadding='2' cellspacing='2'&gt;";&lt;br /&gt;echo "&amp;lt;tbody&gt;";&lt;br /&gt;echo "&amp;lt;tr&gt;";&lt;br /&gt;echo "&amp;lt;td&gt;$wchar&amp;lt;/td&gt;";&lt;br /&gt;echo "&amp;lt;/tr&gt;";&lt;br /&gt;echo "&amp;lt;/tbody&gt;";&lt;br /&gt;echo "&amp;lt;/table&gt;";&lt;br /&gt;                }&lt;br /&gt;&lt;br /&gt;echo "&amp;lt;br&gt;";&lt;br /&gt;echo "&amp;lt;a href='arduino_data2.php'&gt;View Log&amp;lt;/a&gt;&amp;lt;br&gt;";&lt;br /&gt;echo "&amp;lt;br&gt;";&lt;br /&gt;echo "&amp;lt;table&gt;";&lt;br /&gt;echo "&amp;lt;tbody&gt;";&lt;br /&gt;echo "&amp;lt;tr&gt;";&lt;br /&gt;echo "&amp;lt;td&gt;";&lt;br /&gt;if ($ard_array[5] == 1) {&lt;br /&gt;&lt;br /&gt;echo "&amp;lt;form action='led_off.php' method='get'&gt;"; &lt;br /&gt;echo "&amp;lt;input type='hidden' name='variablename' value='variablevalue'&gt;"; &lt;br /&gt;echo "&amp;lt;input type='submit' value='TURN LED2 OFF'/&gt;";&lt;br /&gt;echo "&amp;lt;/form&gt;";&lt;br /&gt;}&lt;br /&gt;if ($ard_array[5] == 0){&lt;br /&gt;echo "&amp;lt;/td&gt;";&lt;br /&gt;echo "&amp;lt;td&gt;";&lt;br /&gt;echo "&amp;lt;form action='led_on.php' method='get'&gt;";&lt;br /&gt;echo "&amp;lt;input type='hidden' name='variablename' value='variablevalue'&gt;";&lt;br /&gt;echo "&amp;lt;input type='submit' value='TURN LED2 ON'/&gt;";&lt;br /&gt;echo "&amp;lt;/form&gt;";&lt;br /&gt;}&lt;br /&gt;echo "&amp;lt;/td&gt;";&lt;br /&gt;echo "&amp;lt;/tbody&gt;";&lt;br /&gt;echo "&amp;lt;/table&gt;";&lt;br /&gt;echo "&amp;lt;br&gt;";&lt;br /&gt;echo "&amp;lt;hr style='width: 100%; height: 2px;'&gt;";&lt;br /&gt;echo "&amp;lt;br&gt;";&lt;br /&gt;echo "&amp;lt;img style='float: left; width: 81px; height: 90px;' &lt;br /&gt;src='images/gumlogo.gif'&gt;";&lt;br /&gt;echo "&amp;lt;h1&gt;&amp;lt;span style='font-family: Arial;'&gt;Gumstix Controls&amp;lt;/h1&gt;";&lt;br /&gt;echo "&amp;lt;br&gt;";&lt;br /&gt;echo "&amp;lt;table&gt;";&lt;br /&gt;echo "&amp;lt;tbody&gt;";&lt;br /&gt;echo "&amp;lt;td&gt;";&lt;br /&gt;echo "&amp;lt;form action='turn_off.php' method='get'&gt;";&lt;br /&gt;echo "&amp;lt;input type='hidden' name='variablename' value='variablevalue'&gt;";&lt;br /&gt;echo "&amp;lt;input type='submit' value='TURN OFF GUMSTIX'/&gt;";&lt;br /&gt;echo "&amp;lt;/td&gt;&amp;lt;td&gt;";&lt;br /&gt;echo "&amp;lt;/form&gt;";&lt;br /&gt;echo "&amp;lt;form action='reboot_gum.php' method='get'&gt;";&lt;br /&gt;echo "&amp;lt;input type='hidden' name='variablename' value='variablevalue'&gt;";&lt;br /&gt;echo "&amp;lt;input type='submit' value='REBOOT GUMSTIX'/&gt;";&lt;br /&gt;echo "&amp;lt;/form&gt;";&lt;br /&gt;echo "&amp;lt;/td&gt;";&lt;br /&gt;echo "&amp;lt;/tbody&gt;";&lt;br /&gt;echo "&amp;lt;/table&gt;";&lt;br /&gt;echo "&amp;lt;hr style='width: 100%; height: 2px;'&gt;";&lt;br /&gt;echo "&amp;lt;img src='images/powered_by_cherokee.png'&gt;";&lt;br /&gt;echo "&amp;lt;/body&gt;";&lt;br /&gt;echo "&amp;lt;/html&gt;";&lt;br /&gt;&lt;br /&gt;$serial-&gt;deviceClose();&lt;br /&gt;&lt;br /&gt;?&gt;&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;The other function of the Gumstix is also to act as a data logger. Clicking the link for the log takes you to this page:&lt;br /&gt;&lt;br /&gt;&lt;div id="b:6o" style="padding: 1em 0pt; text-align: left;"&gt;&lt;img style="width: 650px; height: 444px;" src="http://docs.google.com/File?id=ddxwhmsv_41fwhr23gt_b" /&gt;&lt;/div&gt;&lt;br /&gt;This is a very small SQLite database that keeps track of the readings of the remote units sensors. The code below uses a PDO statement to open the database and generate the HTML to display its contents. Eventually, I will need to put some further refinements on it so you can select results from different days and maybe graph the temerature.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Arduino_data2.php:&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre name="code" class="cpp"&gt;&lt;br /&gt;&amp;lt;?php&lt;br /&gt;&lt;br /&gt;$db = new PDO('sqlite:/media/card/back_up/home/root/arduino.db');&lt;br /&gt;$st = $db-&gt;query('SELECT * FROM tbl');&lt;br /&gt;$results = $st-&gt;fetchAll();&lt;br /&gt;echo "&amp;lt;!DOCTYPE html PUBLIC '-//W3C//DTD HTML 4.01 Transitional//EN'&gt;";&lt;br /&gt;echo "&amp;lt;html&gt;";&lt;br /&gt;echo "&amp;lt;head&gt;";&lt;br /&gt;echo "&amp;lt;meta content='text/html; charset=ISO-8859-1'&lt;br /&gt; http-equiv='content-type'&gt;";&lt;br /&gt;echo "&amp;lt;meta http-equiv='refresh' content='10' &gt;";&lt;br /&gt;echo " &amp;lt;title&gt;Data Log&amp;lt;/title&gt;";&lt;br /&gt;echo "&amp;lt;/head&gt;";&lt;br /&gt;echo "&amp;lt;body&gt;";&lt;br /&gt;echo "&amp;lt;h1&gt;Arduino Data Log&amp;lt;/h1&gt;";&lt;br /&gt;echo "&amp;lt;br&gt;&amp;lt;/br&gt;";&lt;br /&gt;echo "&amp;lt;form action='clear_log.php')'&gt;";&lt;br /&gt;echo "&amp;lt;input type='submit' value='Clear Log'/&gt;";&lt;br /&gt;echo "&amp;lt;/form&gt;";&lt;br /&gt;echo "&amp;lt;table style='text-align: left; width: 50%;' border='1'&lt;br /&gt; cellpadding='2' cellspacing='2'&gt;";&lt;br /&gt;echo "&amp;lt;tbody&gt;";&lt;br /&gt;echo "&amp;lt;tr&gt;";&lt;br /&gt;echo "&amp;lt;th&gt;Index&amp;lt;/th&gt;";&lt;br /&gt;echo "&amp;lt;th&gt;Date-Time&amp;lt;/th&gt;";&lt;br /&gt;echo "&amp;lt;th&gt;Light Level&amp;lt;/th&gt;";&lt;br /&gt;echo "&amp;lt;th&gt;LED1&amp;lt;/th&gt;";&lt;br /&gt;echo "&amp;lt;th&gt;Moisture&amp;lt;/th&gt;";&lt;br /&gt;echo "&amp;lt;th&gt;LED2&amp;lt;/th&gt;";&lt;br /&gt;echo "&amp;lt;th&gt;+/-&amp;lt;/th&gt;";&lt;br /&gt;echo "&amp;lt;th&gt;Temp&amp;lt;/th&gt;";&lt;br /&gt;echo "&amp;lt;/tr&gt;";&lt;br /&gt;&lt;br /&gt;$rows = count($results);&lt;br /&gt; &lt;br /&gt; for ($i=0; $i &amp;lt;= $rows; $i++){&lt;br /&gt;  echo "&amp;lt;tr&gt;";&lt;br /&gt;  for ($x=0; $x &amp;lt;= 7; $x++){&lt;br /&gt;   echo "&amp;lt;td&gt;{$results[$i][$x]}&amp;lt;/td&gt;";&lt;br /&gt;  }&lt;br /&gt;  echo "&amp;lt;/tr&gt;";&lt;br /&gt; }&lt;br /&gt;echo "&amp;lt;/tbody&gt;";&lt;br /&gt;echo "&amp;lt;/table&gt;";&lt;br /&gt;echo "&amp;lt;br&gt;";&lt;br /&gt;echo "&amp;lt;a href='arduino.php'&gt;Return to Control Panel&amp;lt;/a&gt;&amp;lt;br&gt;";&lt;br /&gt;echo "&amp;lt;/body&gt;";&lt;br /&gt;echo "&amp;lt;html&gt;";&lt;br /&gt;$db = null;&lt;br /&gt;&lt;br /&gt;?&gt;&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;How does the data actually get into the database? This is pretty straightforward. Read the serial port with the aforementioned PHP serial class and put the results into an array, then use the SQL INSERT command to put it into the database:&lt;br /&gt;&lt;br /&gt;&lt;b&gt;data_logging.php:&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre name="code" class="cpp"&gt;&lt;br /&gt;&amp;lt;?php&lt;br /&gt;include "php_serial.class.php";&lt;br /&gt;&lt;br /&gt;// configure the serial port using php_serial.class.php&lt;br /&gt;   $serial = new phpSerial;&lt;br /&gt;   $serial-&amp;gt;deviceSet("/dev/ttyS2");&lt;br /&gt;   $serial-&amp;gt;confBaudRate(9600);&lt;br /&gt;   $serial-&amp;gt;confParity("none");&lt;br /&gt;   $serial-&amp;gt;confCharacterLength(8);&lt;br /&gt;   $serial-&amp;gt;confStopBits(1);&lt;br /&gt;   $serial-&amp;gt;confFlowControl("none");&lt;br /&gt;   $serial-&amp;gt;deviceOpen();&lt;br /&gt;&lt;br /&gt;   $serial-&amp;gt;sendMessage("g");&lt;br /&gt;   usleep(100000);&lt;br /&gt;   $serial-&amp;gt;flush;&lt;br /&gt;   $read = $serial-&amp;gt;readPort();&lt;br /&gt;   $ard_array = explode(',',$read,7);&lt;br /&gt;   $serial-&amp;gt;deviceClose();&lt;br /&gt;   if ($ard_array[0] == 0){&lt;br /&gt;       $ard_array[0] = "'+'";&lt;br /&gt;       }&lt;br /&gt;   elseif ($ard_array[0] == 1){&lt;br /&gt;       $ard_array[0] = "'-'";&lt;br /&gt;       }&lt;br /&gt;//print_r($ard_array);&lt;br /&gt;&lt;br /&gt;putenv("TZ=UTC+5");&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;$db = new PDO('sqlite:/media/card/back_up/home/root/arduino.db');&lt;br /&gt;$db-&amp;gt;exec("INSERT INTO tbl (lightLev,LED1,SW1,LED2,plus_minus,temp)&lt;br /&gt;VALUES&lt;br /&gt;($ard_array[2],$ard_array[3],$ard_array[4],$ard_array[5],$ard_array[0],$ard_array[1])");&lt;br /&gt;&lt;br /&gt;Print("Insert successful\n");&lt;br /&gt;&lt;br /&gt;?&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;This is driven by a crontab item on the Gumstix that runs every 15 minutes. For those out there who might be struggling to figure out crontab on Linux, the way I did this was via the command "crontab -e" and I included the line:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;*/15 * * * * /usr/bin/php /var/www/data_logging.php &amp;gt; /dev/null&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Well, that should be enough for now on my sensor network project. Soon, I will have to start actually building some of the elements of the solar pool heater concept that started all this. I now have some solenoid valves and a small pump, so I need to do a proptype of an Arduino managing flud control. Maybe I might do something again with RFID first!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4454770415619038436-6308101062165540414?l=opensource-torchris.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://opensource-torchris.blogspot.com/feeds/6308101062165540414/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://opensource-torchris.blogspot.com/2009/01/gumstix-arduino-software.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4454770415619038436/posts/default/6308101062165540414'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4454770415619038436/posts/default/6308101062165540414'/><link rel='alternate' type='text/html' href='http://opensource-torchris.blogspot.com/2009/01/gumstix-arduino-software.html' title='Gumstix Arduino Software'/><author><name>Torchris</name><uri>http://www.blogger.com/profile/05149708403435853046</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='26' src='http://1.bp.blogspot.com/_Q6HcmhbUwp8/SYHApptPSoI/AAAAAAAAABQ/Ggl9qnbr7gE/S220/altered-clown.jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4454770415619038436.post-7288067003321562198</id><published>2009-01-28T14:39:00.001-08:00</published><updated>2009-01-28T14:41:38.918-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='TTL'/><category scheme='http://www.blogger.com/atom/ns#' term='wire wrap'/><category scheme='http://www.blogger.com/atom/ns#' term='Zigbee'/><category scheme='http://www.blogger.com/atom/ns#' term='Xbee'/><category scheme='http://www.blogger.com/atom/ns#' term='USB'/><category scheme='http://www.blogger.com/atom/ns#' term='Gumstix'/><category scheme='http://www.blogger.com/atom/ns#' term='RS232'/><title type='text'>Gumstix-Xbee Modem Hardware</title><content type='html'>Hola Amigos!&lt;br /&gt;&lt;br /&gt;Now to continue with documenting the Remote Sensor rig, this section will describe the physical hardware that is used to interface the Gumstix server via Xbee to the Remote Sensor box and the Indoor-Outdoor Temperature display described earlier. I will discuss the PHP scripts running on the Gumstix in a later post.&lt;br /&gt;&lt;br /&gt;The astute observer will note that this circuit is actually rather silly. Why is there an RS232-TTL converter &lt;b&gt;and&lt;/b&gt; a USB-TTL converter? The answer is that the Gumstix does not at this point support the FTDI USB-Serial chip, but I needed something to power the circuit so I could avoid having an extra wall-wart in the picture. So, a very good DLP USB converter (&lt;a title="click here to see the details on Digi-Key" href="http://search.digikey.com/scripts/DkSearch/dksus.dll?Detail&amp;amp;name=813-1018-ND" id="r:.3"&gt;Digi-key part 813-1018-ND&lt;/a&gt;) is essentially being totally wasted. I did try just pulling the power directly off a USB connector, but it didn't seem to be sufficient to run the Xbee, so the DLP Converter is obviously doing some sort of power conditioning along the way.&lt;br /&gt;&lt;div id="nshw" style="padding: 1em 0pt; text-align: left;"&gt;&lt;br /&gt;&lt;div id="batf" style="padding: 1em 0pt; text-align: left;"&gt;&lt;div id="p5bl" style="padding: 1em 0pt; text-align: left;"&gt;&lt;img style="width: 803px; height: 480px;" src="http://docs.google.com/File?id=ddxwhmsv_37g2mbnrhj_b" /&gt;&lt;/div&gt;&lt;br /&gt;This shows the layout of the board. Very neat! This actually uses the Sparkfun Xbee breakout board (&lt;a title="Sparkfun part number BOB-08276" href="http://www.sparkfun.com/commerce/product_info.php?products_id=8276" id="se1r"&gt;Sparkfun part number BOB-08276&lt;/a&gt;) which just provides a simple breakout for the Xbee pins rather than the complete power package on the Lady Ada carrier board I used on the Indoor-Outdoor Temperature Display. There is no design reason for this. I just happened to build this unit before I had discovered the Lady Ada breakout board. This is why I needed to put in a separate 3.3 VDC voltage regulator and the two power conditioning capacitors.&lt;br /&gt;&lt;div id="krhk" style="padding: 1em 0pt; text-align: left;"&gt;&lt;img src="http://docs.google.com/File?id=ddxwhmsv_38wbwf5kfs_b" width="617" height="464" /&gt;&lt;/div&gt;&lt;br /&gt;&lt;div id="kvdz" style="padding: 1em 0pt; text-align: left;"&gt;There is a 10 uF capacitor on the 5 VDC input of the regulator and a 1 uF on the 3.3 VDC output. I ain't no expert on this stuff, but what I understand is if they ain't there it ain't workin'.&lt;br /&gt;&lt;br /&gt;&lt;div id="n1k9" style="padding: 1em 0pt; text-align: left;"&gt;&lt;div id="wzpz" style="padding: 1em 0pt; text-align: left;"&gt;&lt;img style="width: 640px; height: 528.645px;" src="http://docs.google.com/File?id=ddxwhmsv_35hpgtzcgw_b" /&gt;&lt;br /&gt;Again, this circuit is built using wire wrap, which provides a quick way to make a reasonably permanent circuit. I should be good and color code the power, ground and data wires and arrange them all more neatly, but I'm sure that will come with practise.&lt;br /&gt;&lt;br /&gt;And here is the completed unit in the inevitable plastic food container. The Gumstix case is my own design (&lt;a title="described here" href="http://www.facebook.com/album.php?aid=16794&amp;amp;l=6268d&amp;amp;id=588777472" id="j8hk"&gt;described here&lt;/a&gt;). The RS232 comes off of the Gumstix LCD-Serial board and through a gender changer to the RS232-TTL converter. The USB connects to the USB on the converter. The Arduino units communicated with the Xbee on this and the Gumstix then communicates over Wi-Fi to my home network.&lt;br /&gt;&lt;/div&gt;&lt;div id="i9q8" style="padding: 1em 0pt; text-align: left;"&gt;&lt;img style="width: 640px; height: 392.381px;" src="http://docs.google.com/File?id=ddxwhmsv_36c7bvt8gx_b" /&gt;&lt;br /&gt;&lt;br /&gt;Next post, I will describe the software that runs everything!&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4454770415619038436-7288067003321562198?l=opensource-torchris.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://opensource-torchris.blogspot.com/feeds/7288067003321562198/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://opensource-torchris.blogspot.com/2009/01/gumstix-xbee-modem-hardware.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4454770415619038436/posts/default/7288067003321562198'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4454770415619038436/posts/default/7288067003321562198'/><link rel='alternate' type='text/html' href='http://opensource-torchris.blogspot.com/2009/01/gumstix-xbee-modem-hardware.html' title='Gumstix-Xbee Modem Hardware'/><author><name>Torchris</name><uri>http://www.blogger.com/profile/05149708403435853046</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='26' src='http://1.bp.blogspot.com/_Q6HcmhbUwp8/SYHApptPSoI/AAAAAAAAABQ/Ggl9qnbr7gE/S220/altered-clown.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4454770415619038436.post-9133894822072108320</id><published>2009-01-17T18:51:00.001-08:00</published><updated>2009-01-22T09:53:04.572-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='OneWire'/><category scheme='http://www.blogger.com/atom/ns#' term='Lady Ada'/><category scheme='http://www.blogger.com/atom/ns#' term='Arduino'/><category scheme='http://www.blogger.com/atom/ns#' term='Sparkfun'/><category scheme='http://www.blogger.com/atom/ns#' term='SerialLCD'/><title type='text'>Indoor Outdoor Temp Display</title><content type='html'>OK, it's time to move on with the remote sensor network description. Now for the &lt;b&gt;Indoor-Outdoor Temp display&lt;/b&gt;, which is right now sitting faithfully beside my desk:&lt;br /&gt;&lt;div id="k.bm" style="padding: 1em 0pt; text-align: left;"&gt;&lt;img style="width: 604px; height: 453px;" src="http://docs.google.com/File?id=ddxwhmsv_22d78v3jcr_b" /&gt;&lt;br /&gt;&lt;br /&gt;This uses a local DS18B20 Onewire temp sensor and the following standard components:&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;a title="Sparkfun SerialLCD" href="http://www.sparkfun.com/commerce/product_info.php?products_id=462" id="s.3r"&gt;Sparkfun SerialLCD&lt;/a&gt; (Sparkfun SKU  LCD-00462)&lt;/li&gt;&lt;li&gt;&lt;a title="Sparkfun Breadboard Power Supply" href="http://www.sparkfun.com/commerce/product_info.php?products_id=8376" id="nmsz"&gt;Sparkfun Breadboard Power Supply&lt;/a&gt; (Sparkfun SKU  PRT-08376)&lt;/li&gt;&lt;li&gt;&lt;a title="Fundamental Logic iDuino" href="http://store.fundamentallogic.com/ecom/index.php?main_page=product_info&amp;amp;cPath=2&amp;amp;products_id=10" id="jppi"&gt;Fundamental Logic iDuino&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a title="Adafruit Xbe Adapter board" href="http://www.adafruit.com/index.php?main_page=product_info&amp;amp;cPath=29&amp;amp;products_id=126" id="jysf"&gt;Adafruit Xbe Adapter board&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a title="Digi Xbee Radio" href="http://search.digikey.com/scripts/DkSearch/dksus.dll?Detail&amp;amp;name=XB24-BCIT-004-ND" id="x7mb"&gt;Digi Xbee Radio&lt;/a&gt; (Digikey part number XB24-BCIT-004-ND)&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;The first four items all came as kits which were assembled in less than 20 minutes. The big advantage of this approach is I am then just gluing together stuff others have built rather than having to build everything from scratch. The Adafruit XBee adapter, for instance, automatically adjusts the voltage down to 3.3 VDC (with the conditioning capacitors) and brings all the connections out neatly rather than having to hunt on the Xbee's pins. Slick.&lt;br /&gt;&lt;br /&gt;Here is another hard to interpret schematic (I really need to run through the Eagle CAD tutorials!):&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;img src="http://docs.google.com/File?id=ddxwhmsv_25qcpbpcg5_b" width="1196" height="927" /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div id="uvw." style="padding: 1em 0pt; text-align: left;"&gt;&lt;div id="kztn" style="padding: 1em 0pt; text-align: left;"&gt;&lt;div id="l_q_" style="padding: 1em 0pt; text-align: left;"&gt;And here it all is installed in a project box I bought from Jameco a while back:&lt;br /&gt;&lt;br /&gt;&lt;img style="width: 650px; height: 488px;" src="http://docs.google.com/File?id=ddxwhmsv_29f8gc5sc7_b" /&gt;&lt;/div&gt;The circuit is built using wire wrap, which is a lightly "olde timey" way to do a circuit board. I rather like it because it is more permanent than a breadboard, but not nearly as much hassle as making a printed circuit board.&lt;br /&gt;&lt;/div&gt;&lt;div id="wtde" style="padding: 1em 0pt; text-align: left;"&gt;&lt;img style="width: 604px; height: 453px;" src="http://docs.google.com/File?id=ddxwhmsv_26hf3bm2k5_b" /&gt;&lt;br /&gt;&lt;div id="xwt6" style="padding: 1em 0pt; text-align: left;"&gt;Now, what is that switch for? It actually doesn't control the power, but rather is hooked to digital pin 6 on the iDuino. When the switch is tripped, it sends out the "h" command over the Xbee which turns on LED2 on my remote unit. All this really demonstrates is the ability to send simple I/O back to the remote sensor from the indoor display. Not very practical, but remember that this is all just a prototype for something that does real work remotely!&lt;br /&gt;&lt;br /&gt;The source code is shown below. The interesting thing is that this uses both the hard serial port on the Arduino and the Lady Ada AFSerial library (&lt;a title="click here for more info" href="http://www.ladyada.net/make/eshield/download.html" id="bw3n"&gt;click here for more info&lt;/a&gt; ) to create a second soft serial port off of pins 2 &amp;amp; 3 on the iDuino. The interesting thing about this is that I found I could NOT use the Arduino software serial library (found &lt;a title="here" href="http://www.arduino.cc/en/Tutorial/SoftwareSerial" id="zpk2"&gt;here&lt;/a&gt;). While I have been able to use this oibrary to send info to the SerialLCD display, it will not receive serial properly - if there is a call to the hardware serial port, then the Arduino software serial port no longer works. The funny thing is the AFSerial library from Laday Ada works perfectly - just like another hardware serial port. No idea why.&lt;br /&gt;&lt;br /&gt;Again, a lot of this code is concerned with running the DS18B20 Onewire temperature sensor.&lt;br /&gt;&lt;br /&gt;&lt;pre name="code" class="cpp"&gt;&lt;br /&gt;/* Indoor display for Indoor Outdoor thermometer&lt;br /&gt;copyright Chris Armour */&lt;br /&gt;&lt;br /&gt;#include &lt;AFSoftSerial.h&gt;&lt;br /&gt;&lt;br /&gt;#define TEMP_PIN  5&lt;br /&gt;&lt;br /&gt;AFSoftSerial mySerial =  AFSoftSerial(3,2);&lt;br /&gt;void OneWireReset(int Pin);&lt;br /&gt;void OneWireOutByte(int Pin, byte d);&lt;br /&gt;byte OneWireInByte(int Pin);&lt;br /&gt;&lt;br /&gt;int i = 0;&lt;br /&gt;int incomingNumber[4];&lt;br /&gt;int incomingByte = 0;&lt;br /&gt;char outMinusBit = '+';&lt;br /&gt;int outTempDig1 = 0;&lt;br /&gt;int outTempDig2 = 0;&lt;br /&gt;int ButtonPin = 6;&lt;br /&gt;int LEDPin = 12;&lt;br /&gt;int switchState = 0;&lt;br /&gt;long previousMillis = 0;        &lt;br /&gt;long interval = 3000;           &lt;br /&gt;&lt;br /&gt;void setup() {&lt;br /&gt;  Serial.begin(9600);&lt;br /&gt;  digitalWrite(TEMP_PIN, LOW);&lt;br /&gt;  pinMode(TEMP_PIN, INPUT);      // sets the digital pin as input (logic 1)&lt;br /&gt;  mySerial.begin(9600);&lt;br /&gt;  pinMode(ButtonPin, INPUT);&lt;br /&gt;  pinMode(LEDPin, OUTPUT);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;void loop() {&lt;br /&gt;&lt;br /&gt;// ======= The following is all code to control the OneWire sensor ==========//&lt;br /&gt;  int HighByte, LowByte, TReading, SignBit, Tc_100, Whole, MinusBit;&lt;br /&gt;  OneWireReset(TEMP_PIN);&lt;br /&gt;  OneWireOutByte(TEMP_PIN, 0xcc);&lt;br /&gt;  OneWireOutByte(TEMP_PIN, 0x44); // perform temperature conversion, strong pullup for one sec&lt;br /&gt;&lt;br /&gt;  OneWireReset(TEMP_PIN);&lt;br /&gt;  OneWireOutByte(TEMP_PIN, 0xcc);&lt;br /&gt;  OneWireOutByte(TEMP_PIN, 0xbe);&lt;br /&gt;&lt;br /&gt;  LowByte = OneWireInByte(TEMP_PIN);&lt;br /&gt;  HighByte = OneWireInByte(TEMP_PIN);&lt;br /&gt;  TReading = (HighByte &lt;&lt; 8) + LowByte;&lt;br /&gt;  SignBit = TReading &amp; 0x8000;  // test most sig bit&lt;br /&gt;  if (SignBit) // negative&lt;br /&gt;  {&lt;br /&gt;    TReading = (TReading ^ 0xffff) + 1; // 2's comp&lt;br /&gt;  }&lt;br /&gt;  Tc_100 = (6 * TReading) + TReading / 4;    // multiply by (100 * 0.0625) or 6.25&lt;br /&gt;&lt;br /&gt;  Whole = Tc_100 / 100;  // separate off the whole and fractional portions&lt;br /&gt;&lt;br /&gt;//=========&gt; End of the OneWire code MinusBit is the +/- &amp; Whole is the temp ====/&lt;br /&gt;//if (millis() - previousMillis &gt; interval){&lt;br /&gt;//  previousMillis = millis();&lt;br /&gt; if (Serial.available() &gt; 0) {&lt;br /&gt;//Read the first four characters when serial is received from the Xbee&lt;br /&gt;   for (int i=0; i &lt;= 4; i ++){&lt;br /&gt; // read the incoming byte:&lt;br /&gt; incomingByte = Serial.read();&lt;br /&gt;        incomingNumber[i] = incomingByte - 48;&lt;br /&gt;         }&lt;br /&gt;         Serial.flush();&lt;br /&gt;         //Discard the rest&lt;br /&gt;     }&lt;br /&gt;    &lt;br /&gt;    if (incomingNumber[0] == 1) // Test if the first bit in indicates a positive or negative temp.&lt;br /&gt;              {&lt;br /&gt;                outMinusBit = '-';&lt;br /&gt;              }&lt;br /&gt;            else if (incomingNumber[0] == 0)&lt;br /&gt;            {&lt;br /&gt;              outMinusBit = '+';&lt;br /&gt;            }&lt;br /&gt;            outTempDig1 = incomingNumber[2]; //Assign the first digit of the temp&lt;br /&gt;            outTempDig2 = incomingNumber[3]; //Assign the 2nd digit of the temp&lt;br /&gt;&lt;br /&gt;  //Clear the LCD screen&lt;br /&gt;  delay(1);&lt;br /&gt;  Serial.print(254, BYTE);&lt;br /&gt;  delay(1);&lt;br /&gt;  Serial.print(1, BYTE); &lt;br /&gt;  delay(1);&lt;br /&gt;&lt;br /&gt;//Print out the inside temp&lt;br /&gt;  Serial.print("Inside Temp: ");&lt;br /&gt;   if (SignBit) // If its negative&lt;br /&gt;  {&lt;br /&gt;    MinusBit = 1; &lt;br /&gt;    Serial.print("-");&lt;br /&gt;  }&lt;br /&gt;  else&lt;br /&gt;  {&lt;br /&gt;    MinusBit = 0;&lt;br /&gt;    Serial.print("+");&lt;br /&gt;  }&lt;br /&gt;  &lt;br /&gt;delay(1);&lt;br /&gt;Serial.print(Whole);&lt;br /&gt;//Print out the outside temp&lt;br /&gt;Serial.print("    ");&lt;br /&gt;Serial.print("Outside Temp: ");&lt;br /&gt;Serial.print(outMinusBit);&lt;br /&gt;Serial.print(outTempDig1);&lt;br /&gt;//Only print the 2nd digit if there is a positive value&lt;br /&gt;if (outTempDig2 &gt;= 0){&lt;br /&gt;    Serial.print(outTempDig2);&lt;br /&gt;  }&lt;br /&gt;  else {&lt;br /&gt;    Serial.print(" ");&lt;br /&gt;  }&lt;br /&gt;//take a break&lt;br /&gt;delay(2000);&lt;br /&gt;  mySerial.print(103, BYTE);&lt;br /&gt;//}&lt;br /&gt;&lt;br /&gt;  switchState = digitalRead(ButtonPin);&lt;br /&gt;delay(100);&lt;br /&gt;if (switchState == 1){&lt;br /&gt;  digitalWrite(LEDPin, HIGH);&lt;br /&gt;  mySerial.print(104, BYTE);&lt;br /&gt;}&lt;br /&gt;else {&lt;br /&gt;  digitalWrite(LEDPin, LOW);&lt;br /&gt;  mySerial.print(108, BYTE);&lt;br /&gt;}&lt;br /&gt;} &lt;br /&gt;&lt;br /&gt;//=============OneWire functions below==============//&lt;br /&gt;&lt;br /&gt;void OneWireReset(int Pin) // reset.  Should improve to act as a presence pulse&lt;br /&gt;{&lt;br /&gt;     digitalWrite(Pin, LOW);&lt;br /&gt;     pinMode(Pin, OUTPUT); // bring low for 500 us&lt;br /&gt;     delayMicroseconds(500);&lt;br /&gt;     pinMode(Pin, INPUT);&lt;br /&gt;     delayMicroseconds(500);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;void OneWireOutByte(int Pin, byte d) // output byte d (least sig bit first).&lt;br /&gt;{&lt;br /&gt;   byte n;&lt;br /&gt;&lt;br /&gt;   for(n=8; n!=0; n--)&lt;br /&gt;   {&lt;br /&gt;      if ((d &amp; 0x01) == 1)  // test least sig bit&lt;br /&gt;      {&lt;br /&gt;         digitalWrite(Pin, LOW);&lt;br /&gt;         pinMode(Pin, OUTPUT);&lt;br /&gt;         delayMicroseconds(5);&lt;br /&gt;         pinMode(Pin, INPUT);&lt;br /&gt;         delayMicroseconds(60);&lt;br /&gt;      }&lt;br /&gt;      else&lt;br /&gt;      {&lt;br /&gt;         digitalWrite(Pin, LOW);&lt;br /&gt;         pinMode(Pin, OUTPUT);&lt;br /&gt;         delayMicroseconds(60);&lt;br /&gt;         pinMode(Pin, INPUT);&lt;br /&gt;      }&lt;br /&gt;&lt;br /&gt;      d=d&gt;&gt;1; // now the next bit is in the least sig bit position.&lt;br /&gt;   }&lt;br /&gt;   &lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;byte OneWireInByte(int Pin) // read byte, least sig byte first&lt;br /&gt;{&lt;br /&gt;    byte d, n, b;&lt;br /&gt;&lt;br /&gt;    for (n=0; n&lt;8; n++)&lt;br /&gt;    {&lt;br /&gt;        digitalWrite(Pin, LOW);&lt;br /&gt;        pinMode(Pin, OUTPUT);&lt;br /&gt;        delayMicroseconds(5);&lt;br /&gt;        pinMode(Pin, INPUT);&lt;br /&gt;        delayMicroseconds(5);&lt;br /&gt;        b = digitalRead(Pin);&lt;br /&gt;        delayMicroseconds(50);&lt;br /&gt;        d = (d &gt;&gt; 1) | (b&lt;&lt;7); // shift d to right and insert b in most sig bit position&lt;br /&gt;    }&lt;br /&gt;    return(d);&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4454770415619038436-9133894822072108320?l=opensource-torchris.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://opensource-torchris.blogspot.com/feeds/9133894822072108320/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://opensource-torchris.blogspot.com/2009/01/indoor-outdoor-temp-display.html#comment-form' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4454770415619038436/posts/default/9133894822072108320'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4454770415619038436/posts/default/9133894822072108320'/><link rel='alternate' type='text/html' href='http://opensource-torchris.blogspot.com/2009/01/indoor-outdoor-temp-display.html' title='Indoor Outdoor Temp Display'/><author><name>Torchris</name><uri>http://www.blogger.com/profile/05149708403435853046</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='26' src='http://1.bp.blogspot.com/_Q6HcmhbUwp8/SYHApptPSoI/AAAAAAAAABQ/Ggl9qnbr7gE/S220/altered-clown.jpg'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4454770415619038436.post-2930171067073936512</id><published>2009-01-12T19:28:00.001-08:00</published><updated>2009-01-12T19:39:14.126-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='OneWire'/><category scheme='http://www.blogger.com/atom/ns#' term='Xbee'/><category scheme='http://www.blogger.com/atom/ns#' term='Arduino'/><title type='text'>My Arduino Sensor Network</title><content type='html'>Alright, now has come the time to start discussing the meat of my development projects, which is a very simple sensor network linked via Zigbee radio. In itself, this isn't really terribly useful. All it does is record outside temperature and light levels and then display them with a serial-LCD display by my desk. You could do most of this with a simple wireless indoor-outdoor thermometer from Canadian Tire! However, what I am really building towards is building the control system for a solar pool heater for next summer's pool season so I don't have to faint from hypothermia every time I go for a swim.&lt;br /&gt;&lt;br /&gt;Here is a diagram of the current system:&lt;br /&gt;&lt;br /&gt;&lt;div id="z63e" style="padding: 1em 0pt; text-align: left;"&gt;&lt;img style="width: 604px; height: 453px;" src="http://docs.google.com/File?id=ddxwhmsv_16hcgxzv8m_b" /&gt;&lt;/div&gt;The three components are - each will be discussed in their own posts:&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;b&gt;Gumstix webserver &amp;amp; data logger&lt;/b&gt; - This uses a Gumstix Linux box and a simple RS232 link to talk to an Xbee Zigbee radio from Digi (formerly Maxstream). &lt;a title="Click here for more info on the radios." href="http://www.digi.com/products/embeddedsolutions/zigbeesolutions/" id="uzq4"&gt;Click here for more info on the radios.&lt;/a&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;Indoor display &amp;amp; indoor temp sensor -&lt;/b&gt; This displays the indoor temp from a local sensor and the outdoor temp from the remote.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;Remote light &amp;amp; temp sensor -  &lt;/b&gt;I will discuss this in more detail next.&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;h3&gt;Remote Sensor unit:&lt;br /&gt;&lt;/h3&gt;&lt;div&gt;This is probably the most critical unit. It contains:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;A DS1820 OneWire precision temperature sensor&lt;/li&gt;&lt;li&gt;A photoresistor light sensor&lt;/li&gt;&lt;li&gt;The on-bard Arduino LED connected to digital pin 13 shows whether the light level has crossed a threshold&lt;br /&gt;&lt;/li&gt;&lt;li&gt;The other LED is to test sending commands over the Xbee&lt;/li&gt;&lt;li&gt;It can optionally have a moisture detector, but I have taken this out for now&lt;/li&gt;&lt;li&gt;Power regulators for 5 VDC (for the Arduino) and 3.3 VDC for the Xbee&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;Here is a rather idosycratic schedmatic:&lt;br /&gt;&lt;br /&gt;&lt;div id="jwhi" style="padding: 1em; text-align: center;"&gt;&lt;img style="width: 100%;" src="http://docs.google.com/File?id=ddxwhmsv_17d6hkstdp_b" /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: left;"&gt;Here is a view showing the layout of the components when it was using my Arduino Nano:&lt;br /&gt;&lt;br /&gt;&lt;div id="g1-2" style="padding: 1em 0pt; text-align: left;"&gt;&lt;img src="http://docs.google.com/File?id=ddxwhmsv_19gqhfspcd_b" width="401" height="535" /&gt;&lt;/div&gt;And here is a more resent shot showing it with my new DuinoStamp installed:&lt;br /&gt;&lt;br /&gt;&lt;div id="bxkm" style="padding: 1em 0pt; text-align: left;"&gt;&lt;img src="http://docs.google.com/File?id=ddxwhmsv_20mrn36zcr_b" width="584" height="439" /&gt;&lt;/div&gt;&lt;br /&gt;Good heavens I do sloppy breadboard installations! The plastic food container idea comes from Tom Igoe's excellent &lt;a title="Making Things Talk" href="http://www.amazon.ca/Making-Things-Talk-Practical-Connecting/dp/0596510519/ref=sr_1_3?ie=UTF8&amp;amp;s=books&amp;amp;qid=1231816743&amp;amp;sr=8-3" id="gn63"&gt;Making Things Talk&lt;/a&gt;, which is definitely the first book to buy if you are interested in this stuff. The box is reasonably weatherpoof and I have had this running outdoors for quite a while with no problems.&lt;br /&gt;&lt;br /&gt;The firmware for the remote is reasonably simple, it checks the state of the two sensors (three if the moisture detector is installed) and the values received via the Xbee serial link. If a "g" character (ASCII 103) then the Arduino pushes out the values of the sensors and the state of the two on-board LEDs out over the Xbee. If an "h" is received (ASCII 104) then the Arduino turns on LED 2 connected to digital pin 7. If an "l" is received (ASCII 108) then the LED is turned off.&lt;br /&gt;&lt;br /&gt;For those who absolutely have to see the source code, it is posted &lt;a href="http://www.geocities.com/chris.armour@rogers.com/transfer/Arduino_gum_temp.txt"&gt;here&lt;/a&gt;. There is a lot of material related to the OneWire digital temp sensor that, frankly, I don't understand, but I borrowed from &lt;a href="http://www.phanderson.com/arduino/ds18b20_1.html"&gt;here&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;That should be enough for now. Next up will be the Gumstix webserver &amp;amp; data logger.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4454770415619038436-2930171067073936512?l=opensource-torchris.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://opensource-torchris.blogspot.com/feeds/2930171067073936512/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://opensource-torchris.blogspot.com/2009/01/my-arduino-sensor-network.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4454770415619038436/posts/default/2930171067073936512'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4454770415619038436/posts/default/2930171067073936512'/><link rel='alternate' type='text/html' href='http://opensource-torchris.blogspot.com/2009/01/my-arduino-sensor-network.html' title='My Arduino Sensor Network'/><author><name>Torchris</name><uri>http://www.blogger.com/profile/05149708403435853046</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='26' src='http://1.bp.blogspot.com/_Q6HcmhbUwp8/SYHApptPSoI/AAAAAAAAABQ/Ggl9qnbr7gE/S220/altered-clown.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4454770415619038436.post-1116187640967129400</id><published>2009-01-11T18:58:00.001-08:00</published><updated>2009-01-22T15:07:34.959-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Avrdude'/><category scheme='http://www.blogger.com/atom/ns#' term='StampDuino'/><category scheme='http://www.blogger.com/atom/ns#' term='capacitor'/><category scheme='http://www.blogger.com/atom/ns#' term='Arduino'/><title type='text'>Another darned *Duino!</title><content type='html'>Just a short post to document my most recent acquisition, which is yet another form factor/variant of the Arduino, this time the DuinoStamp. This is a small, breadboardable version of the Arduino which is described at &lt;a title="Spifie.org" href="http://www.spiffie.org/kits/duinostamp/" id="mopg"&gt;Spifie.org&lt;/a&gt; and orderable from Fundamental Logic (click &lt;a title="here to go to their order page" href="http://store.fundamentallogic.com/ecom/index.php?main_page=index&amp;amp;cPath=15" id="a03c"&gt;here to go to their order page&lt;/a&gt;). It cost less than $10 for the kit, so I went crazy and ordered four just to have a stock of spare ones.&lt;br /&gt;&lt;br /&gt;This comes as a very straightforward kit that takes all of about 15 minutes to solder up. Here is what it looks like all done up on a breadboard:&lt;br /&gt;&lt;br /&gt;&lt;div id="b4ed" style="padding: 1em 0pt; text-align: left;"&gt;&lt;img style="width: 640px; height: 348.83px;" src="http://docs.google.com/File?id=ddxwhmsv_13fkqgcpf6_b" /&gt;&lt;br /&gt;&lt;br /&gt;This is a very basic *Duino that doesn't include a built in USB interface (similar to the &lt;a title="Arduino Mini" href="http://arduino.cc/en/Main/ArduinoBoardMini" id="lfvh"&gt;Arduino Mini&lt;/a&gt;, but a bit bigger). You therefore need to rig it up to an external USB to TTL serial converter, which is where I ran into a minor hiccup.&lt;br /&gt;&lt;br /&gt;The problem is that on the new model Arduinos, they load up software very nicely and you don't need to do anything special, but with the older Arduino models you need to fiddle with the reset button at the exact right time to get them to upload new firmware. This is initially how I thought you had to use the DuinoStamp, but it was very frustrating trying to figure out the exact right timing for the reset and an error message that looks like:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:Courier New;"&gt;avrdude: stk500_getsync(): not in sync: resp=0x60&lt;/span&gt; &lt;span style="font-family:Courier New;"&gt;avrdude: stk500_disable(): protocol error, expect=0x14, resp=0x66&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;(Whoever "Avrdude" is?). Anyway, I dropped a note to the Fundamental Logic people and Kevin got back to me right away and said the trick is to put a 0.1 uF capacitor between the RST pin on the DuinoStamp and the DTR pin on the USB adapter. Here is a rather crude scheamtic:&lt;br /&gt;&lt;br /&gt;&lt;div id="a_:l" style="padding: 1em 0pt; text-align: left;"&gt;&lt;img style="width: 983px; height: 323px;" src="http://docs.google.com/File?id=ddxwhmsv_145zqfj4gb_b" /&gt;&lt;br /&gt;&lt;br /&gt;So, now I can upload new firmware to the StampDuino, I shall try to port over some of my other projects to this new form factor.&lt;br /&gt;&lt;br /&gt;Next up, I need to start describing my Xbee sensor network, which is the prototype/proof-of-concept of what will hopefully someday be a solar pool heater!&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4454770415619038436-1116187640967129400?l=opensource-torchris.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://opensource-torchris.blogspot.com/feeds/1116187640967129400/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://opensource-torchris.blogspot.com/2009/01/another-darned-duino.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4454770415619038436/posts/default/1116187640967129400'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4454770415619038436/posts/default/1116187640967129400'/><link rel='alternate' type='text/html' href='http://opensource-torchris.blogspot.com/2009/01/another-darned-duino.html' title='Another darned *Duino!'/><author><name>Torchris</name><uri>http://www.blogger.com/profile/05149708403435853046</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='26' src='http://1.bp.blogspot.com/_Q6HcmhbUwp8/SYHApptPSoI/AAAAAAAAABQ/Ggl9qnbr7gE/S220/altered-clown.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4454770415619038436.post-3318207764959538144</id><published>2009-01-03T19:41:00.000-08:00</published><updated>2009-01-22T15:06:01.487-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='facebook'/><category scheme='http://www.blogger.com/atom/ns#' term='rfid'/><category scheme='http://www.blogger.com/atom/ns#' term='php'/><title type='text'>More on the RFID updater</title><content type='html'>&lt;span style="font-family:arial;"&gt;In the spirit of full disclosure, I thought I would describe a bit more of the internals of how the RFID Updater works for those who might be interested.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;Here is what it actually looks like in Facebook:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_Q6HcmhbUwp8/SWA0kLQTg8I/AAAAAAAAABE/VLOXHp-5Fq8/s1600-h/rfid_updater_screen.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 200px; height: 200px;" src="http://2.bp.blogspot.com/_Q6HcmhbUwp8/SWA0kLQTg8I/AAAAAAAAABE/VLOXHp-5Fq8/s200/rfid_updater_screen.jpg" alt="" id="BLOGGER_PHOTO_ID_5287283758634075074" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;This is generated by three different PHP files.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-family:arial;" &gt;rfid_test.php &lt;/span&gt;&lt;span style="font-family:arial;"&gt;- This one actually does the interaction with the serial port on my Gumstix to read the value of the most recent RFID card:&lt;br /&gt;&lt;br /&gt;&lt;pre name="code" class="cpp"&gt;&lt;br /&gt;&amp;lt;?php&lt;br /&gt;include "php_serial.class.php";&lt;br /&gt;$tagfile = 'tag.txt';&lt;br /&gt;&lt;br /&gt;// configure the serial port using php_serial.class.php&lt;br /&gt; $serial = new phpSerial;&lt;br /&gt; $serial-&gt;deviceSet("/dev/ttyS2");&lt;br /&gt; $serial-&gt;confBaudRate(9600);&lt;br /&gt; $serial-&gt;confParity("none");&lt;br /&gt; $serial-&gt;confCharacterLength(8);&lt;br /&gt; $serial-&gt;confStopBits(1);&lt;br /&gt; $serial-&gt;confFlowControl("none");&lt;br /&gt; $serial-&gt;deviceOpen();&lt;br /&gt;&lt;br /&gt; while(1){&lt;br /&gt;  $rfidTag = $serial-&gt;readPort();&lt;br /&gt;  if ($rfidTag != NULL) {&lt;br /&gt;                 $filehandle = fopen($tagfile, "w");&lt;br /&gt;   $rfidTagTrim = trim($rfidTag, "\x02..\x03");&lt;br /&gt;   $rfidTagShort = substr($rfidTagTrim,7,5);&lt;br /&gt;   print("The shortened tag is $rfidTagShort\n");&lt;br /&gt;   fwrite($filehandle,$rfidTagShort);&lt;br /&gt;   fclose($filehandle);&lt;br /&gt;   if (strlen($rfidTagTrim) &amp;lt; 10) {&lt;br /&gt;    echo "oops";&lt;br /&gt;   }&lt;br /&gt;  }&lt;br /&gt;  usleep(1500000);&lt;br /&gt;//  $serial-&gt;flush; &lt;br /&gt; }&lt;br /&gt;?&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;This writes the RFID tag number to a small file in the application directory. Note that this references the highly useful "php_serial.class.php" class which can be found &lt;/span&gt;&lt;a style="font-family: arial;" href="http://www.phpclasses.org/browse/package/3679.html"&gt;at this location&lt;/a&gt;&lt;span style="font-family:arial;"&gt;. I would be lost without the ability to interact with the serial port!&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;facebook_rfid.php &lt;/span&gt;- This presents the screen shown up above in Facebook and some basic info about me as a user and my last status. Most importantly, it calls up the "iFrame"!&lt;br /&gt;&lt;br /&gt;&lt;pre name="code" class="cpp"&gt;&lt;br /&gt;&amp;lt;?php&lt;br /&gt;// Copyright 2008 Chris Armour.  All Rights Reserved. &lt;br /&gt;// &lt;br /&gt;// Application: RFID Updater&lt;br /&gt;// &lt;br /&gt;// RFID updater updates your status based on various RFID tokens set &lt;br /&gt;//up in the system. &lt;br /&gt;// &lt;br /&gt;&lt;br /&gt;require_once 'facebook.php';&lt;br /&gt;&lt;br /&gt;$appapikey = 'XXXXXXXXXXXXXXXXXXX';&lt;br /&gt;$appsecret = 'XXXXXXXXXXXXXXXXXXX';&lt;br /&gt;$facebook = new Facebook($appapikey, $appsecret);&lt;br /&gt;$facebook-&gt;require_frame();&lt;br /&gt;$user_id = $facebook-&gt;require_login();&lt;br /&gt;&lt;br /&gt;echo "&amp;lt;img style='width: 49px; height: 50px; float: left;' alt='' src='http://gumstix.dlinkddns.com/rfid_update/rfid_components_large.gif'&gt;";&lt;br /&gt;echo "&amp;lt;h1&gt;  Radio Frequency ID Tag Status Updater&amp;lt;/h1&gt;";&lt;br /&gt;echo "&amp;lt;br&gt;";&lt;br /&gt;echo "&amp;lt;br&gt;";&lt;br /&gt;echo "&amp;lt;br&gt;";&lt;br /&gt;echo "&amp;lt;fb:profile-pic uid='$user_id' linked='true' /&gt;";&lt;br /&gt;echo "&amp;lt;p&gt;Hello, &amp;lt;fb:name uid='$user_id' useyou='false'/&gt;!&amp;lt;/p&gt;";&lt;br /&gt;echo "&amp;lt;p&gt;$user_id&amp;lt;/p&gt;";&lt;br /&gt;echo "&amp;lt;p&gt;Current status is: &amp;lt;fb:user-status uid='$user_id' linked='true'/&gt;&amp;lt;/p&gt;";&lt;br /&gt;echo "&amp;lt;fb:prompt-permission perms='status_update'&gt;Would you like to receive status updates from our application?&amp;lt;/fb:prompt-permission&gt;";&lt;br /&gt;echo "&amp;lt;fb:prompt-permission perms='offline_access'&gt;Do you want this application to have offline acceess?&amp;lt;/fb:prompt-permission&gt;";&lt;br /&gt;echo "&amp;lt;fb:iframe src='http://gumstix.dlinkddns.com/rfid_update/run_script.php' style= 'width: 99%;height:350px' smartsize='false' frameborder='yes'&gt;";&lt;br /&gt;echo "&amp;lt;/fb:iframe&gt;";&lt;br /&gt;?&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;The interesting thing to note here is &lt;/span&gt;&lt;span style="font-family:arial;"&gt;line "$facebook-&gt;require_frame();". This was actually MISSING from the sample application provided by Facebook and without it nothing worked! It took a while to figure this out.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-family:arial;" &gt;run_script.php - &lt;/span&gt;&lt;span style="font-family:arial;"&gt;Finally, the actual script that changes the darned status! This is what runs inside the "iFrame". Why did I do it this way? Because, the main application PHP script cannot run an auto-refresh. With no refresh, it never bothers to detect the new RFID card!! So, the solution is to have a window running an iFrame (which is basically a window running another web page) that then has an auto-refresh which checks the RFID tag file periodically to see if it has changed. If it changes, then it spits out a new Facebook update.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;Here is the script:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre name="code" class="cpp"&gt;&lt;br /&gt;&amp;lt;?php&lt;br /&gt;// Copyright 2008 Chris Armour.  All Rights Reserved. &lt;br /&gt;// &lt;br /&gt;// Application: This is the script that actually detects the stat change and updates the status.&lt;br /&gt;// &lt;br /&gt;// RFID updater updates your status based on various RFID tokens set &lt;br /&gt;//up in the system. &lt;br /&gt;// &lt;br /&gt;&lt;br /&gt;$logfile = 'log.txt';&lt;br /&gt;$tagfile = 'tag.txt';&lt;br /&gt;$filehandle1 = fopen($logfile, "r");&lt;br /&gt;$filehandle2 = fopen($tagfile, "r");&lt;br /&gt;$old_state = fread($filehandle1, filesize($logfile));&lt;br /&gt;$tag_num = fread($filehandle2, filesize($tagfile));&lt;br /&gt;fclose($filehandle1);&lt;br /&gt;fclose($filehandle2);&lt;br /&gt;require_once 'facebook.php';&lt;br /&gt;$appapikey = 'XXXXXXXXXXXXXXXXXXXX';&lt;br /&gt;$appsecret = 'XXXXXXXXXXXXXXXXX';&lt;br /&gt;$facebook = new Facebook($appapikey, $appsecret);&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;echo "&amp;lt;!DOCTYPE html PUBLIC '-//W3C//DTD HTML 4.01 Transitional//EN'&gt;";&lt;br /&gt;echo "&amp;lt;html&gt;";&lt;br /&gt;echo "&amp;lt;head&gt;";&lt;br /&gt;echo "&amp;lt;meta content='text/html; charset=ISO-8859-1' http-equiv='content-type'&gt;";&lt;br /&gt;echo "&amp;lt;meta http-equiv='refresh' content='10'&gt;";&lt;br /&gt;echo "&amp;lt;/head&gt;";&lt;br /&gt;echo "&amp;lt;body&gt;";&lt;br /&gt;$csv = "588777472";&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;if ($tag_num == $old_state){&lt;br /&gt; echo "&amp;lt;p&gt;Place an RFID tag near the reader to update your status.&amp;lt;p&gt;";&lt;br /&gt; }&lt;br /&gt; elseif ($tag_num != $old_state){&lt;br /&gt;  switch($tag_num){&lt;br /&gt;  case "51EAE":&lt;br /&gt;   $result = $facebook-&gt;api_client-&gt;Users_setStatus('is gone for a workout.',false);&lt;br /&gt;   echo "&amp;lt;p&gt;Status changed to 51EAE - gone for a workout.&amp;lt;/p&gt;";&lt;br /&gt;   echo "&amp;lt;p&gt;Return code is = $result&amp;lt;/p&gt;";&lt;br /&gt;$result=$facebook-&gt;api_client-&gt;notifications_sendEmail($csv,"RFID Status now gone for a workout", "RFID Updater has changed your status to Gone for a workout","&amp;lt;b&gt;&amp;lt;i&gt;&amp;lt;u&gt;RFID Updater has reset status to gone for a workout.&amp;lt;/u&gt;&amp;lt;/i&gt;&amp;lt;/b&gt;");&lt;br /&gt;   break;&lt;br /&gt;  case "A503F":&lt;br /&gt;   $result = $facebook-&gt;api_client-&gt;Users_setStatus('is not in the office',false);&lt;br /&gt;   echo "&amp;lt;p&gt;Status changed to A503F - not in the office&amp;lt;/p&gt;";&lt;br /&gt;   echo "&amp;lt;p&gt;Return code is = $result&amp;lt;/p&gt;";&lt;br /&gt;$result=$facebook-&gt;api_client-&gt;notifications_sendEmail($csv,"RFID Status now not in the office", "RFID Updater has reset your status to not in the office","&amp;lt;b&gt;&amp;lt;i&gt;&amp;lt;u&gt;RFID Updater has reset your status to not in the office.&amp;lt;/u&gt;&amp;lt;/i&gt;&amp;lt;/b&gt;");&lt;br /&gt;   break;&lt;br /&gt;         case "12B8F":&lt;br /&gt;               $result = $facebook-&gt;api_client-&gt;Users_setStatus('is at work.',false);&lt;br /&gt;                 echo "&amp;lt;p&gt;Status changed to 12B8F - at work&amp;lt;/p&gt;";&lt;br /&gt;                 echo "&amp;lt;p&gt;Return code is = $result&amp;lt;/p&gt;";&lt;br /&gt;$result=$facebook-&gt;api_client-&gt;notifications_sendEmail($csv,"RFID Status is at work", "RFID Updater has reset your status to at work","&amp;lt;b&gt;&amp;lt;i&gt;&amp;lt;u&gt;RFID Updater has reset your status to at work.&amp;lt;/u&gt;&amp;lt;/i&gt;&amp;lt;/b&gt;");&lt;br /&gt;   break;&lt;br /&gt;         case "48EEF":&lt;br /&gt;                 $result = $facebook-&gt;api_client-&gt;Users_setStatus('is testing the RFID updater',false);&lt;br /&gt;                 echo "&amp;lt;p&gt;Status changed to 48EEF - testing&amp;lt;/p&gt;";&lt;br /&gt;                 echo "&amp;lt;p&gt;Return code is = $result&amp;lt;/p&gt;";&lt;br /&gt;$result=$facebook-&gt;api_client-&gt;notifications_sendEmail($csv,"RFID Status now Testing", "RFID Updater has reset your status to testing","&amp;lt;b&gt;&amp;lt;i&gt;&amp;lt;u&gt;RFID Updater has reset your status to testing.&amp;lt;/u&gt;&amp;lt;/i&gt;&amp;lt;/b&gt;"); &lt;br /&gt;   break;&lt;br /&gt;         case "5BC0C":&lt;br /&gt;                 $result = $facebook-&gt;api_client-&gt;Users_setStatus('is watching TV',false);&lt;br /&gt;                 echo "&amp;lt;p&gt;status changed to 5BC0C - watching TV&amp;lt;/p&gt;";&lt;br /&gt;                 echo "&amp;lt;p&gt;Return code is = $result&amp;lt;/p&gt;";&lt;br /&gt;$result=$facebook-&gt;api_client-&gt;notifications_sendEmail($csv,"RFID Status now watching TV", "RFID Updater has reset your status to watching TV","&amp;lt;b&gt;&amp;lt;i&gt;&amp;lt;u&gt;RFID Updater has reset your status to watching TV.&amp;lt;/u&gt;&amp;lt;/i&gt;&amp;lt;/b&gt;");&lt;br /&gt;   break;&lt;br /&gt;  default:&lt;br /&gt;   echo "&amp;lt;p&gt;Card not read. Try again.&amp;lt;/p&gt;";&lt;br /&gt;   }&lt;br /&gt;  }&lt;br /&gt;echo "&amp;lt;/body&gt;";&lt;br /&gt;echo "&amp;lt;/html&gt;";&lt;br /&gt;&lt;br /&gt;$old_state = $tag_num;&lt;br /&gt;$filehandle3 = fopen($logfile, "w");&lt;br /&gt;fwrite($filehandle3,$old_state);&lt;br /&gt;fclose($filehandle3);&lt;br /&gt;&lt;br /&gt;?&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4454770415619038436-3318207764959538144?l=opensource-torchris.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://opensource-torchris.blogspot.com/feeds/3318207764959538144/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://opensource-torchris.blogspot.com/2009/01/more-on-rfid-updater.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4454770415619038436/posts/default/3318207764959538144'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4454770415619038436/posts/default/3318207764959538144'/><link rel='alternate' type='text/html' href='http://opensource-torchris.blogspot.com/2009/01/more-on-rfid-updater.html' title='More on the RFID updater'/><author><name>Torchris</name><uri>http://www.blogger.com/profile/05149708403435853046</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='26' src='http://1.bp.blogspot.com/_Q6HcmhbUwp8/SYHApptPSoI/AAAAAAAAABQ/Ggl9qnbr7gE/S220/altered-clown.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_Q6HcmhbUwp8/SWA0kLQTg8I/AAAAAAAAABE/VLOXHp-5Fq8/s72-c/rfid_updater_screen.jpg' height='72' width='72'/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4454770415619038436.post-5911795714401956958</id><published>2009-01-02T13:37:00.000-08:00</published><updated>2009-01-22T15:06:50.918-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='serial'/><category scheme='http://www.blogger.com/atom/ns#' term='rfid'/><category scheme='http://www.blogger.com/atom/ns#' term='hardware'/><title type='text'>RFID Facebook Updater</title><content type='html'>&lt;span style="font-family:arial;"&gt;I have an RFID reader I bought from&lt;/span&gt;&lt;a style="font-family: arial;" href="http://www.sparkfun.com/"&gt; www.sparkfun.com&lt;/a&gt;&lt;span style="font-family:arial;"&gt; and 5 credit card style RFID cards. The reader is hooked up to my Gumstix small PC via serial.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;I have two PHP scripts running on the Gumstix. One continuously monitors the RFID reader to see if there has been a card read and it writes that value to a file. The other script is the actual Facebook application that picks up the RFID tag value and lines it up with statuses I have assigned the different cards.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;Anyway, very cool to learn how to use RFID and write a very simple Facebook application. In a broader application, this does show that you can "hardware-enable" Facebook so that you could have statuses, new stories, messages generated by a variety of different "real-world" events. This could be a home alarm system or just your plants saying they need to be watered.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;While it is possible to generate these kinds of messages through other means (email, SMS etc), Facebook offers a reasonably comprehensive framework for authentication &amp;amp; messaging and a more-or-less documented API.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;Here is a shot of the updater &amp;amp; my Gumstix:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos-h.ll.facebook.com/photos-ll-snc1/v1102/245/100/588777472/n588777472_1253527_5382.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 397px; height: 297px;" src="http://photos-h.ll.facebook.com/photos-ll-snc1/v1102/245/100/588777472/n588777472_1253527_5382.jpg" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;And here is a diagram:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos-d.ll.facebook.com/photos-ll-snc1/v1102/245/100/588777472/n588777472_1253555_2378.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 421px; height: 315px;" src="http://photos-d.ll.facebook.com/photos-ll-snc1/v1102/245/100/588777472/n588777472_1253555_2378.jpg" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;I have pretty much stopped work on this as my Arduino-based stuff has come back to the fore front. Some of the things I would like to do with this are:&lt;/span&gt;&lt;br /&gt;&lt;ul&gt;&lt;li style="font-family: arial;"&gt;Have the status messages stored in a SQL database so they can be updated more easily (currently they are hardcoded into the PHP script for the FB application).&lt;/li&gt;&lt;li style="font-family: arial;"&gt;Have a "remote reader" with an Arduino &amp;amp; an Xbee radio so your status can be updated anywhere in the house.&lt;/li&gt;&lt;li&gt;&lt;span style="font-family:arial;"&gt;Think about how to scale this up so multiple people could use the application. How would it be hosted, how to architect the reader (Arduino with Xport Ethernet, maybe?). Would there be a demand for a Facebook "hardware add-on"?&lt;/span&gt;&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4454770415619038436-5911795714401956958?l=opensource-torchris.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://opensource-torchris.blogspot.com/feeds/5911795714401956958/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://opensource-torchris.blogspot.com/2009/01/rfid-facebook-updater.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4454770415619038436/posts/default/5911795714401956958'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4454770415619038436/posts/default/5911795714401956958'/><link rel='alternate' type='text/html' href='http://opensource-torchris.blogspot.com/2009/01/rfid-facebook-updater.html' title='RFID Facebook Updater'/><author><name>Torchris</name><uri>http://www.blogger.com/profile/05149708403435853046</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='26' src='http://1.bp.blogspot.com/_Q6HcmhbUwp8/SYHApptPSoI/AAAAAAAAABQ/Ggl9qnbr7gE/S220/altered-clown.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4454770415619038436.post-5979701677734164852</id><published>2009-01-01T16:52:00.000-08:00</published><updated>2009-01-22T15:09:01.416-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><category scheme='http://www.blogger.com/atom/ns#' term='Asterisk'/><category scheme='http://www.blogger.com/atom/ns#' term='Arduino'/><title type='text'>A short history of time wastage</title><content type='html'>&lt;span style="font-size:100%;"&gt;&lt;span style="font-family:arial;"&gt;Just to start out, I wanted to go over a few of the things I have done over the years with this kinds of stuff...&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-weight: bold;font-family:arial;font-size:100%;"  &gt;1995&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-family:arial;"&gt; - I first tried to install FreeBSD and just about fried my old 486! Sometime this year I did manage to get Slackware installed for the first time.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-weight: bold;font-family:arial;font-size:100%;"  &gt;1998 - &lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;span style=";font-family:arial;font-size:100%;"  &gt;Some time around this time I got interested in PC parallel port programming and I built a simple interface box with two solid state relays tied to a couple of electrical outlets. When I sent the right combination of characters down the parallel port (thus turning on or off different bits) it would trip the the solid state relays which would turn the outlets on or off.&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:arial;"&gt;&lt;span style="font-size:100%;"&gt;Here is the box on the left making a guest appearance with my Arduino:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;a style="font-family: arial;" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos-d.ak.fbcdn.net/photos-ak-sf2p/v357/245/100/588777472/n588777472_1062099_315.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 407px; height: 305px;" src="http://photos-d.ak.fbcdn.net/photos-ak-sf2p/v357/245/100/588777472/n588777472_1062099_315.jpg" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;span style=";font-family:arial;font-size:100%;"  &gt;At the time I wrote a small Tk/tcl GUI in Linux that would control the outlets and I was quite pleased with myself.This has since been lost in various reformattings.&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-weight: bold;font-family:arial;font-size:100%;"  &gt;2000 - &lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;span style=";font-family:arial;font-size:100%;"  &gt;Seeing the parallel port device still hanging around my office, I decided to write some new software for it, this time with Visual Basic. This allowed me to turn the outlets on and off, and set schedules. Most interesting, it would monitor email for a message with a certain format and then turn the outlets on or off - in other words, a very simple form of internet remote control. When I look over this software it actually has quite a few features:&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=";font-family:arial;font-size:100%;"  &gt;The main screen &amp;amp; email monitor screen (click on the pictures for full size, clearer versions):&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a style="font-family: arial;" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_Q6HcmhbUwp8/SV16YGtGQAI/AAAAAAAAAAc/Z8Gvu6Clkvo/s1600-h/para_pwr_main.jpg"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 241px; height: 217px;" src="http://2.bp.blogspot.com/_Q6HcmhbUwp8/SV16YGtGQAI/AAAAAAAAAAc/Z8Gvu6Clkvo/s200/para_pwr_main.jpg" alt="" id="BLOGGER_PHOTO_ID_5286516092138045442" border="0" /&gt;&lt;/a&gt;&lt;a style="font-family: arial;" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_Q6HcmhbUwp8/SV16ilUWWRI/AAAAAAAAAAk/fwjbjLAjZuQ/s1600-h/para_pwr_email_monitor.jpg"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 233px; height: 211px;" src="http://4.bp.blogspot.com/_Q6HcmhbUwp8/SV16ilUWWRI/AAAAAAAAAAk/fwjbjLAjZuQ/s200/para_pwr_email_monitor.jpg" alt="" id="BLOGGER_PHOTO_ID_5286516272154433810" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;img style="font-family: arial;" src="file:///C:/DOCUME%7E1/CHRISA%7E1/LOCALS%7E1/Temp/moz-screenshot.jpg" alt="" /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;&lt;br /&gt;&lt;span style="font-size:100%;"&gt;The "Options" &amp;amp; "Advanced Options":&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a style="font-family: arial;" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_Q6HcmhbUwp8/SV17SfG53jI/AAAAAAAAAAs/E4dLYl3RIRs/s1600-h/para_pwr_options.jpg"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 199px; height: 222px;" src="http://2.bp.blogspot.com/_Q6HcmhbUwp8/SV17SfG53jI/AAAAAAAAAAs/E4dLYl3RIRs/s200/para_pwr_options.jpg" alt="" id="BLOGGER_PHOTO_ID_5286517095121149490" border="0" /&gt;&lt;/a&gt;&lt;a style="font-family: arial;" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_Q6HcmhbUwp8/SV17etI4_mI/AAAAAAAAAA0/n2sSW1-6rug/s1600-h/para_pwr_advanced.jpg"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 195px; height: 217px;" src="http://2.bp.blogspot.com/_Q6HcmhbUwp8/SV17etI4_mI/AAAAAAAAAA0/n2sSW1-6rug/s200/para_pwr_advanced.jpg" alt="" id="BLOGGER_PHOTO_ID_5286517305046007394" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:100%;"&gt;It even produced a decent log file:&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a style="font-family: arial;" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_Q6HcmhbUwp8/SV17tTxd5jI/AAAAAAAAAA8/3MvsTFJQqoY/s1600-h/para_pwr_log.jpg"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 403px; height: 145px;" src="http://2.bp.blogspot.com/_Q6HcmhbUwp8/SV17tTxd5jI/AAAAAAAAAA8/3MvsTFJQqoY/s200/para_pwr_log.jpg" alt="" id="BLOGGER_PHOTO_ID_5286517555934914098" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:100%;"&gt;It was cool to be able to hook up my Christmas lights and go across the street to my in-laws and turn them on or off with an email.&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-weight: bold;font-family:arial;font-size:100%;"  &gt;2001 to 2003&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-family:arial;"&gt; - Through this time I was obsessed with metalworking and machining. In that time I went to Mohawk and got the following certificates:&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;ul  style="font-family:arial;"&gt;&lt;li&gt;&lt;span style="font-size:100%;"&gt;CAD drafting&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:100%;"&gt;Machining&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:100%;"&gt;CNC Machining&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-family:arial;"&gt;It was a huge amount of work and I also managed to design and build some cool steam engines along the way. Someday I will start a side area to cover machining topics.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-weight: bold;font-family:arial;font-size:100%;"  &gt;2004 - &lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-family:arial;"&gt;I had been interested in Asterisk (&lt;/span&gt;&lt;a style="font-family: arial;" href="http://www.asterisk.org/"&gt;www.asterisk.org&lt;/a&gt;&lt;span style="font-family:arial;"&gt;) for a while, so I naturally I hooked the old parallel port device up to my Asterisk Linux box and built an IVR that controlled the power sockets. You could dial into the system from any phone on the PSTN and work through the prompts to turn my Christmas lights on or off. It was pretty cool!&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-weight: bold;font-family:arial;font-size:100%;"  &gt;2007 - &lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;span style=";font-family:arial;font-size:100%;"  &gt;I bought a SerialLCD display from Sparkfun (&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;a style="font-family: arial;" href="http://www.sparkfun.com/"&gt;www.sparkfun.com&lt;/a&gt;&lt;/span&gt;&lt;span style=";font-family:arial;font-size:100%;"  &gt;) to start playing around with some embedded concepts. Basically, it is run by a Linux virtual PC running on my Windows PC (in VMWare) which in turn is interfaced to an LCD display. A simple PHP script downloads the RSS feed from the Weather Underground website and then does a bit of text processing before sending out over the serial port of my PC.&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:arial;"&gt;&lt;span style="font-size:100%;"&gt;Here is a diagram:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;a style="font-family: arial;" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos-a.ll.facebook.com/photos-ll-sf2p/v151/245/100/588777472/n588777472_270672_663.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 412px; height: 356px;" src="http://photos-a.ll.facebook.com/photos-ll-sf2p/v151/245/100/588777472/n588777472_270672_663.jpg" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=";font-family:arial;font-size:100%;"  &gt;Here is is reporting the weather! A good Canadian obsession, and a good bit of dynamic info that is easily available via the web.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a style="font-family: arial;" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos-e.ll.facebook.com/photos-ll-sf2p/v151/245/100/588777472/n588777472_270660_4764.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 422px; height: 316px;" src="http://photos-e.ll.facebook.com/photos-ll-sf2p/v151/245/100/588777472/n588777472_270660_4764.jpg" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-weight: bold;font-family:arial;font-size:100%;"  &gt;Later in 2007 -&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;span style=";font-family:arial;font-size:100%;"  &gt; I bought my Gumstix small embedded system (&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;a style="font-family: arial;" href="http://www.gumstix.com/"&gt;www.gumstix.com&lt;/a&gt;&lt;/span&gt;&lt;span style=";font-family:arial;font-size:100%;"  &gt;). While very powerful (and tiny), I have, frankly, found the Gumstix enormously frustrating - a typical Linux-pounding-head-on-desk adventure. Poor documentation, badly organized FAQs, an unevenly responsive newsgroup, etc. etc etc. I have been able to get most things working on it, which will be seen in later posts, but I have totally failed to get the LCD screen to do anything halfway useful (although the touchscreen does work). &lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=";font-family:arial;font-size:100%;"  &gt;You can see some machining &amp;amp; craft work that I put into building a case &lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;a style="font-family: arial;" href="http://www.facebook.com/album.php?aid=16794&amp;amp;l=6268d&amp;amp;id=588777472"&gt;at this location&lt;/a&gt;&lt;/span&gt;&lt;span style=";font-family:arial;font-size:100%;"  &gt;.&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=";font-family:arial;font-size:100%;"  &gt;That is about enough of this for now. Next I will start documenting my Arduino adventures!&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4454770415619038436-5979701677734164852?l=opensource-torchris.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://opensource-torchris.blogspot.com/feeds/5979701677734164852/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://opensource-torchris.blogspot.com/2009/01/short-history-of-time-wastage.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4454770415619038436/posts/default/5979701677734164852'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4454770415619038436/posts/default/5979701677734164852'/><link rel='alternate' type='text/html' href='http://opensource-torchris.blogspot.com/2009/01/short-history-of-time-wastage.html' title='A short history of time wastage'/><author><name>Torchris</name><uri>http://www.blogger.com/profile/05149708403435853046</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='26' src='http://1.bp.blogspot.com/_Q6HcmhbUwp8/SYHApptPSoI/AAAAAAAAABQ/Ggl9qnbr7gE/S220/altered-clown.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_Q6HcmhbUwp8/SV16YGtGQAI/AAAAAAAAAAc/Z8Gvu6Clkvo/s72-c/para_pwr_main.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4454770415619038436.post-1238017211639596390</id><published>2008-12-31T19:08:00.001-08:00</published><updated>2008-12-31T19:15:50.934-08:00</updated><title type='text'>Starting out...</title><content type='html'>&lt;span style="font-family:arial;"&gt;Just to be clear, this is really just an online notebook for me to post my personal projects involving Gumstix, Arduino, Linux and whatever other things I am playing with. &lt;/span&gt;&lt;span style="font-family:arial;"&gt;I will initially just port over some material I have posted to Facebook and then I will add in future developments as they occur.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos-d.ak.fbcdn.net/photos-ak-snc1/v1967/245/100/588777472/n588777472_1369491_2003.jpg"&gt;&lt;img style="cursor: pointer; width: 416px; height: 313px;" src="http://photos-d.ak.fbcdn.net/photos-ak-snc1/v1967/245/100/588777472/n588777472_1369491_2003.jpg" alt="" border="0" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4454770415619038436-1238017211639596390?l=opensource-torchris.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://opensource-torchris.blogspot.com/feeds/1238017211639596390/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://opensource-torchris.blogspot.com/2008/12/starting-out.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4454770415619038436/posts/default/1238017211639596390'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4454770415619038436/posts/default/1238017211639596390'/><link rel='alternate' type='text/html' href='http://opensource-torchris.blogspot.com/2008/12/starting-out.html' title='Starting out...'/><author><name>Torchris</name><uri>http://www.blogger.com/profile/05149708403435853046</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='26' src='http://1.bp.blogspot.com/_Q6HcmhbUwp8/SYHApptPSoI/AAAAAAAAABQ/Ggl9qnbr7gE/S220/altered-clown.jpg'/></author><thr:total>0</thr:total></entry></feed>
