<?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-6185874952918981686</id><updated>2011-12-30T07:26:54.582-08:00</updated><category term='dserial lua robots'/><category term='s60 python development'/><category term='i2c avr atmel bitbanging'/><category term='ks0108 LCDs export firmware embedded system'/><category term='symbolic math python'/><category term='nintendo ds homebrew ndstool'/><title type='text'>Coding Laboratory</title><subtitle type='html'>A collection of small hacks</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://codinglab.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6185874952918981686/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://codinglab.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Raul</name><uri>http://www.blogger.com/profile/05112542436303049493</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://2.bp.blogspot.com/-toKzY5HlYUo/TiYLQrFHJFI/AAAAAAAAAk8/O-ohAO796AQ/s1600/641pxmad_scientistsvg.png'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>25</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-6185874952918981686.post-3256790406133613892</id><published>2011-10-06T17:12:00.000-07:00</published><updated>2011-10-06T17:20:58.044-07:00</updated><title type='text'>DIY Linear actuator out of scanner parts and a drawer slider</title><content type='html'>To build this linear actuator I stripped off from a scanner the motor + gears along with the timing belt and the pulley. I bought in Brico a cheap drawer slider and screwed it all into a piece of wood.&lt;br /&gt;&lt;br /&gt;First the video showing off what all this is about&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;object class="BLOGGER-youtube-video" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0" data-thumbnail-src="http://i.ytimg.com/vi/4xdWUbPyF18/0.jpg" height="266" width="320"&gt;&lt;param name="movie" value="http://www.youtube.com/v/4xdWUbPyF18?version=3&amp;f=user_uploads&amp;c=google-webdrive-0&amp;app=youtube_gdata" /&gt;&lt;param name="bgcolor" value="#FFFFFF" /&gt;&lt;embed width="320" height="266"  src="http://www.youtube.com/v/4xdWUbPyF18?version=3&amp;f=user_uploads&amp;c=google-webdrive-0&amp;app=youtube_gdata" type="application/x-shockwave-flash"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Below you can find a pic of one end of the actuator:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.flickr.com/photos/raul_aguaviva/6218915154/" title="IMAG0336 by raul_aguaviva, on Flickr"&gt;&lt;img &amp;nbsp;alt="IMAG0336" src="http://farm7.static.flickr.com/6220/6218915154_4304b3134b.jpg" width="400" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;As you can see, I attached the stepper to the piece of wood by just using a wire, and it works great!&lt;br /&gt;Also note that zigzag piece of metal that links the timing belt with the drawer rail. In the picture below you can see it in more detail&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.flickr.com/photos/raul_aguaviva/6218916182/" title="IMAG0337 by raul_aguaviva, on Flickr"&gt;&lt;img alt="IMAG0337" src="http://farm7.static.flickr.com/6220/6218916182_f7fc1bff03.jpg" width="400" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;The timing belt is sandwiched between two pieces of metal.&lt;br /&gt;&lt;br /&gt;And finally below you can see the pulley at the other end, this was a tricky part, keep reading more the details!&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.flickr.com/photos/raul_aguaviva/6218917202/" title="IMAG0338 by raul_aguaviva, on Flickr"&gt;&lt;img alt="IMAG0338" src="http://farm7.static.flickr.com/6056/6218917202_c91c06f9c6.jpg" width="400" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;This pulley had an axis that was riveted to the chassis of the scanner, I pulled it off with my pliers and welded it into a screw using solder, I had to heat both parts for a long time before in order to get the solder to bind both parts, the picture below shows the results:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.flickr.com/photos/raul_aguaviva/6218939668/" title="IMAG0344 by raul_aguaviva, on Flickr"&gt;&lt;img alt="IMAG0344" src="http://farm7.static.flickr.com/6223/6218939668_83867a8a43.jpg" width="400" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;And voila, its working better than I expected! Keep tuned for more and thanks for reading!&lt;br /&gt;&lt;br /&gt;BTW greetings goes to the guys in &lt;a href="www.timelab.org/"&gt;timelab&lt;/a&gt; for inspiring me! &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6185874952918981686-3256790406133613892?l=codinglab.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codinglab.blogspot.com/feeds/3256790406133613892/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6185874952918981686&amp;postID=3256790406133613892' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6185874952918981686/posts/default/3256790406133613892'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6185874952918981686/posts/default/3256790406133613892'/><link rel='alternate' type='text/html' href='http://codinglab.blogspot.com/2011/10/diy-linear-actuator-out-of-scanner.html' title='DIY Linear actuator out of scanner parts and a drawer slider'/><author><name>Raul</name><uri>http://www.blogger.com/profile/05112542436303049493</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://2.bp.blogspot.com/-toKzY5HlYUo/TiYLQrFHJFI/AAAAAAAAAk8/O-ohAO796AQ/s1600/641pxmad_scientistsvg.png'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://farm7.static.flickr.com/6220/6218915154_4304b3134b_t.jpg' height='72' width='72'/><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6185874952918981686.post-8608198443537529845</id><published>2011-09-17T11:28:00.000-07:00</published><updated>2011-10-06T16:44:44.463-07:00</updated><title type='text'>A Pre Amp for an electric guitar</title><content type='html'>I bought an electric guitar and needed an amp, I thought is was kind of silly to buy one since I could use my computer speakers. You cannot connect the guitar to the computer amp directly since the signal coming from the guitar is too weak, you need a preamp.&lt;br /&gt;&lt;br /&gt;I had a bunch of 741 op amps around and decided to build a preamp myself. I used a inverter amp configuration (quite a simple one) and it worked great. By cranking up the gain by a lot I get a nice heavymetal distortion.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://2.bp.blogspot.com/-bozuQtMAovM/TnTqve4-JJI/AAAAAAAAAl4/pl8dY3syY20/s1600/IMAG0287.jpg"&gt;&lt;img alt="" border="0" id="BLOGGER_PHOTO_ID_5653401533723583634" src="http://2.bp.blogspot.com/-bozuQtMAovM/TnTqve4-JJI/AAAAAAAAAl4/pl8dY3syY20/s400/IMAG0287.jpg" style="cursor: hand; cursor: pointer; display: block; height: 240px; margin: 0px auto 10px; text-align: center; width: 400px;" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Here is the schematic along with a link to see it running in a free java circuit simulator.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-OQacgS223Lk/TnU49fSUw7I/AAAAAAAAAl8/0oT0OOI9KC0/s1600/guitar_preamp.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="208" src="http://4.bp.blogspot.com/-OQacgS223Lk/TnU49fSUw7I/AAAAAAAAAl8/0oT0OOI9KC0/s320/guitar_preamp.png" width="320" /&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: center;"&gt;&lt;a href="http://www.falstad.com/circuit/#%24+1+5.0E-6+10.20027730826997+86+5.0+43%0Aa+224+176+400+176+0+15.0+-15.0+1000000.0%0Ar+224+80+400+80+0+100000.0%0Ac+224+32+400+32+0+1.0E-10+-0.06031512213234991%0Ar+128+160+224+160+0+1000.0%0Ac+64+160+128+160+0+1.0E-6+2.5436479540585813E-4%0Ac+400+176+480+176+0+1.0E-6+1.1262796251187979E-12%0Aw+224+160+224+80+0%0Aw+224+80+224+32+0%0Aw+400+32+400+80+0%0Aw+400+80+400+176+0%0Ag+224+192+224+272+0%0AR+64+160+32+160+0+1+440.0+0.001+0.0+0.0+0.5%0Aw+480+176+512+176+0%0Ax+488+209+520+214+0+20+Out%0Ax+8+202+62+207+0+20+Guitar%0Ao+11+64+0+35+0.0048828125+9.765625E-5+0+-1%0Ao+12+64+0+35+0.15625+4.8828125E-5+1+-1%0A"&gt;Click here to see it running in a Circuit Simulator (needs Java)&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;The only problem is that the preamp seems to amplify too an FM radiostation and I can hear some nice music while I play guitar....&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;At the beginning I thought my guitar was haunted by The Beatles and played on its own, when I hard a kind of a voice I suspected it could be receiving some sort of radio signal..&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp;You don't believe me? Check out this video!&amp;nbsp;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;object width="320" height="266" class="BLOGGER-youtube-video" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0" data-thumbnail-src="http://i.ytimg.com/vi/GSn_zrsMqXE/0.jpg"&gt;&lt;param name="movie" value="http://www.youtube.com/v/GSn_zrsMqXE?version=3&amp;f=user_uploads&amp;c=google-webdrive-0&amp;app=youtube_gdata" /&gt;&lt;param name="bgcolor" value="#FFFFFF" /&gt;&lt;embed width="320" height="266"  src="http://www.youtube.com/v/GSn_zrsMqXE?version=3&amp;f=user_uploads&amp;c=google-webdrive-0&amp;app=youtube_gdata" type="application/x-shockwave-flash"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6185874952918981686-8608198443537529845?l=codinglab.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codinglab.blogspot.com/feeds/8608198443537529845/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6185874952918981686&amp;postID=8608198443537529845' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6185874952918981686/posts/default/8608198443537529845'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6185874952918981686/posts/default/8608198443537529845'/><link rel='alternate' type='text/html' href='http://codinglab.blogspot.com/2011/09/pre-amp-for-electric-guitar.html' title='A Pre Amp for an electric guitar'/><author><name>Raul</name><uri>http://www.blogger.com/profile/05112542436303049493</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://2.bp.blogspot.com/-toKzY5HlYUo/TiYLQrFHJFI/AAAAAAAAAk8/O-ohAO796AQ/s1600/641pxmad_scientistsvg.png'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/-bozuQtMAovM/TnTqve4-JJI/AAAAAAAAAl4/pl8dY3syY20/s72-c/IMAG0287.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6185874952918981686.post-3373959231693134391</id><published>2011-09-17T10:50:00.000-07:00</published><updated>2011-09-17T11:23:34.031-07:00</updated><title type='text'>Gameboy Cart Using an AVR</title><content type='html'>Built a Game Boy flash cart using an AVR. Took a cartridge I bought for a few euros and replaced the ROM chip with a 32Kb RAM I took from a printer. The pinout of most RAM, ROM and EEPROM chips are almost the same, I was quite glad about this :-)&lt;br /&gt;&lt;br /&gt;The next step was to find a processor that had many free pins to drive the 15 for the address bus and 8 for the data bus, for that then I used and AVR128.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/-tH6VxzrfM6g/TnTeqreYAsI/AAAAAAAAAlw/4z_WcSf3qAE/s1600/IMAG0299.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 240px; height: 400px;" src="http://1.bp.blogspot.com/-tH6VxzrfM6g/TnTeqreYAsI/AAAAAAAAAlw/4z_WcSf3qAE/s400/IMAG0299.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5653388257062814402" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;If you look at the cartridge 'pins', you'll see a cable soldered to one of them, that is the HALT line of the Z80, controlling this pin I can freeze the Z80, this way the data and addresses buses are free and my AVR can write and read data from my RAM.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/-cwmFhJ6StQ0/TnTePV-9zqI/AAAAAAAAAlo/JvCwAT9lO2M/s1600/IMAG0297.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 240px;" src="http://1.bp.blogspot.com/-cwmFhJ6StQ0/TnTePV-9zqI/AAAAAAAAAlo/JvCwAT9lO2M/s400/IMAG0297.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5653387787437461154" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;This is how the whole setup looks like once connected, the big chip is the AVR .&lt;br /&gt;&lt;br /&gt;I can write programs in the RAM in two ways:&lt;br /&gt;&lt;br /&gt;1) Connecting the AVR to my computer through a serial port and use a little loader to upload apps. &lt;br /&gt;2) Write the app I want to upload in the AVR's flash and have it write it to the RAM when the Game Boy is turned on.&lt;br /&gt;&lt;br /&gt;So, bottomline :-) It worked for small apps &lt; 16Kb but it didn't work for bigger apps, so I think this post will have a second part someday, stay tuned!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6185874952918981686-3373959231693134391?l=codinglab.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codinglab.blogspot.com/feeds/3373959231693134391/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6185874952918981686&amp;postID=3373959231693134391' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6185874952918981686/posts/default/3373959231693134391'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6185874952918981686/posts/default/3373959231693134391'/><link rel='alternate' type='text/html' href='http://codinglab.blogspot.com/2011/09/gameboy-cart-using-avr.html' title='Gameboy Cart Using an AVR'/><author><name>Raul</name><uri>http://www.blogger.com/profile/05112542436303049493</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://2.bp.blogspot.com/-toKzY5HlYUo/TiYLQrFHJFI/AAAAAAAAAk8/O-ohAO796AQ/s1600/641pxmad_scientistsvg.png'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/-tH6VxzrfM6g/TnTeqreYAsI/AAAAAAAAAlw/4z_WcSf3qAE/s72-c/IMAG0299.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6185874952918981686.post-7606756804146847030</id><published>2010-10-12T08:42:00.000-07:00</published><updated>2010-10-14T02:55:06.075-07:00</updated><title type='text'>How to get support for the Arduino oscilloscope (and Parallax),</title><content type='html'>We now have a forum, please ask your questions there!&lt;br /&gt;&lt;br /&gt;http://groups.google.com/group/xoscillo&lt;br /&gt;&lt;br /&gt;Thanks!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6185874952918981686-7606756804146847030?l=codinglab.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codinglab.blogspot.com/feeds/7606756804146847030/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6185874952918981686&amp;postID=7606756804146847030' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6185874952918981686/posts/default/7606756804146847030'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6185874952918981686/posts/default/7606756804146847030'/><link rel='alternate' type='text/html' href='http://codinglab.blogspot.com/2010/10/coding-laboratory-arduino-oscilloscope.html' title='How to get support for the Arduino oscilloscope (and Parallax),'/><author><name>Raul</name><uri>http://www.blogger.com/profile/05112542436303049493</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://2.bp.blogspot.com/-toKzY5HlYUo/TiYLQrFHJFI/AAAAAAAAAk8/O-ohAO796AQ/s1600/641pxmad_scientistsvg.png'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6185874952918981686.post-4455985034611130673</id><published>2010-09-29T10:47:00.000-07:00</published><updated>2010-10-14T03:00:10.293-07:00</updated><title type='text'>Arduino oscilloscope (and Parallax)</title><content type='html'>I wrote some software so you can use your computer as an oscilloscope.&lt;br /&gt;&lt;br /&gt;In the following screen shot you can see the software acquiring data from an arduino and also from a Parallax USB oscilloscope simultaneously.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://4.bp.blogspot.com/_onlhh-asyZY/TKOEVfT9ZxI/AAAAAAAAAhs/ZKn8x14IfZ8/s1600/arduino-parallax.png"&gt;&lt;img style="display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 400px; height: 250px;" src="http://4.bp.blogspot.com/_onlhh-asyZY/TKOEVfT9ZxI/AAAAAAAAAhs/ZKn8x14IfZ8/s400/arduino-parallax.png" alt="" id="BLOGGER_PHOTO_ID_5522403072803694354" border="0" /&gt;&lt;/a&gt;&lt;a href="http://2.bp.blogspot.com/_onlhh-asyZY/TKOEGaSbUcI/AAAAAAAAAhk/nYhrcIk1O_g/s1600/arduino-parallax.png"&gt;&lt;br /&gt;&lt;/a&gt;&lt;br /&gt;For more info, more screen shots and source code go to:&lt;br /&gt;&lt;br /&gt;&lt;a href="https://code.google.com/p/xoscillo/"&gt;https://code.google.com/p/xoscillo/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;We have a wiki with the instructions and a forum, please use them! ;-)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6185874952918981686-4455985034611130673?l=codinglab.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codinglab.blogspot.com/feeds/4455985034611130673/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6185874952918981686&amp;postID=4455985034611130673' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6185874952918981686/posts/default/4455985034611130673'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6185874952918981686/posts/default/4455985034611130673'/><link rel='alternate' type='text/html' href='http://codinglab.blogspot.com/2010/09/arduino-oscilloscope-and-parallax.html' title='Arduino oscilloscope (and Parallax)'/><author><name>Raul</name><uri>http://www.blogger.com/profile/05112542436303049493</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://2.bp.blogspot.com/-toKzY5HlYUo/TiYLQrFHJFI/AAAAAAAAAk8/O-ohAO796AQ/s1600/641pxmad_scientistsvg.png'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_onlhh-asyZY/TKOEVfT9ZxI/AAAAAAAAAhs/ZKn8x14IfZ8/s72-c/arduino-parallax.png' height='72' width='72'/><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6185874952918981686.post-7230655222745008356</id><published>2010-09-15T05:25:00.001-07:00</published><updated>2010-09-16T03:50:38.147-07:00</updated><title type='text'>DIY Laser projector</title><content type='html'>So yes! Hello!!! This time I built a laser projector, it was built using a toy laser pointer, a pillbox, a cooler fan and an arduino microcontroller.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_onlhh-asyZY/TJC76XOmPJI/AAAAAAAAAhM/-atmfRB4-WE/s1600/IMG_1984.JPG"&gt;&lt;img style="display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 400px; height: 300px;" src="http://2.bp.blogspot.com/_onlhh-asyZY/TJC76XOmPJI/AAAAAAAAAhM/-atmfRB4-WE/s400/IMG_1984.JPG" alt="" id="BLOGGER_PHOTO_ID_5517116154870906002" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Check out this video if you want to see it in motion (note that its a bit dark, but towards the end I turn on the lights)&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;object style="background-image: url(&amp;quot;http://i1.ytimg.com/vi/03hpykIyNmA/hqdefault.jpg&amp;quot;);" height="344" width="425"&gt;&lt;param name="movie" value="http://www.youtube.com/v/03hpykIyNmA?fs=1&amp;amp;hl=en_US"&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;param name="allowscriptaccess" value="always"&gt;&lt;embed src="http://www.youtube.com/v/03hpykIyNmA?fs=1&amp;amp;hl=en_US" allowscriptaccess="never" allowfullscreen="true" wmode="transparent" type="application/x-shockwave-flash" height="344" width="425"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;Here is how it works!&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;In the picture below you can see the whole setup, the heptagon is a pillbox, its sitting on top of a cooling fan so it spins very quickly. Each side of the pillbox has a mirror that reflects the laser beam onto the screen.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_onlhh-asyZY/TJC9bkA5asI/AAAAAAAAAhU/VKBwwcg2_x8/s1600/IMG_1939.JPG"&gt;&lt;img style="display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 400px; height: 300px;" src="http://2.bp.blogspot.com/_onlhh-asyZY/TJC9bkA5asI/AAAAAAAAAhU/VKBwwcg2_x8/s400/IMG_1939.JPG" alt="" id="BLOGGER_PHOTO_ID_5517117824750414530" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Because the mirrors are moving the reflected laser dot sweeps the screen from left to right, because it does it very quickly your eyes actually see an horizontal solid line, in this case you see 7 lines one on top of the other because the each mirror is at an angle.&lt;br /&gt;&lt;br /&gt;So I would get something like this:&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;pre&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;/pre&gt;&lt;/span&gt;&lt;br /&gt;if I turn off the laser at the right time, I could get to display something like this&lt;br /&gt;&lt;pre&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;/pre&gt;&lt;br /&gt;&lt;br /&gt;Then with a little bit of software magic you can get the text to scroll, wave, and so on.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt; We are not there yet!&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The spinning speed of the fan is very critical, any slowdown will cause the image to wobble, that is why I put this fins on the pillbox, when they spin they pass thought an optical sensor (pretty much like the one elevators have to keep its doors open when people leave or enter the elevator) A micro controller can use this data to compute the fan speed and adjust the laser blinking to the image looks correct.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Tricky part!&lt;/span&gt; (warning quite geeky stuff coming up!)&lt;br /&gt;&lt;br /&gt;So how does the micro controller know when is the first mirror coming? The fins, because I glued them myself by hand, are not really equally spaced, some are closer that the others, the micro controller notices this and uses this info to tell which one is the first mirror... for example the two fins before the first mirror are a bit closer than the others.&lt;br /&gt;&lt;br /&gt;That's all, I hope you enjoyed!&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_onlhh-asyZY/TJDFxuO3j2I/AAAAAAAAAhc/mMiELPX8S8c/s1600/IMG_1979.JPG"&gt;&lt;img style="display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 400px; height: 300px;" src="http://4.bp.blogspot.com/_onlhh-asyZY/TJDFxuO3j2I/AAAAAAAAAhc/mMiELPX8S8c/s400/IMG_1979.JPG" alt="" id="BLOGGER_PHOTO_ID_5517127001543511906" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Other Laser projectors:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://heim.ifi.uio.no/haakoh/avr/"&gt;http://heim.ifi.uio.no/haakoh/avr/&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6185874952918981686-7230655222745008356?l=codinglab.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codinglab.blogspot.com/feeds/7230655222745008356/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6185874952918981686&amp;postID=7230655222745008356' title='25 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6185874952918981686/posts/default/7230655222745008356'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6185874952918981686/posts/default/7230655222745008356'/><link rel='alternate' type='text/html' href='http://codinglab.blogspot.com/2010/09/diy-laser-projector.html' title='DIY Laser projector'/><author><name>Raul</name><uri>http://www.blogger.com/profile/05112542436303049493</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://2.bp.blogspot.com/-toKzY5HlYUo/TiYLQrFHJFI/AAAAAAAAAk8/O-ohAO796AQ/s1600/641pxmad_scientistsvg.png'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_onlhh-asyZY/TJC76XOmPJI/AAAAAAAAAhM/-atmfRB4-WE/s72-c/IMG_1984.JPG' height='72' width='72'/><thr:total>25</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6185874952918981686.post-7885657995193467093</id><published>2009-09-13T10:11:00.000-07:00</published><updated>2009-10-30T07:41:08.666-07:00</updated><title type='text'>poor's man CNC hot wire cutter - Updated!</title><content type='html'>&lt;span style=""&gt;&lt;br /&gt; This time I built a computer controlled device that will allow you to cut out shapes from styrofoam boards with great precision.&lt;br /&gt;&lt;br /&gt; To make it more fun I tried to build the whole thing by re-purposing scrap parts I found here and there, so I used a couple of scanners, a hanger and a hot wire. The scanners I found them on the trash (officially I will deny that I pick stuff from the trash), the hanger I got it from my cleaning service and the hot wire was 3 euros.&lt;br /&gt;&lt;br /&gt; This is the way it works, draw a shape using your favourite drawing software or download one from the internet, just make sure the file is a &lt;a href="http://en.wikipedia.org/wiki/Scalable_Vector_Graphics"&gt;SVG&lt;/a&gt;, because that is what my system understands.&lt;br /&gt;&lt;br /&gt; I found myself this nice eagle, which is quite a complex shape as you can see: &lt;br /&gt;&lt;/span&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.blogger.com/%20http://www.clker.com/cliparts/f/7/9/a/11949848182045168189eagle_01.svg.thumb.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 83px; height: 100px;" src="http://www.clker.com/cliparts/f/7/9/a/11949848182045168189eagle_01.svg.thumb.png" alt="" border="0" /&gt;&lt;/a&gt;And this what you get:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_onlhh-asyZY/Sq0oDBQXHVI/AAAAAAAAAUM/b1A4wlFDC0c/s1600-h/IMG_1456.JPG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 300px;" src="http://3.bp.blogspot.com/_onlhh-asyZY/Sq0oDBQXHVI/AAAAAAAAAUM/b1A4wlFDC0c/s400/IMG_1456.JPG" alt="" id="BLOGGER_PHOTO_ID_5381001162119388498" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Here is the promised video so you can see the system in action... &lt;br /&gt;&lt;br /&gt;&lt;object width="425" height="344"&gt;&lt;param name="movie" value="http://www.youtube.com/v/y1G15yUXb04&amp;hl=en&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/y1G15yUXb04&amp;hl=en&amp;fs=1&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;br /&gt;&lt;a href="http://www.flickr.com/photos/raul_aguaviva/sets/72157622617789586/"&gt;Here are some pictures showing details of the CNC&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6185874952918981686-7885657995193467093?l=codinglab.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codinglab.blogspot.com/feeds/7885657995193467093/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6185874952918981686&amp;postID=7885657995193467093' title='13 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6185874952918981686/posts/default/7885657995193467093'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6185874952918981686/posts/default/7885657995193467093'/><link rel='alternate' type='text/html' href='http://codinglab.blogspot.com/2009/09/poors-man-cnc-hot-wire-cutter-part-1.html' title='poor&apos;s man CNC hot wire cutter - Updated!'/><author><name>Raul</name><uri>http://www.blogger.com/profile/05112542436303049493</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://2.bp.blogspot.com/-toKzY5HlYUo/TiYLQrFHJFI/AAAAAAAAAk8/O-ohAO796AQ/s1600/641pxmad_scientistsvg.png'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_onlhh-asyZY/Sq0oDBQXHVI/AAAAAAAAAUM/b1A4wlFDC0c/s72-c/IMG_1456.JPG' height='72' width='72'/><thr:total>13</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6185874952918981686.post-4887611667176195047</id><published>2009-06-05T10:50:00.000-07:00</published><updated>2009-06-05T10:52:19.279-07:00</updated><title type='text'>A NintendoDS uses an optical mouse as a camera</title><content type='html'>&lt;object width="425" height="344"&gt;&lt;param name="movie" value="http://www.youtube.com/v/TOlQrVFjNJs&amp;amp;hl=en&amp;amp;fs=1&amp;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/TOlQrVFjNJs&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;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6185874952918981686-4887611667176195047?l=codinglab.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codinglab.blogspot.com/feeds/4887611667176195047/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6185874952918981686&amp;postID=4887611667176195047' title='9 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6185874952918981686/posts/default/4887611667176195047'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6185874952918981686/posts/default/4887611667176195047'/><link rel='alternate' type='text/html' href='http://codinglab.blogspot.com/2009/06/nintendods-uses-optical-mouse-as-camera.html' title='A NintendoDS uses an optical mouse as a camera'/><author><name>Raul</name><uri>http://www.blogger.com/profile/05112542436303049493</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://2.bp.blogspot.com/-toKzY5HlYUo/TiYLQrFHJFI/AAAAAAAAAk8/O-ohAO796AQ/s1600/641pxmad_scientistsvg.png'/></author><thr:total>9</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6185874952918981686.post-6296770037990232534</id><published>2009-05-30T06:55:00.000-07:00</published><updated>2009-05-30T07:15:35.640-07:00</updated><title type='text'>Hacking a pager (part 1)</title><content type='html'>I bought this weekend a pager for 2 euros and decided to plug my scope on it to see what could I find out. The case mentions 147.250MHz, and "RTT/SMF/X205", unfortunately this didn't help much!&lt;br /&gt;&lt;br /&gt;I plug my scope on the digital output of the receiver and I noticed a burst of serial data every 1 second exactly.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_onlhh-asyZY/SiE7bevrYhI/AAAAAAAAAS4/xEVSn5GD7Js/s1600-h/oscillo4.png"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 400px; height: 97px;" src="http://4.bp.blogspot.com/_onlhh-asyZY/SiE7bevrYhI/AAAAAAAAAS4/xEVSn5GD7Js/s400/oscillo4.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5341615976333664786" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;I zoomed in to see how this bursts look like and this is what I got:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_onlhh-asyZY/SiE7a0_mPKI/AAAAAAAAASg/LetvjH_4ipw/s1600-h/oscillo1.png"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 400px; height: 294px;" src="http://1.bp.blogspot.com/_onlhh-asyZY/SiE7a0_mPKI/AAAAAAAAASg/LetvjH_4ipw/s400/oscillo1.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5341615965126147234" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt; BTW the blue channel is hooked to a pin that goes low every time there is serial data coming in the red channel.&lt;br /&gt;&lt;br /&gt; The next think I noted, is that once in a while I get loooong bursts of serial data that last for 4 seconds&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_onlhh-asyZY/SiE7bHM-GwI/AAAAAAAAASw/OS3vL6EH0hk/s1600-h/oscillo3.png"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 400px; height: 107px;" src="http://2.bp.blogspot.com/_onlhh-asyZY/SiE7bHM-GwI/AAAAAAAAASw/OS3vL6EH0hk/s400/oscillo3.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5341615970014075650" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Any idea what protocol this could be? It doesn't look like FLEX or POGSAC...&lt;br /&gt;&lt;br /&gt;Thanks everyone for reading, any info is welcome!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6185874952918981686-6296770037990232534?l=codinglab.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codinglab.blogspot.com/feeds/6296770037990232534/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6185874952918981686&amp;postID=6296770037990232534' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6185874952918981686/posts/default/6296770037990232534'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6185874952918981686/posts/default/6296770037990232534'/><link rel='alternate' type='text/html' href='http://codinglab.blogspot.com/2009/05/hacking-pager-part-1.html' title='Hacking a pager (part 1)'/><author><name>Raul</name><uri>http://www.blogger.com/profile/05112542436303049493</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://2.bp.blogspot.com/-toKzY5HlYUo/TiYLQrFHJFI/AAAAAAAAAk8/O-ohAO796AQ/s1600/641pxmad_scientistsvg.png'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_onlhh-asyZY/SiE7bevrYhI/AAAAAAAAAS4/xEVSn5GD7Js/s72-c/oscillo4.png' height='72' width='72'/><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6185874952918981686.post-407423761761003169</id><published>2009-03-31T09:56:00.000-07:00</published><updated>2009-03-31T11:38:53.262-07:00</updated><title type='text'>Logging temperature</title><content type='html'>Displaying static pictures on an LCD is quite cool (see my previous post) but it doesn't get you very far, does it? &lt;br /&gt; I always wanted to build my own temperature logger and graph it in a display, so it was now or never! I had a couple of I2C temperature sensors lying around and also a serial EEPROM, so I hooked them all together, and voila voila!!&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_onlhh-asyZY/SdJUoPnTpHI/AAAAAAAAASI/rU2X3MGCUCM/s1600-h/temp-logger.JPG"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 400px; height: 300px;" src="http://4.bp.blogspot.com/_onlhh-asyZY/SdJUoPnTpHI/AAAAAAAAASI/rU2X3MGCUCM/s400/temp-logger.JPG" border="0" alt=""id="BLOGGER_PHOTO_ID_5319407160240874610" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Time for details now! Sorted from fun to less fun :-)&lt;br /&gt;&lt;br /&gt;- The data scrolls one pixel every 5 minutes, the LCD is 128 pixels wide I can display the temperature for the last 10.6 hours. &lt;br /&gt;&lt;br /&gt;- The flat part of the graph is during the night, as you can see the thermostat is doing a great job at keeping a constant temperature! &lt;br /&gt;&lt;br /&gt;- The non-flat part is during the day the sun enters through the windows and heats up the place. There is a small spike and that is because for while the sun hits directly the sensor.&lt;br /&gt;&lt;br /&gt;- For the clock, I used the fact that I can drive one of the AVR's timers using an external oscillator, I used a 32.768MHz crystal this number is exactly 128*256, so you just have to set the timer's prescaler to 128 and you'll get a 8bit timer overflowing once a second. Se the timer to generate an interrupt at that point and that's it. Look at the Atmel's Butterfly source code for reference.&lt;br /&gt;&lt;br /&gt;- Drawing the line was quite tricky, because the LCDs' framebuffer is not linear at all and also because I wanted to write up to 8 pixels with the same memory access. It was tricky but I made it, I'll probably post the code in another post.&lt;br /&gt;&lt;br /&gt;- The rest is simple stuff, the temperature sensor is a LM75A, and the serial EEPROM is a 128Kb one.. both of them are controlled using and I2C bus, so piece of cake!&lt;br /&gt;&lt;br /&gt;And now the full monty:&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_onlhh-asyZY/SdJjDtwvpRI/AAAAAAAAASY/YBre9rVXoVc/s1600-h/fullmonty_logger.JPG"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 400px; height: 300px;" src="http://2.bp.blogspot.com/_onlhh-asyZY/SdJjDtwvpRI/AAAAAAAAASY/YBre9rVXoVc/s400/fullmonty_logger.JPG" border="0" alt=""id="BLOGGER_PHOTO_ID_5319423025352779026" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;More details on demand, Thanks for reading!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6185874952918981686-407423761761003169?l=codinglab.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codinglab.blogspot.com/feeds/407423761761003169/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6185874952918981686&amp;postID=407423761761003169' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6185874952918981686/posts/default/407423761761003169'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6185874952918981686/posts/default/407423761761003169'/><link rel='alternate' type='text/html' href='http://codinglab.blogspot.com/2009/03/logging-temperature.html' title='Logging temperature'/><author><name>Raul</name><uri>http://www.blogger.com/profile/05112542436303049493</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://2.bp.blogspot.com/-toKzY5HlYUo/TiYLQrFHJFI/AAAAAAAAAk8/O-ohAO796AQ/s1600/641pxmad_scientistsvg.png'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_onlhh-asyZY/SdJUoPnTpHI/AAAAAAAAASI/rU2X3MGCUCM/s72-c/temp-logger.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6185874952918981686.post-8991245214583445462</id><published>2009-03-22T11:34:00.000-07:00</published><updated>2009-03-23T07:29:07.311-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ks0108 LCDs export firmware embedded system'/><title type='text'>GIMP Plugin to export fonts and bitmaps for ks0108 LCDs</title><content type='html'>I wanted to display some cool pictures in my ks0108, GIMP was perfect because it allows me to edit pictures and convert them into 1bpp pictures, the only part that was missing was to have a way to export the picture in a format that I could easily embed in my firmwares and that I could send quickly to the LCD. &lt;br /&gt;&lt;br /&gt; So voila voila! here is the missing part, a very cool plug-in that does exactly that, this plug-in saves the data into a C source code header file, and arranges the data in a way that can be uploaded to the LCD quickly and with minimal code.&lt;br /&gt;&lt;br /&gt; Details about installing it, and loading the data are embedded in the python plug-in file that you can get &lt;a href="http://registry.gimp.org/node/14964"&gt;here&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt; And now the pictures!&lt;br /&gt;&lt;br /&gt;The artwork for this one was ripped form &lt;a href="http://en.wikipedia.org/wiki/Knight_Lore"&gt;Knight Lore&lt;/a&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_onlhh-asyZY/ScaGRQbIqaI/AAAAAAAAARg/8JlZaeSZKH4/s1600-h/ks0108_lore.JPG"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 400px; height: 300px;" src="http://2.bp.blogspot.com/_onlhh-asyZY/ScaGRQbIqaI/AAAAAAAAARg/8JlZaeSZKH4/s400/ks0108_lore.JPG" border="0" alt=""id="BLOGGER_PHOTO_ID_5316084041182128546" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt; This picture was taken for the 8bit game &lt;a href="http://www.worldofspectrum.org/infoseekid.cgi?id=0000047"&gt;The Abbey of Crime&lt;/a&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_onlhh-asyZY/SceHuM7prCI/AAAAAAAAARo/l_4_n43b3gE/s1600-h/abadia.JPG"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 400px; height: 300px;" src="http://3.bp.blogspot.com/_onlhh-asyZY/SceHuM7prCI/AAAAAAAAARo/l_4_n43b3gE/s400/abadia.JPG" border="0" alt=""id="BLOGGER_PHOTO_ID_5316367112949312546" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt; And this is the whole shebang, just ripped the KONAMI logo from a MSX game&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_onlhh-asyZY/SceX9eZd3XI/AAAAAAAAARw/psTAKIIh2u8/s1600-h/whole_setup_konami.JPG"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 400px; height: 300px;" src="http://4.bp.blogspot.com/_onlhh-asyZY/SceX9eZd3XI/AAAAAAAAARw/psTAKIIh2u8/s400/whole_setup_konami.JPG" border="0" alt=""id="BLOGGER_PHOTO_ID_5316384967521852786" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;You can also use your bitmap as a font if you arrange letters in the following way :&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_onlhh-asyZY/ScecPfrRe6I/AAAAAAAAAR4/a5Lhi1ifKoc/s1600-h/cool_font.JPG"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 400px; height: 300px;" src="http://4.bp.blogspot.com/_onlhh-asyZY/ScecPfrRe6I/AAAAAAAAAR4/a5Lhi1ifKoc/s400/cool_font.JPG" border="0" alt=""id="BLOGGER_PHOTO_ID_5316389675149130658" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt; Hopefully with this script we'll start seeing new cool bitmaps/fonts in projects, besides from the usual suspects we are used to see :-)&lt;br /&gt;&lt;br /&gt; If you use it you are welcome to drop me a line, that will probably encourage me to write more free software!&lt;br /&gt;&lt;br /&gt; The next step is to export the bitmap in binary format so I can store it in an serial EPROM (rather than using the chips flash) , but I guess thats all for now, enjoy!&lt;br /&gt;&lt;br /&gt;Notes:&lt;br /&gt; I used M-A Loyer's &lt;a href="http://www.weirdfox.com/assets/files/nds-engine/nds_export_py.txt"&gt;exporter for NDS&lt;/a&gt; as a reference for mine, thanks!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6185874952918981686-8991245214583445462?l=codinglab.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codinglab.blogspot.com/feeds/8991245214583445462/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6185874952918981686&amp;postID=8991245214583445462' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6185874952918981686/posts/default/8991245214583445462'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6185874952918981686/posts/default/8991245214583445462'/><link rel='alternate' type='text/html' href='http://codinglab.blogspot.com/2009/03/gimp-plugin-to-export-bitmaps-for.html' title='GIMP Plugin to export fonts and bitmaps for ks0108 LCDs'/><author><name>Raul</name><uri>http://www.blogger.com/profile/05112542436303049493</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://2.bp.blogspot.com/-toKzY5HlYUo/TiYLQrFHJFI/AAAAAAAAAk8/O-ohAO796AQ/s1600/641pxmad_scientistsvg.png'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_onlhh-asyZY/ScaGRQbIqaI/AAAAAAAAARg/8JlZaeSZKH4/s72-c/ks0108_lore.JPG' height='72' width='72'/><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6185874952918981686.post-5136552372345633059</id><published>2009-03-08T12:01:00.000-07:00</published><updated>2009-03-08T16:09:35.434-07:00</updated><title type='text'>weekend project: reading 27256 eproms</title><content type='html'>One of my favourite hobbies is to open electronic devices to see what is inside, to hack it or to scavenge its circuits. For that I usually buy quite old devices since the new ones all use SMD and there is not much you can do with them. &lt;br /&gt;&lt;br /&gt; Luckily in the city where I live there is a secondhand/flea market where you can buy all kind of stuff and I found a cool device (see the picture below) and when I opened it I discovered a bunch of &lt;a href="http://www.futurlec.com/Memory/27256-250.shtml"&gt;27256&lt;/a&gt; EPROM's inside.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_onlhh-asyZY/SbQhIewyFiI/AAAAAAAAARY/77G8wMbxoT0/s1600-h/IMG_1380.JPG"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 400px; height: 300px;" src="http://2.bp.blogspot.com/_onlhh-asyZY/SbQhIewyFiI/AAAAAAAAARY/77G8wMbxoT0/s400/IMG_1380.JPG" border="0" alt=""id="BLOGGER_PHOTO_ID_5310906290157000226" /&gt;&lt;/a&gt;&lt;br /&gt; &lt;br /&gt; These EPROM's have a 15bit's address bus and a 8bit data bus. As the microcontroller I used an Atmega128 connected to my computer thought a serial port. The microcontroller sets the address in the bus using a couple of 74HC595 (8-bit serial-in, serial or parallel-out shift register), that way I only need 3 GPIO's to set the address I want to read from, for the data I just use the whole (ouch!) PORTA of the microcontroler. &lt;br /&gt;&lt;br /&gt; It all worked pretty straight forward, the only problem I had is that by mistake I wired the data bus in the reverse order (so D0 was connected to D7, D1 to D6 and so on) but once I figured that out I dumped the EPROM again and got a great satisfacton when I read the strings stored in the EPROM :-))&lt;br /&gt;&lt;br /&gt;Ok, so here come the pictures and a bit of the EPROM DUMP&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_onlhh-asyZY/SbQePJ0cS0I/AAAAAAAAARQ/6ui_5xLeTeE/s1600-h/IMG_1378.JPG"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 400px; height: 300px;" src="http://3.bp.blogspot.com/_onlhh-asyZY/SbQePJ0cS0I/AAAAAAAAARQ/6ui_5xLeTeE/s400/IMG_1378.JPG" border="0" alt=""id="BLOGGER_PHOTO_ID_5310903106259405634" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;font size="1"&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;0000 02 05 48 02 56 09 FF FF FF FF FF 02 07 83 FF FF ..H.V...........&lt;/br&gt;&lt;br /&gt;0010 FF FF FF 02 6C 51 FF FF FF FF FF 32 FF FF FF FF ....lQ.....2....&lt;/br&gt;&lt;br /&gt;0020 FF FF FF 02 45 18 FF FF FF FF FF 32 FF FF FF FF ....E......2....&lt;/br&gt;&lt;br /&gt;0030 30 31 32 33 34 35 36 37 38 39 41 42 43 44 45 46 0123456789ABCDEF&lt;/br&gt;&lt;br /&gt;0040 46 41 54 41 4C 20 43 52 4F 4D 20 45 52 52 4F 52 FATAL CROM ERROR&lt;/br&gt;&lt;br /&gt;0050 46 41 54 41 4C 20 49 52 41 4D 20 45 52 52 4F 52 FATAL IRAM ERROR&lt;/br&gt;&lt;br /&gt;0060 58 52 41 4D 20 45 52 52 20 7E 20 7E 5F 5F 5F 5F XRAM ERR ~ ~____&lt;/br&gt;&lt;br /&gt;0070 46 49 52 4D 57 41 52 45 20 45 52 52 4F 52 20 20 FIRMWARE ERROR  &lt;/br&gt;&lt;br /&gt;0080 53 59 4E 54 41 58 20 46 49 4C 45 20 45 52 52 20 SYNTAX FILE ERR &lt;/br&gt;&lt;br /&gt;0090 43 4F 4E 46 49 47 20 46 49 4C 45 20 45 52 52 20 CONFIG FILE ERR &lt;/br&gt;&lt;br /&gt;00A0 54 52 41 4E 53 2E 20 46 49 4C 45 20 46 55 4C 4C TRANS. FILE FULL&lt;/br&gt;&lt;br /&gt;00B0 54 52 41 4E 53 2E 20 50 41 43 4B 20 45 52 52 20 TRANS. PACK ERR &lt;/br&gt;&lt;br /&gt;00C0 54 52 41 4E 53 2E 20 42 59 54 45 20 5A 45 52 4F TRANS. BYTE ZERO&lt;/br&gt;&lt;br /&gt;00D0 2A 20 42 41 54 54 45 52 59 20 4C 4F 57 20 2A 20 * BATTERY LOW * &lt;/br&gt;&lt;br /&gt;00E0 2A 2A 20 42 59 50 41 53 53 20 4F 4E 20 2A 2A 20 ** BYPASS ON ** &lt;/br&gt;&lt;br /&gt;00F0 20 44 41 54 45 29 20 44 44 2D 4D 4D 4D 2D 59 59  DATE) DD-MMM-YY&lt;/br&gt;&lt;br /&gt;0100 20 54 49 4D 45 29 20 48 48 3A 4D 4D 20 20 58 4D  TIME) HH:MM  XM&lt;/br&gt;&lt;br /&gt;                                [....]&lt;/br&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;/font&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6185874952918981686-5136552372345633059?l=codinglab.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codinglab.blogspot.com/feeds/5136552372345633059/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6185874952918981686&amp;postID=5136552372345633059' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6185874952918981686/posts/default/5136552372345633059'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6185874952918981686/posts/default/5136552372345633059'/><link rel='alternate' type='text/html' href='http://codinglab.blogspot.com/2009/03/weekend-project-reading-27256-eproms.html' title='weekend project: reading 27256 eproms'/><author><name>Raul</name><uri>http://www.blogger.com/profile/05112542436303049493</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://2.bp.blogspot.com/-toKzY5HlYUo/TiYLQrFHJFI/AAAAAAAAAk8/O-ohAO796AQ/s1600/641pxmad_scientistsvg.png'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_onlhh-asyZY/SbQhIewyFiI/AAAAAAAAARY/77G8wMbxoT0/s72-c/IMG_1380.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6185874952918981686.post-3491976857807256481</id><published>2009-02-18T12:57:00.000-08:00</published><updated>2009-02-18T14:45:40.035-08:00</updated><title type='text'>Making a SO8 IC's breakout board out a stripboard</title><content type='html'>Hi! I just came across a 1Mbit I2C eprom but neither I had a breakout board nor I wanted to buy one. Also I really like solving problems with the stuff I have at home, so I decided to try using a stripboard, a little bit of inconscience and another bit of selfconfidence. And I made it!! &lt;br /&gt;&lt;br /&gt;The images explain it all, &lt;br /&gt;&lt;br /&gt;This is the picture of the stripboard with some of the strips cut, also see the red outline that shows where the IC will go:&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_onlhh-asyZY/SZyI5dBFpLI/AAAAAAAAARI/5fPU3T7T1nA/s1600-h/second.jpg"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 400px; height: 300px;" src="http://1.bp.blogspot.com/_onlhh-asyZY/SZyI5dBFpLI/AAAAAAAAARI/5fPU3T7T1nA/s400/second.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5304264981758715058" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;A IC's close up from the top once welded, I used a lead-free welding alloy, that is why the welds look so ugly, anyway health goes first:&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_onlhh-asyZY/SZyH-HJlOnI/AAAAAAAAARA/SBEv9R88hlA/s1600-h/top.jpg"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 400px; height: 300px;" src="http://4.bp.blogspot.com/_onlhh-asyZY/SZyH-HJlOnI/AAAAAAAAARA/SBEv9R88hlA/s400/top.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5304263962276477554" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;And voila! Ready to use in my protoboard:&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_onlhh-asyZY/SZyH9-qp6oI/AAAAAAAAAQ4/szLvgMn60uY/s1600-h/third.jpg"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 400px; height: 300px;" src="http://3.bp.blogspot.com/_onlhh-asyZY/SZyH9-qp6oI/AAAAAAAAAQ4/szLvgMn60uY/s400/third.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5304263959999277698" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;No I just have to figure out what to store in it :-)&lt;br /&gt;&lt;br /&gt;Enjoy!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6185874952918981686-3491976857807256481?l=codinglab.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codinglab.blogspot.com/feeds/3491976857807256481/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6185874952918981686&amp;postID=3491976857807256481' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6185874952918981686/posts/default/3491976857807256481'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6185874952918981686/posts/default/3491976857807256481'/><link rel='alternate' type='text/html' href='http://codinglab.blogspot.com/2009/02/making-breakout-board-out-stripboard.html' title='Making a SO8 IC&apos;s breakout board out a stripboard'/><author><name>Raul</name><uri>http://www.blogger.com/profile/05112542436303049493</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://2.bp.blogspot.com/-toKzY5HlYUo/TiYLQrFHJFI/AAAAAAAAAk8/O-ohAO796AQ/s1600/641pxmad_scientistsvg.png'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_onlhh-asyZY/SZyI5dBFpLI/AAAAAAAAARI/5fPU3T7T1nA/s72-c/second.jpg' height='72' width='72'/><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6185874952918981686.post-7734861211751491776</id><published>2008-10-29T17:43:00.000-07:00</published><updated>2009-02-18T14:35:20.972-08:00</updated><title type='text'>Temperatures in my appartment</title><content type='html'>Just got an I2C temperature sensor and I decided to connect it to my NintendoDS to measure the temperature for two whole days.&lt;br /&gt;&lt;br /&gt;The two spikes on the left is the sun entering through two different windows and hitting the sensor directly. The other two spikes on the right is exactly the same thing but for the second day.&lt;br /&gt;&lt;br /&gt;&lt;img src="http://spreadsheets.google.com/pub?key=pSlC9D-5jLL2mOV6tW6yqXg&amp;oid=3&amp;output=image" /&gt;&lt;br /&gt;&lt;br /&gt;Thats it.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6185874952918981686-7734861211751491776?l=codinglab.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codinglab.blogspot.com/feeds/7734861211751491776/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6185874952918981686&amp;postID=7734861211751491776' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6185874952918981686/posts/default/7734861211751491776'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6185874952918981686/posts/default/7734861211751491776'/><link rel='alternate' type='text/html' href='http://codinglab.blogspot.com/2008/10/temperatures-in-my-appartment.html' title='Temperatures in my appartment'/><author><name>Raul</name><uri>http://www.blogger.com/profile/05112542436303049493</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://2.bp.blogspot.com/-toKzY5HlYUo/TiYLQrFHJFI/AAAAAAAAAk8/O-ohAO796AQ/s1600/641pxmad_scientistsvg.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6185874952918981686.post-1919972348070322322</id><published>2008-10-14T13:20:00.000-07:00</published><updated>2011-03-02T05:47:04.994-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='i2c avr atmel bitbanging'/><title type='text'>I2C on an AVR using bit banging</title><content type='html'>As a exercise I tried to talk to a I2C temperature sensor using bit banging, it was not as easy as I thought so I decided to post the code in case anyone needs to see the solution, if you happen to use my code drop me a line since that will encourage me to post more code :-)&lt;br /&gt;&lt;br /&gt;// Port for the I2C&lt;br /&gt;#define I2C_DDR DDRD&lt;br /&gt;#define I2C_PIN PIND&lt;br /&gt;#define I2C_PORT PORTD&lt;br /&gt;&lt;br /&gt;// Pins to be used in the bit banging&lt;br /&gt;#define I2C_CLK 0&lt;br /&gt;#define I2C_DAT 1&lt;br /&gt;&lt;br /&gt;#define I2C_DATA_HI() I2C_DDR &amp;amp;= ~( 1 &lt;&lt; I2C_DAT );&lt;br /&gt;#define I2C_DATA_LO() I2C_DDR |= ( 1 &lt;&lt; I2C_DAT );&lt;br /&gt;&lt;br /&gt;#define I2C_CLOCK_HI() I2C_DDR &amp;amp;= ~( 1 &lt;&lt; I2C_CLK );&lt;br /&gt;#define I2C_CLOCK_LO() I2C_DDR |= ( 1 &lt;&lt; I2C_CLK );&lt;br /&gt;&lt;br /&gt;void I2C_WriteBit( unsigned char c )&lt;br /&gt;{&lt;br /&gt;if ( c &gt; 0 )&lt;br /&gt;{&lt;br /&gt;I2C_DATA_HI();&lt;br /&gt;}&lt;br /&gt;else&lt;br /&gt;{&lt;br /&gt;I2C_DATA_LO();&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;I2C_CLOCK_HI();&lt;br /&gt;_delay_ms(1);&lt;br /&gt;&lt;br /&gt;I2C_CLOCK_LO();&lt;br /&gt;_delay_ms(1);&lt;br /&gt;&lt;br /&gt;if ( c &gt; 0 )&lt;br /&gt;{&lt;br /&gt;I2C_DATA_LO();&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;_delay_ms(1);&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;unsigned char I2C_ReadBit()&lt;br /&gt;{&lt;br /&gt;I2C_DATA_HI();&lt;br /&gt;&lt;br /&gt;I2C_CLOCK_HI();&lt;br /&gt;_delay_ms(1);&lt;br /&gt;&lt;br /&gt;unsigned char c = I2C_PIN;&lt;br /&gt;&lt;br /&gt;I2C_CLOCK_LO();&lt;br /&gt;_delay_ms(1);&lt;br /&gt;&lt;br /&gt;return ( c &gt;&gt; I2C_DAT ) &amp;amp; 1;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;// Inits bitbanging port, must be called before using the functions below&lt;br /&gt;//&lt;br /&gt;void I2C_Init()&lt;br /&gt;{&lt;br /&gt;I2C_PORT &amp;amp;= ~( ( 1 &lt;&lt; I2C_DAT ) | ( 1 &lt;&lt; I2C_CLK ) );&lt;br /&gt;&lt;br /&gt;I2C_CLOCK_HI();&lt;br /&gt;I2C_DATA_HI();&lt;br /&gt;&lt;br /&gt;_delay_ms(1);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;// Send a START Condition&lt;br /&gt;//&lt;br /&gt;void I2C_Start()&lt;br /&gt;{&lt;br /&gt;// set both to high at the same time&lt;br /&gt;I2C_DDR &amp;amp;= ~( ( 1 &lt;&lt; I2C_DAT ) | ( 1 &lt;&lt; I2C_CLK ) );&lt;br /&gt;_delay_ms(1);&lt;br /&gt;&lt;br /&gt;I2C_DATA_LO();&lt;br /&gt;_delay_ms(1);&lt;br /&gt;&lt;br /&gt;I2C_CLOCK_LO();&lt;br /&gt;_delay_ms(1);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;// Send a STOP Condition&lt;br /&gt;//&lt;br /&gt;void I2C_Stop()&lt;br /&gt;{&lt;br /&gt;I2C_CLOCK_HI();&lt;br /&gt;_delay_ms(1);&lt;br /&gt;&lt;br /&gt;I2C_DATA_HI();&lt;br /&gt;_delay_ms(1);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;// write a byte to the I2C slave device&lt;br /&gt;//&lt;br /&gt;unsigned char I2C_Write( unsigned char c )&lt;br /&gt;{&lt;br /&gt;for ( char i=0;i&lt;8;i++)&lt;br /&gt;{&lt;br /&gt;I2C_WriteBit( c &amp;amp; 128 );&lt;br /&gt;&lt;br /&gt;c&lt;&lt;=1;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;return I2C_ReadBit();&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;// read a byte from the I2C slave device&lt;br /&gt;//&lt;br /&gt;unsigned char I2C_Read( unsigned char ack )&lt;br /&gt;{&lt;br /&gt;unsigned char res = 0;&lt;br /&gt;&lt;br /&gt;for ( char i=0;i&lt;8;i++)&lt;br /&gt;{&lt;br /&gt;res &lt;&lt;= 1;&lt;br /&gt;res |= I2C_ReadBit();&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;if ( ack &gt; 0)&lt;br /&gt;{&lt;br /&gt;I2C_WriteBit( 0 );&lt;br /&gt;}&lt;br /&gt;else&lt;br /&gt;{&lt;br /&gt;I2C_WriteBit( 1 );&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;_delay_ms(1);&lt;br /&gt;&lt;br /&gt;return res;&lt;br /&gt;}&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6185874952918981686-1919972348070322322?l=codinglab.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codinglab.blogspot.com/feeds/1919972348070322322/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6185874952918981686&amp;postID=1919972348070322322' title='8 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6185874952918981686/posts/default/1919972348070322322'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6185874952918981686/posts/default/1919972348070322322'/><link rel='alternate' type='text/html' href='http://codinglab.blogspot.com/2008/10/i2c-on-avr-using-bit-banging.html' title='I2C on an AVR using bit banging'/><author><name>Raul</name><uri>http://www.blogger.com/profile/05112542436303049493</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://2.bp.blogspot.com/-toKzY5HlYUo/TiYLQrFHJFI/AAAAAAAAAk8/O-ohAO796AQ/s1600/641pxmad_scientistsvg.png'/></author><thr:total>8</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6185874952918981686.post-7306662345464083293</id><published>2008-09-09T01:06:00.000-07:00</published><updated>2008-09-09T01:14:33.220-07:00</updated><title type='text'>telecinco es basura</title><content type='html'>Just helping Google to index Telecinco properly :-) ...&lt;br /&gt;&lt;br /&gt;&lt;a href="http://meneame.net/story/neira-desgracia-ocupa-plaza-hospitalaria-correspondia-esta-mujer"&gt;Telecinco is Basura&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6185874952918981686-7306662345464083293?l=codinglab.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codinglab.blogspot.com/feeds/7306662345464083293/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6185874952918981686&amp;postID=7306662345464083293' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6185874952918981686/posts/default/7306662345464083293'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6185874952918981686/posts/default/7306662345464083293'/><link rel='alternate' type='text/html' href='http://codinglab.blogspot.com/2008/09/telecinco-es-basura.html' title='telecinco es basura'/><author><name>Raul</name><uri>http://www.blogger.com/profile/05112542436303049493</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://2.bp.blogspot.com/-toKzY5HlYUo/TiYLQrFHJFI/AAAAAAAAAk8/O-ohAO796AQ/s1600/641pxmad_scientistsvg.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6185874952918981686.post-8177977319007099861</id><published>2008-04-07T12:58:00.000-07:00</published><updated>2008-04-07T13:07:17.816-07:00</updated><title type='text'>Just a video to show off my new stepper motor controller card</title><content type='html'>&lt;object width="425" height="350"&gt;&lt;param name="movie" value="http://www.youtube.com/v/I3j6ItzDxq4"&gt;&lt;/param&gt;&lt;embed src="http://www.youtube.com/v/I3j6ItzDxq4" type="application/x-shockwave-flash" width="425" height="350"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br /&gt;&lt;br /&gt; The brain of the beast is a NintendoDS running a script in LUA that can be updated from my laptop via wireless by just pressing a button so no need to recompile anything in c++!.&lt;br /&gt; The NDS uses dSerial2 to talk with the controller card. For more info on the LUA interpreter + bindings check previous posts&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6185874952918981686-8177977319007099861?l=codinglab.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codinglab.blogspot.com/feeds/8177977319007099861/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6185874952918981686&amp;postID=8177977319007099861' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6185874952918981686/posts/default/8177977319007099861'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6185874952918981686/posts/default/8177977319007099861'/><link rel='alternate' type='text/html' href='http://codinglab.blogspot.com/2008/04/just-video-to-show-off-my-new-stepper.html' title='Just a video to show off my new stepper motor controller card'/><author><name>Raul</name><uri>http://www.blogger.com/profile/05112542436303049493</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://2.bp.blogspot.com/-toKzY5HlYUo/TiYLQrFHJFI/AAAAAAAAAk8/O-ohAO796AQ/s1600/641pxmad_scientistsvg.png'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6185874952918981686.post-1057025989204336644</id><published>2008-01-13T11:25:00.000-08:00</published><updated>2008-01-13T11:41:23.649-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='dserial lua robots'/><title type='text'>Rapid prototyping for NDS and DSerial</title><content type='html'>So here are the binaries I was talking about in my last post.&lt;br /&gt;&lt;br /&gt; You can upload lua scrips to your NDS and run them,  all via wireless.&lt;br /&gt; Then you can access the DSerial, sockets, save through dldi, keypads, touchscreen...&lt;br /&gt;&lt;br /&gt;Examples included:&lt;br /&gt; Robot.lua:  skeleton to access the DSerial&lt;br /&gt; Server.lua:  a simple web server in a few lines of code&lt;br /&gt;&lt;br /&gt;&lt;a href="http://aguaviva.googlepages.com/LuaDSerial.zip"&gt;http://aguaviva.googlepages.com/LuaDSerial.zip&lt;/a&gt;&lt;br /&gt;Source code is available upon request.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6185874952918981686-1057025989204336644?l=codinglab.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codinglab.blogspot.com/feeds/1057025989204336644/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6185874952918981686&amp;postID=1057025989204336644' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6185874952918981686/posts/default/1057025989204336644'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6185874952918981686/posts/default/1057025989204336644'/><link rel='alternate' type='text/html' href='http://codinglab.blogspot.com/2008/01/rapid-prototyping-for-nds-and-dserial.html' title='Rapid prototyping for NDS and DSerial'/><author><name>Raul</name><uri>http://www.blogger.com/profile/05112542436303049493</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://2.bp.blogspot.com/-toKzY5HlYUo/TiYLQrFHJFI/AAAAAAAAAk8/O-ohAO796AQ/s1600/641pxmad_scientistsvg.png'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6185874952918981686.post-1366363262685041914</id><published>2007-11-28T16:05:00.001-08:00</published><updated>2007-11-28T16:42:31.984-08:00</updated><title type='text'>Sync and Run for NintendoDS (this time using Lua)</title><content type='html'>I like building robots and lately I'm using a NintendoDS as the brain and DSerial2 which is a device that allows me connect servos and stuff to the NintendoDS.&lt;br /&gt;&lt;br /&gt;So far so good, but one quickly realizes that the development cycle is quite a pain in the butt:&lt;br /&gt;&lt;br /&gt;1)  compile&lt;br /&gt;2)  take out the MicroSD from the NDS&lt;br /&gt;3)  put it in the MicroSD to SD adapter&lt;br /&gt;4)  Put the SD adapter in the reader&lt;br /&gt;5)  copy the stuff, eject the SD (right click etc..)&lt;br /&gt;6)  put the MicroSD in the NintendoDS&lt;br /&gt;7)  run the app&lt;br /&gt;8)  repeat  if you need to tune the app&lt;br /&gt;&lt;br /&gt;So after a few iterations things stop being fun.... so here is what I did!&lt;br /&gt;&lt;br /&gt;I compiled lua for nintendo with bindings for libwifi, libfat, some stdio from libnds and dserial. This proggy when run loads and executes fat:/autoexec.lua which in my case this script does the following:&lt;br /&gt;&lt;br /&gt;1) downloads from my PC a script called robot.lua&lt;br /&gt;2) executes this script&lt;br /&gt;3) when done waits for a keypress&lt;br /&gt;4) goto 1&lt;br /&gt;&lt;br /&gt;The trick is that while the NintendoDS waits for a keypress I can edit the the robot.lua on my PC, so yes, I only need to press a key to update the robots.lua and run it&lt;br /&gt;&lt;br /&gt;Just for fun I also wrote a web server so you can control dserial using a webbrowser&lt;br /&gt;&lt;br /&gt;I'll be posting the tool soon here....&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;BTW: There is a bug on the DSerial2 interface and it gets locked up when you update the position of the servos quite fast, I hope Natrium42 has a chance to fix this issue soon.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6185874952918981686-1366363262685041914?l=codinglab.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codinglab.blogspot.com/feeds/1366363262685041914/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6185874952918981686&amp;postID=1366363262685041914' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6185874952918981686/posts/default/1366363262685041914'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6185874952918981686/posts/default/1366363262685041914'/><link rel='alternate' type='text/html' href='http://codinglab.blogspot.com/2007/11/sync-and-run-for-nintendods-this-time.html' title='Sync and Run for NintendoDS (this time using Lua)'/><author><name>Raul</name><uri>http://www.blogger.com/profile/05112542436303049493</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://2.bp.blogspot.com/-toKzY5HlYUo/TiYLQrFHJFI/AAAAAAAAAk8/O-ohAO796AQ/s1600/641pxmad_scientistsvg.png'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6185874952918981686.post-676477071102748534</id><published>2007-07-31T20:35:00.000-07:00</published><updated>2007-07-31T21:04:28.407-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='nintendo ds homebrew ndstool'/><title type='text'>Nintendo DS homebrew under Linux (Ubuntu)</title><content type='html'>I just bought a Nintendo &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_0"&gt;DS&lt;/span&gt; and a &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_1"&gt;SuperCard&lt;/span&gt; for &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_2"&gt;homebrew&lt;/span&gt;..&lt;br /&gt;&lt;br /&gt;And once installing the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_3"&gt;devkitARM&lt;/span&gt;, &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_4"&gt;ndslib&lt;/span&gt;, &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_5"&gt;gbalib&lt;/span&gt; and the you will &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_6"&gt;ralize&lt;/span&gt; that you need &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_7"&gt;ndstool&lt;/span&gt; for &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_8"&gt;linux&lt;/span&gt;... I haven't find it anywhere but in the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_9"&gt;cvs&lt;/span&gt; source forge repository, so I installed &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_10"&gt;cvs&lt;/span&gt;, got the source and here is the binary: &lt;a href="http://aguaviva.googlepages.com/ndstool.zip"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_11"&gt;ndstool&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;If you want to compile it yourself these are the magic words you need to type:&lt;br /&gt;&lt;br /&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_12"&gt;cvs&lt;/span&gt; -d:pserver:anonymous@devkitpro.cvs.sourceforge.net:/cvsroot/devkitpro &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_13"&gt;login&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_14"&gt;cvs&lt;/span&gt; -z3 -d:pserver:anonymous@devkitpro.cvs.sourceforge.net:/cvsroot/devkitpro co -P tools/&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_15"&gt;nds&lt;/span&gt;/&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_16"&gt;ndstool&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;enjoy!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6185874952918981686-676477071102748534?l=codinglab.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codinglab.blogspot.com/feeds/676477071102748534/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6185874952918981686&amp;postID=676477071102748534' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6185874952918981686/posts/default/676477071102748534'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6185874952918981686/posts/default/676477071102748534'/><link rel='alternate' type='text/html' href='http://codinglab.blogspot.com/2007/07/nintendo-ds-homebrew-under-linux-ubuntu.html' title='Nintendo DS homebrew under Linux (Ubuntu)'/><author><name>Raul</name><uri>http://www.blogger.com/profile/05112542436303049493</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://2.bp.blogspot.com/-toKzY5HlYUo/TiYLQrFHJFI/AAAAAAAAAk8/O-ohAO796AQ/s1600/641pxmad_scientistsvg.png'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6185874952918981686.post-4618061327377544913</id><published>2007-03-18T12:23:00.000-07:00</published><updated>2007-06-16T17:43:10.106-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='symbolic math python'/><title type='text'>Symbolic math</title><content type='html'>I got surprised the first time I saw Mathematica working with symbolic expressions, and since then I always wondered how was that done, so i just went ahead and tried to do a mini Mathematica&lt;br /&gt;&lt;p&gt;I created a system that can learn rules. The rules are read by a simple parser that understands mathematical expressions, and once this is done it can derive, simplify, isolate variables... &lt;/p&gt;  For example to teach the system how the number zero works I'd do it this way:&lt;p&gt;&lt;code style="color: rgb(0, 0, 0);"&gt;der.AddRule( "a*0", "0" )&lt;br /&gt;der.AddRule( "a+0", "a" )&lt;/code&gt;&lt;/p&gt; &lt;p&gt;&lt;code style="color: rgb(0, 0, 0);"&gt;&lt;/code&gt;where 'a' represents any expression , another rule for workign with powers:&lt;/p&gt;&lt;p&gt;&lt;code style="color: rgb(0, 0, 0);"&gt;der.AddRule( "(a^b)*a", "a^(b+1)" )&lt;/code&gt;&lt;/p&gt;&lt;code style="color: rgb(0, 0, 0);"&gt;&lt;/code&gt;&lt;p&gt;and to compute the derivative:&lt;/p&gt;&lt;p&gt;&lt;code style="color: rgb(0, 0, 0);"&gt;der.AddRule( "der(a,a)&lt;/code&gt;&lt;code style="color: rgb(0, 0, 0);"&gt;", "1" )&lt;/code&gt;&lt;br /&gt;&lt;code style="color: rgb(0, 0, 0);"&gt;der.AddRule( "der(cos(a),b)&lt;/code&gt;&lt;code style="color: rgb(0, 0, 0);"&gt;", "-sin(a)*der(a,b)" )&lt;/code&gt;&lt;br /&gt;&lt;code style="color: rgb(0, 0, 0);"&gt;der.AddRule( "der((a/b),c)&lt;/code&gt;&lt;code style="color: rgb(0, 0, 0);"&gt;", "(der(a,c)*b-a*der(b,c))/(b^2)" )&lt;/code&gt; &lt;/p&gt;&lt;br /&gt;So I teached the system a bunch of rules and then its is able simplify, derive and isolate variables (this last one only works on  some silly situations)&lt;br /&gt;&lt;br /&gt;So, here is the code---&gt; &lt;a href="http://aguaviva.googlepages.com/SymbolicMath.zip"&gt;SymbolicMath.zip&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6185874952918981686-4618061327377544913?l=codinglab.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codinglab.blogspot.com/feeds/4618061327377544913/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6185874952918981686&amp;postID=4618061327377544913' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6185874952918981686/posts/default/4618061327377544913'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6185874952918981686/posts/default/4618061327377544913'/><link rel='alternate' type='text/html' href='http://codinglab.blogspot.com/2007/03/symbolic-math.html' title='Symbolic math'/><author><name>Raul</name><uri>http://www.blogger.com/profile/05112542436303049493</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://2.bp.blogspot.com/-toKzY5HlYUo/TiYLQrFHJFI/AAAAAAAAAk8/O-ohAO796AQ/s1600/641pxmad_scientistsvg.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6185874952918981686.post-7941931789238163115</id><published>2007-02-18T12:32:00.000-08:00</published><updated>2007-06-16T18:07:03.326-07:00</updated><title type='text'>Playing with Wavelets</title><content type='html'>I always wondered how wavelets work so I went ahead and I wrote my own wavelet compressor using python, I did it in 2 days so don't expect much :-) I didn't really read any paper, I did all this with ideas I heard here and there...&lt;br /&gt;here is the code and Lena's tiff --&gt;&lt;a href="http://aguaviva.googlepages.com/wavelet.zip"&gt;wavelet.zip&lt;/a&gt;&lt;p&gt;&lt;/p&gt;And these are the images at different levels of detail, sorry I didn't specify the number of coefficients for each image!&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp0.blogger.com/_onlhh-asyZY/Rf2UWzE-LkI/AAAAAAAAAFw/QV_ZVnYJbMI/s1600-h/out_0.gif"&gt;&lt;br /&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer;" src="http://bp0.blogger.com/_onlhh-asyZY/Rf2UWzE-LkI/AAAAAAAAAFw/QV_ZVnYJbMI/s320/out_0.gif" alt="" id="BLOGGER_PHOTO_ID_5043350277113916994" border="0" /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp3.blogger.com/_onlhh-asyZY/Rf2UqjE-LlI/AAAAAAAAAF4/l2vzI5yoo-4/s1600-h/out_20.gif"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer;" src="http://bp3.blogger.com/_onlhh-asyZY/Rf2UqjE-LlI/AAAAAAAAAF4/l2vzI5yoo-4/s320/out_20.gif" alt="" id="BLOGGER_PHOTO_ID_5043350616416333394" border="0" /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp2.blogger.com/_onlhh-asyZY/Rf2U9TE-LmI/AAAAAAAAAGA/MngonBRfz2A/s1600-h/out_100.gif"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer;" src="http://bp2.blogger.com/_onlhh-asyZY/Rf2U9TE-LmI/AAAAAAAAAGA/MngonBRfz2A/s320/out_100.gif" alt="" id="BLOGGER_PHOTO_ID_5043350938538880610" border="0" /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp1.blogger.com/_onlhh-asyZY/Rf2VIDE-LnI/AAAAAAAAAGI/E8WpF_KZtSE/s1600-h/out_300.gif"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer;" src="http://bp1.blogger.com/_onlhh-asyZY/Rf2VIDE-LnI/AAAAAAAAAGI/E8WpF_KZtSE/s320/out_300.gif" alt="" id="BLOGGER_PHOTO_ID_5043351123222474354" 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;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp1.blogger.com/_onlhh-asyZY/Rf2WtDE-LtI/AAAAAAAAAG4/YWfnrEfN5rI/s1600-h/out_750.gif"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer;" src="http://bp1.blogger.com/_onlhh-asyZY/Rf2WtDE-LtI/AAAAAAAAAG4/YWfnrEfN5rI/s320/out_750.gif" alt="" id="BLOGGER_PHOTO_ID_5043352858389262034" border="0" /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp3.blogger.com/_onlhh-asyZY/Rf2VXjE-LoI/AAAAAAAAAGQ/ZDjpzTSEmYo/s1600-h/out_600.gif"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer;" src="http://bp3.blogger.com/_onlhh-asyZY/Rf2VXjE-LoI/AAAAAAAAAGQ/ZDjpzTSEmYo/s320/out_600.gif" alt="" id="BLOGGER_PHOTO_ID_5043351389510446722" border="0" /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp2.blogger.com/_onlhh-asyZY/Rf2WhTE-LsI/AAAAAAAAAGw/a05fK5RVPH4/s1600-h/out_1250.gif"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer;" src="http://bp2.blogger.com/_onlhh-asyZY/Rf2WhTE-LsI/AAAAAAAAAGw/a05fK5RVPH4/s320/out_1250.gif" alt="" id="BLOGGER_PHOTO_ID_5043352656525799106" border="0" /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp1.blogger.com/_onlhh-asyZY/Rf2WGDE-LqI/AAAAAAAAAGg/ZlRqPqfl9KA/s1600-h/out_5000.gif"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer;" src="http://bp1.blogger.com/_onlhh-asyZY/Rf2WGDE-LqI/AAAAAAAAAGg/ZlRqPqfl9KA/s320/out_5000.gif" alt="" id="BLOGGER_PHOTO_ID_5043352188374363810" 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;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp0.blogger.com/_onlhh-asyZY/Rf2WVzE-LrI/AAAAAAAAAGo/0wgOMzThBkk/s1600-h/out_2550.gif"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer;" src="http://bp0.blogger.com/_onlhh-asyZY/Rf2WVzE-LrI/AAAAAAAAAGo/0wgOMzThBkk/s320/out_2550.gif" alt="" id="BLOGGER_PHOTO_ID_5043352458957303474" border="0" /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp2.blogger.com/_onlhh-asyZY/Rf2VvTE-LpI/AAAAAAAAAGY/eamMsyKTbvo/s1600-h/out_10000.gif"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer;" src="http://bp2.blogger.com/_onlhh-asyZY/Rf2VvTE-LpI/AAAAAAAAAGY/eamMsyKTbvo/s320/out_10000.gif" alt="" id="BLOGGER_PHOTO_ID_5043351797532339858" 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/6185874952918981686-7941931789238163115?l=codinglab.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codinglab.blogspot.com/feeds/7941931789238163115/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6185874952918981686&amp;postID=7941931789238163115' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6185874952918981686/posts/default/7941931789238163115'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6185874952918981686/posts/default/7941931789238163115'/><link rel='alternate' type='text/html' href='http://codinglab.blogspot.com/2007/03/playing-with-wavelets.html' title='Playing with Wavelets'/><author><name>Raul</name><uri>http://www.blogger.com/profile/05112542436303049493</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://2.bp.blogspot.com/-toKzY5HlYUo/TiYLQrFHJFI/AAAAAAAAAk8/O-ohAO796AQ/s1600/641pxmad_scientistsvg.png'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://bp0.blogger.com/_onlhh-asyZY/Rf2UWzE-LkI/AAAAAAAAAFw/QV_ZVnYJbMI/s72-c/out_0.gif' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6185874952918981686.post-3459839179017269834</id><published>2006-10-20T13:11:00.000-07:00</published><updated>2007-06-16T18:07:45.863-07:00</updated><title type='text'>Full screen dot matrix scroller using pys60</title><content type='html'>Have you seen those red dot matrix scrollers? Just for fun I coded an app to display a message in teh same way on your phone's display...&lt;br /&gt;&lt;br /&gt;I heard some people are using it to pass funny messages in meetings....&lt;br /&gt;&lt;br /&gt;have fun!&lt;br /&gt;&lt;br /&gt;&lt;a href="http://aguaviva.googlepages.com/scroller.zip"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;scroller.zip &lt;/span&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6185874952918981686-3459839179017269834?l=codinglab.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codinglab.blogspot.com/feeds/3459839179017269834/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6185874952918981686&amp;postID=3459839179017269834' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6185874952918981686/posts/default/3459839179017269834'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6185874952918981686/posts/default/3459839179017269834'/><link rel='alternate' type='text/html' href='http://codinglab.blogspot.com/2007/03/full-screen-dot-matrix-scroller-using.html' title='Full screen dot matrix scroller using pys60'/><author><name>Raul</name><uri>http://www.blogger.com/profile/05112542436303049493</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://2.bp.blogspot.com/-toKzY5HlYUo/TiYLQrFHJFI/AAAAAAAAAk8/O-ohAO796AQ/s1600/641pxmad_scientistsvg.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6185874952918981686.post-1924930582080836467</id><published>2006-10-18T13:18:00.000-07:00</published><updated>2007-03-18T13:35:42.677-07:00</updated><title type='text'>Use your nokia phone as a wireless spy camera</title><content type='html'>Now anyone can kick James Bond's ass with this little app. From your computer, and over bluetooth, you can tell your phone to take a picture and send it to you.&lt;br /&gt;&lt;br /&gt;In order to get this working just use the "sync and run" to run these two commands on hte pc side:&lt;br /&gt;&lt;code&gt;&lt;br /&gt;control.py -x "import camera;im = camera.take_photo();im.save('c:\\pic.jpg')"&lt;br /&gt;control.py -g 'c:\\pic.jpg' mypic.jpg&lt;br /&gt;&lt;br /&gt;have fun!&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6185874952918981686-1924930582080836467?l=codinglab.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codinglab.blogspot.com/feeds/1924930582080836467/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6185874952918981686&amp;postID=1924930582080836467' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6185874952918981686/posts/default/1924930582080836467'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6185874952918981686/posts/default/1924930582080836467'/><link rel='alternate' type='text/html' href='http://codinglab.blogspot.com/2007/03/use-your-nokia-phone-as-wireless-spy.html' title='Use your nokia phone as a wireless spy camera'/><author><name>Raul</name><uri>http://www.blogger.com/profile/05112542436303049493</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://2.bp.blogspot.com/-toKzY5HlYUo/TiYLQrFHJFI/AAAAAAAAAk8/O-ohAO796AQ/s1600/641pxmad_scientistsvg.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6185874952918981686.post-2018319817368569482</id><published>2006-10-15T12:02:00.000-07:00</published><updated>2007-06-16T18:09:23.266-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='s60 python development'/><title type='text'>Easing Python development for S60 NOKIA phone</title><content type='html'>&lt;span style="font-weight: bold;"&gt;Intro&lt;/span&gt;&lt;p&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;It's a pain to download run and debug python scripts in the phone, so here I present a simple solution so developing becomes fun again!&lt;/span&gt;&lt;br /&gt;&lt;/p&gt;   &lt;h4 style="color: rgb(0, 0, 0);"&gt;Software you'll need:&lt;/h4&gt;   &lt;ul&gt;&lt;li&gt;Python  &lt;a href="http://www.python.org/"&gt;http://www.python.org/&lt;/a&gt; (I'm using 2.4)&lt;/li&gt;&lt;li&gt;pywin32 &lt;a href="http://sourceforge.net/projects/pywin32/" target="_blank"&gt;http://sourceforge.net/projects/pywin32/&lt;/a&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;PySerial:   &lt;a href="http://pyserial.sourceforge.net/%20"&gt;http://pyserial.sourceforge.net/ &lt;/a&gt;I'm using pyserial-2.2.win32.exe, you'll also need pyserial-2.2.zip  &lt;/li&gt;&lt;li&gt;&lt;a href="http://aguaviva.googlepages.com/tcs60fs-v0.20060309.sis"&gt;tcs60fs&lt;/a&gt;:  find it in the files section &lt;/li&gt;&lt;li&gt;&lt;a href="http://aguaviva.googlepages.com/control.zip"&gt;control.py:&lt;/a&gt; in the files section too&lt;/li&gt;&lt;/ul&gt;   &lt;p&gt; Once you have installed the above things, run (respecting the order)&lt;br /&gt;&lt;/p&gt;   &lt;ul&gt;&lt;li&gt;install the tcs60fs sis on your phone&lt;br /&gt;&lt;/li&gt;&lt;li&gt;extract tcp_serial_redirect.py from pyserial-2.2.zip and run it with the following params and leave it running!&lt;br /&gt;&lt;/li&gt;&lt;ul&gt;&lt;li&gt;c:/&gt;tcp_serial_redirect.py -p com5 -b 115200    &lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;(note: substitute com5 with your bt virtual port)&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;li&gt;run tcs60fs on your phone and connect to the computer &lt;/li&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;note: don't forget to run first the tcp_serial_redirect.py&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;   &lt;h4 style="color: rgb(0, 0, 0);"&gt;Using control.py:&lt;/h4&gt;   &lt;ul&gt;&lt;li&gt;PUT files to the phone:&lt;/li&gt;&lt;ul&gt;&lt;li&gt;usage: control.py -p &lt;localfile_with_path&gt; &lt;phone_path_with_filename&gt;&lt;/phone_path_with_filename&gt;&lt;/localfile_with_path&gt;&lt;/li&gt;&lt;li&gt;example: control.py -p c:/my_prog.py   c:/test.py&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;GET files to the phone:&lt;/li&gt;&lt;ul&gt;&lt;li&gt;usage: control.py -g &lt;localfile_with_path&gt; &lt;phone_path_with_filename&gt;&lt;/phone_path_with_filename&gt;&lt;/localfile_with_path&gt;&lt;/li&gt;&lt;li&gt;example: control.py -g 'c:/my_prog.py'   c:/test.py&lt;/li&gt;&lt;/ul&gt;&lt;li&gt; EXEC files on the phone:&lt;/li&gt;&lt;ul&gt;&lt;li&gt;usage: control.py -xf &lt;phone_path_with_executable_filename&gt;&lt;/phone_path_with_executable_filename&gt;&lt;/li&gt;&lt;li&gt;example: c:/&gt;control.py -xf c:/test.py &lt;/li&gt;&lt;/ul&gt;&lt;li&gt;EVAL commands on the phone&lt;/li&gt;&lt;ul&gt;&lt;li&gt;usage: control.py -x "&lt;command&gt; "&lt;/command&gt;&lt;/li&gt;&lt;li&gt;example:  c:/&gt;control.py -x "print 'hellow world'\n"&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;   &lt;h4&gt;Final words &lt;/h4&gt;   &lt;p&gt;That's all! now you should be able to upload files and run programs on your phone from you pc. &lt;/p&gt;   &lt;p&gt;If you found this useful please drop me a line ;-)  &lt;/p&gt;   &lt;p&gt;Enjoy!&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;a href="http://pages.google.com/-/static_files/s60pythondevelopment"&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6185874952918981686-2018319817368569482?l=codinglab.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codinglab.blogspot.com/feeds/2018319817368569482/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6185874952918981686&amp;postID=2018319817368569482' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6185874952918981686/posts/default/2018319817368569482'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6185874952918981686/posts/default/2018319817368569482'/><link rel='alternate' type='text/html' href='http://codinglab.blogspot.com/2007/03/easing-python-development-for-s60-nokia.html' title='Easing Python development for S60 NOKIA phone'/><author><name>Raul</name><uri>http://www.blogger.com/profile/05112542436303049493</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://2.bp.blogspot.com/-toKzY5HlYUo/TiYLQrFHJFI/AAAAAAAAAk8/O-ohAO796AQ/s1600/641pxmad_scientistsvg.png'/></author><thr:total>0</thr:total></entry></feed>
