<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Kr3l's Turf</title>
	<atom:link href="https://kr3l.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>https://kr3l.wordpress.com</link>
	<description>Programming and electronics</description>
	<lastBuildDate>Sun, 22 Jan 2012 22:26:40 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='kr3l.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>https://s-ssl.wordpress.com/i/buttonw-com.png</url>
		<title>Kr3l's Turf</title>
		<link>https://kr3l.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="https://kr3l.wordpress.com/osd.xml" title="Kr3l&#039;s Turf" />
	<atom:link rel='hub' href='https://kr3l.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Using MPLAB.X on Ubuntu 11.04 64bit with Dwengo board</title>
		<link>https://kr3l.wordpress.com/2011/08/28/using-mplab-x-on-ubuntu-11-04-64bit-with-dwengo-board/</link>
		<comments>https://kr3l.wordpress.com/2011/08/28/using-mplab-x-on-ubuntu-11-04-64bit-with-dwengo-board/#comments</comments>
		<pubDate>Sun, 28 Aug 2011 20:44:12 +0000</pubDate>
		<dc:creator>Karel</dc:creator>
				<category><![CDATA[Electronics]]></category>
		<category><![CDATA[PIC18F]]></category>
		<category><![CDATA[64bit]]></category>
		<category><![CDATA[Dwengo]]></category>
		<category><![CDATA[ide]]></category>
		<category><![CDATA[mplabx]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://kr3l.wordpress.com/?p=486</guid>
		<description><![CDATA[I have been using Pinguino for quite some time to program my Dwengo board from within Linux, but as the source code grows larger, the Pinguino &#8220;sketches&#8221; aren&#8217;t always the most convenient code structure. In addition, and more important, I notices some weird unstable behavior where initializing a string variable with string A worked fine but [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=kr3l.wordpress.com&amp;blog=5356231&amp;post=486&amp;subd=kr3l&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I have been using <a title="Pinguino Wiki" href="http://wiki.pinguino.cc/" target="_blank">Pinguino</a> for quite some time to program my <a title="Dwengo Board" href="http://www.dwengo.org/products/dwengo-starters-kit-plus" target="_blank">Dwengo board</a> from within Linux, but as the source code grows larger, the Pinguino &#8220;sketches&#8221; aren&#8217;t always the most convenient code structure. In addition, and more important, I notices some weird unstable behavior where initializing a string variable with string A worked fine but initializing it with another string resulted in the code not being able to compile. As Microchip has released a <a title="MicroChip MPLABX home page" href="http://www.microchip.com/MPLABX/" target="_blank">cross-platform IDE called MPLAB X</a>, I tried setting it up on my 64bit Ubuntu (v11.04 aka <em><a href="http://1.bp.blogspot.com/_5bdO0FMWXa8/TUv9-K0uHaI/AAAAAAAAAio/qTdbCFbkoTE/s1600/narwhal.png" target="_blank">the Natty Narwhal</a></em>) today. This article is a step-by-step tutorial on how to compile your code with MPLABX, load it on the Dwengo board and run or debug it using the Dwengo programmer.</p>
<p><a href="http://kr3l.files.wordpress.com/2011/08/nb_logo.png"><img class="alignnone size-medium wp-image-509" title="nb_logo" src="http://kr3l.files.wordpress.com/2011/08/nb_logo.png?w=300&#038;h=55" alt="" width="300" height="55" /></a></p>
<ol>
<li>Go to the <a href="http://ww1.microchip.com/downloads/mplab/X_Beta/installer.html" target="_blank">MPLABX download page</a>, select &#8220;Linux x86 (32 bit)&#8221; as the platform (there is no 64 bit version) and check the boxes &#8220;MPLAB IDE X&#8221; and &#8220;MPLAB C18 Lite Compiler for PIC18 MCUs&#8221;. Then hit &#8220;Download now&#8221;. Do it fast, because a reeeeally annoying video (which you can&#8217;t stop) automatically starts playing upon loading the page!<strong></strong></li>
<li>Two installer files will start downloading, make them executable:<br />
<code>chmod +x ./mplabc18-v3.40-linux-full-installer.run<br />
chmod +x ./mplabx-ide-beta7.02-linux-32-bit-installer.bin</code></li>
<li>You can try to run the graphical installers (just double-click the files), but on my 64bits Ubuntu this gave the elaborate &#8220;Segmentation fault&#8221; error message. The problem is documented <a href="http://www.microchip.com/forums/m580872.aspx" target="_blank">here</a>, and solved by running the installers in text mode. So first install the C18 compiler:<code>sudo ./mplabx-ide-beta7.02-linux-32-bit-installer.bin --mode text</code>
<p>and then install the IDE</p>
<p><code>sudo ./mplabc18-v3.40-linux-full-installer.run<br />
</code><br />
edit: <a href="https://twitter.com/#!/markgross" target="_blank">@markgross</a> got the graphical installer working, as explained <a href="http://thegnar.org/sync/?p=143" target="_blank">here</a></li>
<li>Just one more hurdle to go! As the MPLABX is a 32bits version and uses Java, it expects to run on a 32 bit java virtual machine. However, the default Java you&#8217;ll install on Ubuntu via the package manager is a 64bits version. Follow the instructions on <a href="http://elco.crsndoo.com/wordpress/2011/03/how-to-make-mplab-x-work-properly-on-64bit-linux/" target="_blank">this site</a> to run the IDE using a 32 bits Java version. Basically you install a 32 bits Java in some folder and create a shell script which points the <code>JAVA_HOME</code> and <code>PATH</code> environment variables to this Java.</li>
</ol>
<div>At this point, you installed the environment succesfully and you should be able to start it without getting any errors. I start the script created in step 4 with sudo, because otherwise I do get some errors (and I&#8217;m not that into sorting out all kinds of file permissions) of files being read-only.</div>
<p>Now we will install the Dwengo library. Download it as a zip file from <a href="http://www.dwengo.org/files/dwengo-library.zip" target="_blank">here</a>, and extract it. You&#8217;ll get two folders, one with a .lib file in it and another one with the header files (.h extension). In a terminal, cd to the extracted folder and copy the .lib file to the lib folder of mplabc18 and the .h files to the /h/ folder (the exact destination folder can differ on your system depending on where you installed C18):<br />
<code>sudo cp ./lib/dwengo.lib /opt/microchip/mplabc18/v3.36/lib<br />
sudo cp ./h/*.h /opt/microchip/mplabc18/v3.36/h/</code></p>
<p>Ok, we are set to go! Fire up the MPLABX IDE and let&#8217;s create a project&#8230; In the file menu, click &#8220;new project&#8221;. A dialog pops up. Select &#8220;Standalone Project&#8221; and click &#8220;Next&#8221;.</p>
<p><a href="http://kr3l.files.wordpress.com/2011/08/screenshot-new-project.png"><img class="alignnone size-full wp-image-499" title="Create new project (step 1)" src="http://kr3l.files.wordpress.com/2011/08/screenshot-new-project.png?w=455&#038;h=311" alt="" width="455" height="311" /></a></p>
<p>The Dwengo board ships with a PIC18F4550, so select this as the device:</p>
<p><a href="http://kr3l.files.wordpress.com/2011/08/screenshot-new-project-1.png"><img class="alignnone size-full wp-image-500" title="Screenshot-New Project-1" src="http://kr3l.files.wordpress.com/2011/08/screenshot-new-project-1.png?w=455&#038;h=311" alt="" width="455" height="311" /></a></p>
<p>The Dwengo programmer is compatible with PICkit2, a MicroChip programmer/debugger device. So select this as the tool and click next. The nice thing about using this device with the MPLAB software is that we will be able to actually debug our code! That is breakpoints, step-by-step and other goodness instead of tediously writing variables to the LCD.</p>
<p><a href="http://kr3l.files.wordpress.com/2011/08/screenshot-new-project-2.png"><img class="alignnone size-full wp-image-501" title="Screenshot-New Project-2" src="http://kr3l.files.wordpress.com/2011/08/screenshot-new-project-2.png?w=455&#038;h=311" alt="" width="455" height="311" /></a></p>
<p>Select C18 as the compiler toolchain:</p>
<p><a href="http://kr3l.files.wordpress.com/2011/08/screenshot-new-project-3.png"><img class="alignnone size-full wp-image-502" title="Screenshot-New Project-3" src="http://kr3l.files.wordpress.com/2011/08/screenshot-new-project-3.png?w=455&#038;h=311" alt="" width="455" height="311" /></a></p>
<p>Finally, name your project:</p>
<p><a href="http://kr3l.files.wordpress.com/2011/08/screenshot-new-project-4.png"><img class="alignnone size-full wp-image-503" title="Screenshot-New Project-4" src="http://kr3l.files.wordpress.com/2011/08/screenshot-new-project-4.png?w=455&#038;h=232" alt="" width="455" height="232" /></a></p>
<p>A project structure is created, shown on the left. We will start out by adding the Dwengo library by right clicking &#8220;Library Files&#8221; and selecting &#8220;Add existing file&#8221;. Select the .lib file we downloaded earlier.</p>
<p><a href="http://kr3l.files.wordpress.com/2011/08/screenshot.png"><img class="alignnone size-medium wp-image-505" title="Screenshot" src="http://kr3l.files.wordpress.com/2011/08/screenshot.png?w=300&#038;h=187" alt="" width="300" height="187" /></a></p>
<p>Next we add the linker file, needed for successfully compiling your code. Right click on &#8220;Linker files&#8221; and select the file 18f4550_g.lkr which you&#8217;ll find in the folder /opt/microchip/mplabc18/v3.36/bin/LKR (or something similar, depending on where you installed C18).</p>
<p>And now, finally, we can add some actual code <img src='https://s-ssl.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>I used the Dwengo &#8220;blinking Leds&#8221; example, which you can find <a href="http://www.dwengo.org/tutorials/blinking-leds" target="_blank">here</a>. Once the code is added, right click your project and click &#8220;clean&#8221;. This will remove any previously compiled code and asserts that you are not working with any old version of your code.</p>
<p><a href="http://kr3l.files.wordpress.com/2011/08/clean.png"><img class="alignnone size-medium wp-image-506" title="clean" src="http://kr3l.files.wordpress.com/2011/08/clean.png?w=300&#038;h=187" alt="" width="300" height="187" /></a></p>
<p>Now right click your project and click &#8220;build&#8221;. I got a lot of errors on the console window, but clicking &#8220;build&#8221; once more successfully compiles and links all code. Perhaps this is some error with the IDE (remember this is still a beta), so remember to hit &#8220;build&#8221; twice every time&#8230; You should get output similar to this if the building succeeds:</p>
<pre>make -f nbproject/Makefile-default.mk SUBPROJECTS= .build-conf
make[1]: Entering directory `/root/MPLABXProjects/the_stalker.X'
make  -f nbproject/Makefile-default.mk dist/default/production/the_stalker.X.production.cof
make[2]: Entering directory `/root/MPLABXProjects/the_stalker.X'
make[2]: `dist/default/production/the_stalker.X.production.cof' is up to date.
make[2]: Leaving directory `/root/MPLABXProjects/the_stalker.X'
make[1]: Leaving directory `/root/MPLABXProjects/the_stalker.X'

BUILD SUCCESSFUL (total time: 162ms)
Loading /root/MPLABXProjects/the_stalker.X/dist/default/production/the_stalker.X.production.cof...
Loading completed

<span class="Apple-style-span" style="font-family:Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif;font-size:13px;line-height:19px;white-space:normal;">And now the moment you have all been waiting for... Make sure you connected the programmer with USB to your computer and that the programmer is plugged into the Dwengo board. Hit "Run project" in the "run" menu. You should get the output</span>

Connecting to programmer...
Programming target...
Programming completed
Running target...</pre>
<p>You can also double click a line in the code and run &#8220;Debug project&#8221; from the debug menu. Now you can step through the code to inspect variables and check the flow of your code.. nice!</p>
<p>I hope this guide helps anyone also trying out the new MPLAB X beta on Ubuntu. The installation is a bit difficult, but it looks like a really cool product. Especially the debugging is something that will save me countless frustrating hours <img src='https://s-ssl.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/kr3l.wordpress.com/486/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/kr3l.wordpress.com/486/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/kr3l.wordpress.com/486/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/kr3l.wordpress.com/486/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/kr3l.wordpress.com/486/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/kr3l.wordpress.com/486/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/kr3l.wordpress.com/486/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/kr3l.wordpress.com/486/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/kr3l.wordpress.com/486/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/kr3l.wordpress.com/486/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/kr3l.wordpress.com/486/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/kr3l.wordpress.com/486/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/kr3l.wordpress.com/486/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/kr3l.wordpress.com/486/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=kr3l.wordpress.com&amp;blog=5356231&amp;post=486&amp;subd=kr3l&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>https://kr3l.wordpress.com/2011/08/28/using-mplab-x-on-ubuntu-11-04-64bit-with-dwengo-board/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="https://secure.gravatar.com/avatar/40eb860d9b738ffbe85e8aa0c0c0c074?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">kr3l</media:title>
		</media:content>

		<media:content url="http://kr3l.files.wordpress.com/2011/08/nb_logo.png?w=300" medium="image">
			<media:title type="html">nb_logo</media:title>
		</media:content>

		<media:content url="http://kr3l.files.wordpress.com/2011/08/screenshot-new-project.png" medium="image">
			<media:title type="html">Create new project (step 1)</media:title>
		</media:content>

		<media:content url="http://kr3l.files.wordpress.com/2011/08/screenshot-new-project-1.png" medium="image">
			<media:title type="html">Screenshot-New Project-1</media:title>
		</media:content>

		<media:content url="http://kr3l.files.wordpress.com/2011/08/screenshot-new-project-2.png" medium="image">
			<media:title type="html">Screenshot-New Project-2</media:title>
		</media:content>

		<media:content url="http://kr3l.files.wordpress.com/2011/08/screenshot-new-project-3.png" medium="image">
			<media:title type="html">Screenshot-New Project-3</media:title>
		</media:content>

		<media:content url="http://kr3l.files.wordpress.com/2011/08/screenshot-new-project-4.png" medium="image">
			<media:title type="html">Screenshot-New Project-4</media:title>
		</media:content>

		<media:content url="http://kr3l.files.wordpress.com/2011/08/screenshot.png?w=300" medium="image">
			<media:title type="html">Screenshot</media:title>
		</media:content>

		<media:content url="http://kr3l.files.wordpress.com/2011/08/clean.png?w=300" medium="image">
			<media:title type="html">clean</media:title>
		</media:content>
	</item>
		<item>
		<title>Introducing the_stalker: controlling a camera using Dwengo</title>
		<link>https://kr3l.wordpress.com/2011/07/11/introducing-the_stalker-controlling-a-camera-using-dwengo/</link>
		<comments>https://kr3l.wordpress.com/2011/07/11/introducing-the_stalker-controlling-a-camera-using-dwengo/#comments</comments>
		<pubDate>Mon, 11 Jul 2011 22:16:42 +0000</pubDate>
		<dc:creator>Karel</dc:creator>
				<category><![CDATA[Electronics]]></category>
		<category><![CDATA[PIC18F]]></category>
		<category><![CDATA[camera]]></category>
		<category><![CDATA[Dwengo]]></category>
		<category><![CDATA[Pinguino]]></category>
		<category><![CDATA[remote]]></category>
		<category><![CDATA[the_stalker]]></category>

		<guid isPermaLink="false">http://kr3l.wordpress.com/?p=476</guid>
		<description><![CDATA[I finally found time to play with some electronics again this weekend, so I decided to dismantle my old camera and try to control it from my Dwengo board. A simple plan, so let&#8217;s go ahead! The camera is a cheap Aiptek DV3300 camera / camcorder which was my trusted companion for many years and [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=kr3l.wordpress.com&amp;blog=5356231&amp;post=476&amp;subd=kr3l&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I finally found time to play with some electronics again this weekend, so I decided to dismantle my old camera and try to control it from my Dwengo board. A simple plan, so let&#8217;s go ahead! The camera is a cheap Aiptek DV3300 camera / camcorder which was my trusted companion for many years and with which some of Overimpe&#8217;s best underground heist, crime and weird psychedelic space-time-travelling movies were shot.</p>
<p>First I had to disassemble the camera, which went fairly easy (some screws and some careful pulling here and there). Once inside the camera, I saw that the plastic buttons on the outside just pushed some standard pushbuttons on the inside. After measuring the voltages when pressed / released, the various buttons seem to just pull a line to ground upon being pushed.</p>
<p><a href="http://kr3l.files.wordpress.com/2011/07/cimg9032.jpg"><img class="alignnone size-medium wp-image-477" title="disassembled camera" src="http://kr3l.files.wordpress.com/2011/07/cimg9032.jpg?w=300&#038;h=225" alt="" width="300" height="225" /></a></p>
<p>Because the buttons are placed fairly close to each other, and my soldering skills are a bit rusty, I decided to start with just controlling two buttons: the power switch and the shutter button. This would allow the microcontroller to start the camera, take a picture (or record a video), and power off the camera. So I soldered two wires to the buttons, put a big blob of hot glue on it (see picture below) and guided the wires to the bottom of the camera, where I could make them come out of the camera through the removed screw of the tripod.</p>
<p><a href="http://kr3l.files.wordpress.com/2011/07/cimg9034.jpg"><img class="alignnone size-medium wp-image-478" title="Soldering and hot glue blobs" src="http://kr3l.files.wordpress.com/2011/07/cimg9034.jpg?w=300&#038;h=225" alt="" width="300" height="225" /></a></p>
<p>Below you see the re-assembled camera, with some wires coming out of it at the bottom.</p>
<p><a href="http://kr3l.files.wordpress.com/2011/07/p7110218.jpg"><img class="alignnone size-medium wp-image-479" title="The assembled camera" src="http://kr3l.files.wordpress.com/2011/07/p7110218.jpg?w=300&#038;h=225" alt="" width="300" height="225" /></a></p>
<p>And below is the entire test setup. The Dwengo microcontroller board on the right listens on a serial interface (connected to a laptop) for commands telling it to power on the camera and to start recording. Once these commands are received, a pin on the PIC microcontroller is pulled HIGH. This pin will make a transistor go into saturation and connect the camera line (power or record) to ground for a few seconds. This simulates a button on the camera being pushed.</p>
<p><a href="http://kr3l.files.wordpress.com/2011/07/p7110219.jpg"><img class="alignnone size-medium wp-image-480" title="The breadboard setup" src="http://kr3l.files.wordpress.com/2011/07/p7110219.jpg?w=300&#038;h=225" alt="" width="300" height="225" /></a></p>
<p>For those interested, the breadboard layout is shown below (click on it to open a larger version). I only included one line in the schema, because the second line is basically the same circuit duplicated. More information about how the circuit works can be found <a href="http://www.w9xt.com/page_microdesign_pt7_transistor_switching.html" target="_blank">on this excellent site</a>.</p>
<p><a href="http://kr3l.files.wordpress.com/2011/07/cameraproject_bb.png"><img class="alignnone size-medium wp-image-481" title="breadboard layout" src="http://kr3l.files.wordpress.com/2011/07/cameraproject_bb.png?w=300&#038;h=195" alt="" width="300" height="195" /></a></p>
<p>And a video as final proof that it works <img src='https://s-ssl.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<span class='embed-youtube' style='text-align:center; display: block;'><iframe class='youtube-player' type='text/html' width='455' height='286' src='http://www.youtube.com/embed/14qxXiF5E7Q?version=3&amp;rel=1&amp;fs=1&amp;showsearch=0&amp;showinfo=1&amp;iv_load_policy=1&amp;wmode=transparent' frameborder='0'></iframe></span>
<p>The code can be found on <a href="https://github.com/kr3l/the_stalker" target="_blank">github</a>. It is really, really ugly code though, because I had a LOT of problems getting it to run ok (I think something is wrong with my Pinguino bootloader). The code will be cleaned up in future commits though.</p>
<p>The next steps for this project will be to move from a breadboard to a soldered circuit and maybe use Bluetooth instead of a serial cable. I think in the end I will try to embed the circuit in a bird-house in my garden to spy on those shady birds, and trigger the video recording with a motion detector (when a bird enters the house). I&#8217;m not sure about that yet though, any ideas are welcome <img src='https://s-ssl.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>PS: Thanks to the Dwengo people who gave me a free Dwengo starterkit plus as a gift in appreciation of my blog! So if you do a cool project with the Dwengo board, be sure to write about it <img src='https://s-ssl.wordpress.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/kr3l.wordpress.com/476/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/kr3l.wordpress.com/476/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/kr3l.wordpress.com/476/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/kr3l.wordpress.com/476/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/kr3l.wordpress.com/476/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/kr3l.wordpress.com/476/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/kr3l.wordpress.com/476/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/kr3l.wordpress.com/476/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/kr3l.wordpress.com/476/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/kr3l.wordpress.com/476/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/kr3l.wordpress.com/476/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/kr3l.wordpress.com/476/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/kr3l.wordpress.com/476/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/kr3l.wordpress.com/476/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=kr3l.wordpress.com&amp;blog=5356231&amp;post=476&amp;subd=kr3l&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>https://kr3l.wordpress.com/2011/07/11/introducing-the_stalker-controlling-a-camera-using-dwengo/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="https://secure.gravatar.com/avatar/40eb860d9b738ffbe85e8aa0c0c0c074?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">kr3l</media:title>
		</media:content>

		<media:content url="http://kr3l.files.wordpress.com/2011/07/cimg9032.jpg?w=300" medium="image">
			<media:title type="html">disassembled camera</media:title>
		</media:content>

		<media:content url="http://kr3l.files.wordpress.com/2011/07/cimg9034.jpg?w=300" medium="image">
			<media:title type="html">Soldering and hot glue blobs</media:title>
		</media:content>

		<media:content url="http://kr3l.files.wordpress.com/2011/07/p7110218.jpg?w=300" medium="image">
			<media:title type="html">The assembled camera</media:title>
		</media:content>

		<media:content url="http://kr3l.files.wordpress.com/2011/07/p7110219.jpg?w=300" medium="image">
			<media:title type="html">The breadboard setup</media:title>
		</media:content>

		<media:content url="http://kr3l.files.wordpress.com/2011/07/cameraproject_bb.png?w=300" medium="image">
			<media:title type="html">breadboard layout</media:title>
		</media:content>
	</item>
		<item>
		<title>Creating a custom Fritzing part for the Dwengo board</title>
		<link>https://kr3l.wordpress.com/2011/01/08/custom-fritzing-dwengo/</link>
		<comments>https://kr3l.wordpress.com/2011/01/08/custom-fritzing-dwengo/#comments</comments>
		<pubDate>Sat, 08 Jan 2011 22:10:44 +0000</pubDate>
		<dc:creator>Karel</dc:creator>
				<category><![CDATA[Electronics]]></category>
		<category><![CDATA[PIC18F]]></category>
		<category><![CDATA[Dwengo]]></category>
		<category><![CDATA[fritzing]]></category>
		<category><![CDATA[inkscape]]></category>
		<category><![CDATA[Pinguino]]></category>
		<category><![CDATA[rommelrubot]]></category>

		<guid isPermaLink="false">http://kr3l.wordpress.com/?p=467</guid>
		<description><![CDATA[A problem I always have with my robots is they end up as a messy spaghetti monster with lots of wires leading to hidden places on the robot. When (purely hypothetically) the robot bumps into a wall some wires get loose and I have to figure out what was connected to what again. I should [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=kr3l.wordpress.com&amp;blog=5356231&amp;post=467&amp;subd=kr3l&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>A problem I always have with my robots is they end up as a messy spaghetti monster with lots of wires leading to hidden places on the robot. When (purely hypothetically) the robot bumps into a wall some wires get loose and I have to figure out what was connected to what again.</p>
<p><img class="alignnone" title="Fritzing" src="http://fritzing.org/media/uploads/headers/home.jpg" alt="" width="420" height="140" /></p>
<p>I should keep some documentation on my robot. I wanted to do this with <a href="http://fritzing.org/" target="_blank">Fritzing</a>, a cool open-source program for drawing breadboard-prototypes and more. Lots of parts are already available in Fritzing, like an Arduino, a servo, chips, and so on. As the Dwengo board was not yet available as a Fritzing part, I created it myself.</p>
<p>A Fritzing part is composed of SVG vector graphics: one for the breadboard layout, one for the schematic layout, one for the PCB layout, and one for the icon. These graphics can be created in InkScape. I never worked with InkScape before, so I had a hard time drawing the breadboard layout. The easiest way to create the layout was to take a photograph of the board, then import that in Inkscape, and draw over it. I reused the svg images from the existing Fritzing core parts to create the final layout.</p>
<p><a href="http://kr3l.files.wordpress.com/2011/01/screenshot-dwengo-board-svg-inkscape.png"><img class="alignnone size-full wp-image-469" title="Screenshot-dwengo-board.svg - Inkscape" src="http://kr3l.files.wordpress.com/2011/01/screenshot-dwengo-board-svg-inkscape.png?w=455&#038;h=493" alt="" width="455" height="493" /></a></p>
<p>Because Fritzing has to know which part of the image is a connector where wires can start and end, one has to create connectors. This is done by creating rectangles with the names connectorXterminal and connectorXpin (where X is the connector number). In the schematic and PCB layout, the same connector have to exist with the same name. This way, Fritzing can keep the three layouts in sync, so if you create a prototype in the breadboard view, you immediately get a schematic view and a PCB view.</p>
<p>For the SVG files of the schematic view and the PCB view, I started from a header row (for the schematic view) and from a regular chip (for the PCB). Once these were done, I created the part in Fritzing:</p>
<p><a href="http://kr3l.files.wordpress.com/2011/01/fritzing-parts-editor.png"><img class="alignnone size-full wp-image-470" title="Fritzing Parts Editor" src="http://kr3l.files.wordpress.com/2011/01/fritzing-parts-editor.png?w=455&#038;h=586" alt="" width="455" height="586" /></a></p>
<p>In the parts editor, you can label all the connector pins and give them a description. You can also add and remove connectors if necessary. As you can see from the image, I created connector pins for the Dwengo connector on the left, and for the driver chip output on the right. The pin labels mention the PIC pin number and the corresponding Pinguino pin number (see <a href="http://kr3l.files.wordpress.com/2009/12/pinguino.gif">http://kr3l.files.wordpress.com/2009/12/pinguino.gif</a>).</p>
<p><a href="http://dl.dropbox.com/u/414104/kr3l/Dwengo%20Board.fzpz" target="_blank">Download the Fritzing part</a>.</p>
<p>Now that the part is created, the fun can start <img src='https://s-ssl.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> . It only takes about 5 minutes to redraw my robot schematic in Fritzing. One problem I had was that the Bluesmirf component doesn&#8217;t exist in Fritzing, but I used a &#8220;mystery component&#8221; with 5 pins instead. The resulting prototype is shown below:</p>
<p><a href="http://kr3l.files.wordpress.com/2011/01/rommelrubot_bb.png"><img class="alignnone size-full wp-image-471" title="rommelrubot_bb" src="http://kr3l.files.wordpress.com/2011/01/rommelrubot_bb.png?w=455&#038;h=301" alt="" width="455" height="301" /></a></p>
<p>As you can see, this is a nice and  easy way of creating a breadboard prototype of your project. You can download this diagram from <a href="http://fritzing.org/projects/rommelrubot/" target="_blank">its Fritzing projects page</a>. Fritzing features a lot more cool features, like automatically create a parts list, create an etchable PCB layout or Gerber files as a Pdf, &#8230;, which help you in sharing your project with others and in going from a prototype on a breadboard to a real product on a PCB!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/kr3l.wordpress.com/467/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/kr3l.wordpress.com/467/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/kr3l.wordpress.com/467/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/kr3l.wordpress.com/467/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/kr3l.wordpress.com/467/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/kr3l.wordpress.com/467/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/kr3l.wordpress.com/467/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/kr3l.wordpress.com/467/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/kr3l.wordpress.com/467/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/kr3l.wordpress.com/467/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/kr3l.wordpress.com/467/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/kr3l.wordpress.com/467/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/kr3l.wordpress.com/467/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/kr3l.wordpress.com/467/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=kr3l.wordpress.com&amp;blog=5356231&amp;post=467&amp;subd=kr3l&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>https://kr3l.wordpress.com/2011/01/08/custom-fritzing-dwengo/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="https://secure.gravatar.com/avatar/40eb860d9b738ffbe85e8aa0c0c0c074?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">kr3l</media:title>
		</media:content>

		<media:content url="http://fritzing.org/media/uploads/headers/home.jpg" medium="image">
			<media:title type="html">Fritzing</media:title>
		</media:content>

		<media:content url="http://kr3l.files.wordpress.com/2011/01/screenshot-dwengo-board-svg-inkscape.png" medium="image">
			<media:title type="html">Screenshot-dwengo-board.svg - Inkscape</media:title>
		</media:content>

		<media:content url="http://kr3l.files.wordpress.com/2011/01/fritzing-parts-editor.png" medium="image">
			<media:title type="html">Fritzing Parts Editor</media:title>
		</media:content>

		<media:content url="http://kr3l.files.wordpress.com/2011/01/rommelrubot_bb.png" medium="image">
			<media:title type="html">rommelrubot_bb</media:title>
		</media:content>
	</item>
		<item>
		<title>Bluetooth communication between BlueSMIRF and Ubuntu</title>
		<link>https://kr3l.wordpress.com/2010/12/19/bluetooth-communication-between-bluesmirf-and-ubuntu/</link>
		<comments>https://kr3l.wordpress.com/2010/12/19/bluetooth-communication-between-bluesmirf-and-ubuntu/#comments</comments>
		<pubDate>Sun, 19 Dec 2010 11:15:13 +0000</pubDate>
		<dc:creator>Karel</dc:creator>
				<category><![CDATA[Electronics]]></category>
		<category><![CDATA[PIC18F]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[bluesmirf]]></category>
		<category><![CDATA[Bluetooth]]></category>
		<category><![CDATA[Dwengo]]></category>
		<category><![CDATA[Pinguino]]></category>
		<category><![CDATA[rommelrubot]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://kr3l.wordpress.com/?p=452</guid>
		<description><![CDATA[A quick post on how to set up the Bluetooth communication between Ubuntu and a BlueSMIRF Modem. My laptop was broken recently, and after getting a free new motherboard from the kind Sony people I reinstalled Ubuntu and tried to get all my software running again. Today I tried setting up the Bluetooth communication with [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=kr3l.wordpress.com&amp;blog=5356231&amp;post=452&amp;subd=kr3l&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>A quick post on how to set up the Bluetooth communication between Ubuntu and a <a href="http://www.sparkfun.com/products/582" target="_blank">BlueSMIRF</a> Modem.</p>
<p>My laptop was broken recently, and after getting a free new motherboard from the kind Sony people I reinstalled Ubuntu and tried to get all my software running again. Today I tried setting up the Bluetooth communication with my toy car&#8217;s BlueSMIRF (see previous posts) and  my laptop, and decided on documenting it. So here&#8217;s how to do it:</p>
<ol>
<li>(optional) It&#8217;s easiest if you can see what is happening on the BlueSMIRF side. Therefore, you&#8217;ll need a serial (TTL) to USB convertor like<a href="http://www.sparkfun.com/products/8531" target="_blank"> this one</a>. Alternatively, if you have a Dwengo board (or similar), you can use that one by simly removing the PIC18F chip for a while:<a href="http://kr3l.files.wordpress.com/2010/12/dwengoasuart2usb.png"><img class="size-full wp-image-454 alignnone" title="dwengoASuart2usb" src="http://kr3l.files.wordpress.com/2010/12/dwengoasuart2usb.png?w=455&#038;h=306" alt="" width="455" height="306" /><br />
</a><br />
Now you can monitor the commands and data passing through the BlueSMIRF by opening &#8220;serial port terminal&#8221; (install it through the Ubuntu Software Center) on /dev/usbtty0 at the speed of your BlueSmirf (default 115200 baud)</p>
<p>Details on the commands available are available in <a href="http://www.sparkfun.com/datasheets/Wireless/Bluetooth/rn-bluetooth-um.pdf" target="_blank">the Roving Networks Command datasheet. </a></li>
<li>I didn&#8217;t get the default Ubuntu Bluetooth tool (the B in the taskbar) to play nice with the BlueSMIRF, so I installed &#8220;Bluetooth Manager&#8221; (BlueMan) through the Software Center.</li>
<li>Power the BlueSMIRF, it should start blinking rapidly for about a minute. This means it is waiting for a connection. Once the rapid blinking stops, you can&#8217;t connect anymore!</li>
<li>Click on the B in your taskbar of BlueMan, a window should open showing the Bluetooth devices in your environment. One of them should be FireFly (the BlueSMIRF). Right click on it an select &#8220;connect to SPP&#8221;:<br />
<a href="http://kr3l.files.wordpress.com/2010/12/connect2spp.png"><img class="alignnone size-full wp-image-457" title="connect2SPP" src="http://kr3l.files.wordpress.com/2010/12/connect2spp.png?w=455&#038;h=357" alt="" width="455" height="357" /></a><br />
(the name in the screenshot is robot-719A instead of Firefly because I changed it earlier)</li>
<li>Because this is the first time you connect to the BlueSMIRF, it needs to be paired. Therefore, Blueman will ask you the pass phrase. Enter &#8220;1234&#8243; (without quotes), this is the default passphrase of the BlueSMIRF.</li>
<li> The bottom of the Blueman screen should now say &#8220;Serial port connected to /dev/rfcomm0&#8243;. Now you can open a serial connection to /dev/rfcomm0 using serial port manager (or from within a script) and start communicating <img src='https://s-ssl.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /><br />
The LED on the BlueSMIRF should turn green.</li>
</ol>
<p>That&#8217;s it! Now the pairing is done, and you won&#8217;t need to enter the passphrase the next time you connect to the BlueSMIRF.</p>
<ol></ol>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/kr3l.wordpress.com/452/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/kr3l.wordpress.com/452/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/kr3l.wordpress.com/452/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/kr3l.wordpress.com/452/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/kr3l.wordpress.com/452/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/kr3l.wordpress.com/452/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/kr3l.wordpress.com/452/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/kr3l.wordpress.com/452/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/kr3l.wordpress.com/452/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/kr3l.wordpress.com/452/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/kr3l.wordpress.com/452/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/kr3l.wordpress.com/452/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/kr3l.wordpress.com/452/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/kr3l.wordpress.com/452/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=kr3l.wordpress.com&amp;blog=5356231&amp;post=452&amp;subd=kr3l&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>https://kr3l.wordpress.com/2010/12/19/bluetooth-communication-between-bluesmirf-and-ubuntu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="https://secure.gravatar.com/avatar/40eb860d9b738ffbe85e8aa0c0c0c074?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">kr3l</media:title>
		</media:content>

		<media:content url="http://kr3l.files.wordpress.com/2010/12/dwengoasuart2usb.png" medium="image">
			<media:title type="html">dwengoASuart2usb</media:title>
		</media:content>

		<media:content url="http://kr3l.files.wordpress.com/2010/12/connect2spp.png" medium="image">
			<media:title type="html">connect2SPP</media:title>
		</media:content>
	</item>
		<item>
		<title>Using Android as robot remote control</title>
		<link>https://kr3l.wordpress.com/2010/09/04/using-android-as-robot-remote-control/</link>
		<comments>https://kr3l.wordpress.com/2010/09/04/using-android-as-robot-remote-control/#comments</comments>
		<pubDate>Sat, 04 Sep 2010 17:18:43 +0000</pubDate>
		<dc:creator>Karel</dc:creator>
				<category><![CDATA[Electronics]]></category>
		<category><![CDATA[PIC18F]]></category>
		<category><![CDATA[android]]></category>
		<category><![CDATA[Bluetooth]]></category>
		<category><![CDATA[Pinguino]]></category>
		<category><![CDATA[robot]]></category>
		<category><![CDATA[rommelrubot]]></category>

		<guid isPermaLink="false">http://kr3l.wordpress.com/?p=438</guid>
		<description><![CDATA[The flea market car / robot saga continues&#8230; Controlling the robot from my laptop via Bluetooth was cool , but running after the robot with the laptop in my hands kind of diminished the James Bond &#8211; feeling of it. Therefore, I decided that my first application I would create for my brand new Android [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=kr3l.wordpress.com&amp;blog=5356231&amp;post=438&amp;subd=kr3l&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><img class="size-medium wp-image-445 alignright" style="margin:10px;" title="CIMG7149" src="http://kr3l.files.wordpress.com/2010/09/cimg7149.jpg?w=300&#038;h=225" alt="" width="300" height="225" /></p>
<div id="_mcePaste">The flea market car / robot saga continues&#8230; Controlling the robot from my laptop via Bluetooth was cool</div>
<div id="_mcePaste">, but running after the robot with the laptop in my hands kind of diminished the James Bond &#8211; feeling of it. Therefore, I decided that my first application I would create for my brand new Android smartphone would be a remote control for the robot!</div>
<p>Luckily, the online developer information (available at <a href="http://developer.android.com/">http://developer.android.com</a>), provides a wealth of information for getting started. What was more, I actually found a sample application there, called <a href="http://developer.android.com/resources/samples/BluetoothChat/index.html" target="_blank">BluetoothChat</a>, that almost did exactly what I wanted to do. The BluetoothChat application makes a connection to a Bluetooth device (this will be the robot) and it allows to send text to it once connected (the text will be the robot commands).</p>
<p><a href="http://kr3l.files.wordpress.com/2010/09/100811-android-gr.jpg"><img class="alignleft size-medium wp-image-450" style="margin:10px;" title="100811-android-gr" src="http://kr3l.files.wordpress.com/2010/09/100811-android-gr.jpg?w=147&#038;h=122" alt="" width="147" height="122" /></a></p>
<p>Google provides a complete development environment for developing Android applications, which can be downloaded at <a href="http://developer.android.com/sdk/index.html">http://developer.android.com/sdk/index.html</a>. Just follow the instructions over there to install the platform and create a &#8220;hello world&#8221; application. Connecting your phone over USB to the development computer allows you to debug / run the application on the phone. On my Ubuntu laptop, I have to restart the adb server as root after connecting the phone via USB:</p>
<div>(while in folder /android-sdk-linux_86/tools)</div>
<pre>./adb kill-server
sudo ./adb start-server
./adb devices</pre>
<p>Now let&#8217;s skip to the application. I wanted to change a few things to the BluetoothChat application:</p>
<ul>
<li>actually get it connected to a Bluetooth device, because this wasn&#8217;t working right away.. <img src='https://s-ssl.wordpress.com/wp-includes/images/smilies/icon_sad.gif' alt=':-(' class='wp-smiley' /> </li>
<li>after connecting to the robot over Bluetooth, I wanted to automatically start my PING &#8211; PONG handshake (Android says &#8220;PING&#8221; and the robot answers with &#8220;PONG&#8221;, which indicates the connection is established successfully and the robot should start listening for commands)</li>
<li>Instead of typing the commands in the text field I wanted some big buttons (forward, backward, left, right, &#8230;)</li>
</ul>
<h2>Connecting the BluetoothChat example to a Bluetooth device</h2>
<p>I first tried connecting the BluetoothChat Android application to Bluetooth on my laptop, but it didn&#8217;t work. Whatever I tried, I always got a &#8220;service discovery failed&#8221; exception on the following line of code in BluetoothChatService.java:</p>
<p><span style="font-family:Consolas, Monaco, 'Courier New', Courier, monospace;line-height:18px;font-size:12px;white-space:pre;">tmp = device.createRfcommSocketToServiceRecord(MY_UUID);</span></p>
<p>After a long time trying to solve this, I found <a href="http://stackoverflow.com/questions/3397071/android-bluetooth-service-discovery-failed-exception" target="_blank">this site</a>, which suggested to change the line of code to this code:</p>
<pre>Method m = device.getClass().getMethod("createRfcommSocket", new Class[] {int.class});
tmp = (BluetoothSocket) m.invoke(device, 1);</pre>
<p>And this worked! Also, note that you have to connect at 57600 baud to the Android Bluetooth.</p>
<h2>Do a handshake once connected</h2>
<p>Once connected to the BlueSMIRF on the robot, the following should happen:</p>
<ul>
<li>Android sends &#8220;PING\n&#8221; to robot</li>
<li>Robot receives this and sends &#8220;PONG\r\n&#8221; to Android</li>
<li>Android receives this, and knows the connection is succesfully established.</li>
<li>Now Android can send commands like &#8220;D,70,1&#8243; to set the servo to 70° and the drive motor to forward motion.</li>
</ul>
<p>I changed the run() method of the ConnectedThread to do the handshake once connected: <a href="http://snippets.dzone.com/posts/show/12175" target="_blank">see code</a>.</p>
<h2>Big buttons that send commands to the robot</h2>
<p>And now for the fun part.. I wanted to change the layout to have nine big buttons which would send the robot in a certain direction:</p>
<p><a href="http://kr3l.files.wordpress.com/2010/09/cimg7148.jpg"><img class="alignnone size-medium wp-image-442" title="CIMG7148" src="http://kr3l.files.wordpress.com/2010/09/cimg7148.jpg?w=225&#038;h=300" alt="" width="225" height="300" /></a></p>
<p>I used the example at<a href="http://www.connorgarvey.com/blog/?p=1" target="_blank"> this site</a> to create the big button layout. Once a button is pressed, it will send a command over Bluetooth to the robot which will make it ride in that direction:</p>
<pre>        mBRButton = (Button) findViewById(R.id.button_br);

        mBRButton.setOnClickListener(new OnClickListener() {

            public void onClick(View v) {

                // Send a message using content of the edit text widget

                String message = "D," + right + "," + backward + "\r\n";

                sendMessage(message);

            }

        });</pre>
<p>And now a little movie to prove that it works!</p>
<span class='embed-youtube' style='text-align:center; display: block;'><iframe class='youtube-player' type='text/html' width='455' height='286' src='http://www.youtube.com/embed/8PNuU8uNoyo?version=3&amp;rel=1&amp;fs=1&amp;showsearch=0&amp;showinfo=1&amp;iv_load_policy=1&amp;wmode=transparent' frameborder='0'></iframe></span>
<p>The source code can be downloaded <a href="http://db.tt/mnEibTz">here</a>.</p>
<p>edit: latest version of code is now available via <a href="https://github.com/kr3l/rommelrubot">https://github.com/kr3l/rommelrubot</a></p>
<p>&nbsp;</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/kr3l.wordpress.com/438/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/kr3l.wordpress.com/438/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/kr3l.wordpress.com/438/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/kr3l.wordpress.com/438/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/kr3l.wordpress.com/438/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/kr3l.wordpress.com/438/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/kr3l.wordpress.com/438/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/kr3l.wordpress.com/438/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/kr3l.wordpress.com/438/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/kr3l.wordpress.com/438/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/kr3l.wordpress.com/438/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/kr3l.wordpress.com/438/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/kr3l.wordpress.com/438/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/kr3l.wordpress.com/438/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=kr3l.wordpress.com&amp;blog=5356231&amp;post=438&amp;subd=kr3l&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>https://kr3l.wordpress.com/2010/09/04/using-android-as-robot-remote-control/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
	
		<media:content url="https://secure.gravatar.com/avatar/40eb860d9b738ffbe85e8aa0c0c0c074?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">kr3l</media:title>
		</media:content>

		<media:content url="http://kr3l.files.wordpress.com/2010/09/cimg7149.jpg?w=300" medium="image">
			<media:title type="html">CIMG7149</media:title>
		</media:content>

		<media:content url="http://kr3l.files.wordpress.com/2010/09/100811-android-gr.jpg?w=300" medium="image">
			<media:title type="html">100811-android-gr</media:title>
		</media:content>

		<media:content url="http://kr3l.files.wordpress.com/2010/09/cimg7148.jpg?w=225" medium="image">
			<media:title type="html">CIMG7148</media:title>
		</media:content>
	</item>
		<item>
		<title>Time for a new steering system</title>
		<link>https://kr3l.wordpress.com/2010/08/15/time-for-a-new-steering-system/</link>
		<comments>https://kr3l.wordpress.com/2010/08/15/time-for-a-new-steering-system/#comments</comments>
		<pubDate>Sun, 15 Aug 2010 21:34:26 +0000</pubDate>
		<dc:creator>Karel</dc:creator>
				<category><![CDATA[Electronics]]></category>
		<category><![CDATA[PIC18F]]></category>
		<category><![CDATA[Bluetooth]]></category>
		<category><![CDATA[Pinguino]]></category>
		<category><![CDATA[robot]]></category>
		<category><![CDATA[rommelrubot]]></category>
		<category><![CDATA[servo]]></category>

		<guid isPermaLink="false">http://kr3l.wordpress.com/?p=433</guid>
		<description><![CDATA[My last post was about putting Bluetooth in a flea market toy car in order to control it remotely from my laptop. One problem I had with the car was the amount of current it drew. Unexpectedly, it turned out to be the steering that drew most of the current. I thought the steering was [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=kr3l.wordpress.com&amp;blog=5356231&amp;post=433&amp;subd=kr3l&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>My last post was about putting Bluetooth in a flea market toy car in order to control it remotely from my laptop. One problem I had with the car was the amount of current it drew. Unexpectedly, it turned out to be the steering that drew most of the current. I thought the steering was done by a servo motor, but apparently they put a regular DC motor in it to turn the weels. A piece of plastic stops the turning and basically the motor stalls everytime you steer, and so draws the maximum amount of power..</p>
<p>To reduce the power-demands of the car I cut out the steering DC motor (and all the plastic around it) and glued in a servo.</p>
<p><a href="http://kr3l.files.wordpress.com/2010/08/imag0415.jpg"><img class="alignnone size-medium wp-image-434" title="IMAG0415" src="http://kr3l.files.wordpress.com/2010/08/imag0415.jpg?w=300&#038;h=225" alt="" width="300" height="225" /></a></p>
<p>Now to make the servo turn the weels, I used some good old Lego bricks. The flat one with the dents is glued to the thing that used to make the weels turn. Than I used a gear wheel glued to (God, I love hot-glue!) the servo, which makes the flat brick move. Because the servo sometimes turns too much (it&#8217;s a cheap one so not always that accurate), I cut most dents from the gear wheel. This assures that no damage is done if the gear wheel turns too much..</p>
<p><a href="http://kr3l.files.wordpress.com/2010/08/imag0419.jpg"><img class="alignnone size-medium wp-image-435" title="IMAG0419" src="http://kr3l.files.wordpress.com/2010/08/imag0419.jpg?w=300&#038;h=225" alt="" width="300" height="225" /></a></p>
<span class='embed-youtube' style='text-align:center; display: block;'><iframe class='youtube-player' type='text/html' width='455' height='286' src='http://www.youtube.com/embed/QGM90g0MKa8?version=3&amp;rel=1&amp;fs=1&amp;showsearch=0&amp;showinfo=1&amp;iv_load_policy=1&amp;wmode=transparent' frameborder='0'></iframe></span>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/kr3l.wordpress.com/433/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/kr3l.wordpress.com/433/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/kr3l.wordpress.com/433/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/kr3l.wordpress.com/433/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/kr3l.wordpress.com/433/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/kr3l.wordpress.com/433/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/kr3l.wordpress.com/433/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/kr3l.wordpress.com/433/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/kr3l.wordpress.com/433/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/kr3l.wordpress.com/433/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/kr3l.wordpress.com/433/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/kr3l.wordpress.com/433/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/kr3l.wordpress.com/433/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/kr3l.wordpress.com/433/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=kr3l.wordpress.com&amp;blog=5356231&amp;post=433&amp;subd=kr3l&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>https://kr3l.wordpress.com/2010/08/15/time-for-a-new-steering-system/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="https://secure.gravatar.com/avatar/40eb860d9b738ffbe85e8aa0c0c0c074?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">kr3l</media:title>
		</media:content>

		<media:content url="http://kr3l.files.wordpress.com/2010/08/imag0415.jpg?w=300" medium="image">
			<media:title type="html">IMAG0415</media:title>
		</media:content>

		<media:content url="http://kr3l.files.wordpress.com/2010/08/imag0419.jpg?w=300" medium="image">
			<media:title type="html">IMAG0419</media:title>
		</media:content>
	</item>
		<item>
		<title>Putting Bluetooth into a flea market toy car</title>
		<link>https://kr3l.wordpress.com/2010/05/29/putting-bluetooth-into-a-flea-market-toy-car/</link>
		<comments>https://kr3l.wordpress.com/2010/05/29/putting-bluetooth-into-a-flea-market-toy-car/#comments</comments>
		<pubDate>Sat, 29 May 2010 20:39:57 +0000</pubDate>
		<dc:creator>Karel</dc:creator>
				<category><![CDATA[Electronics]]></category>
		<category><![CDATA[PIC18F]]></category>
		<category><![CDATA[PIC]]></category>
		<category><![CDATA[Pinguino]]></category>
		<category><![CDATA[robot]]></category>
		<category><![CDATA[rommelrubot]]></category>

		<guid isPermaLink="false">http://kr3l.wordpress.com/?p=421</guid>
		<description><![CDATA[On the flea market here in Ghent a few weeks ago, I bought myself a toy car with a wired remote control. Feeling destructive, I immediately removed the hood of the car, opened up the remote control and measured how the car could be controlled. It turns out there are four wires from the remote [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=kr3l.wordpress.com&amp;blog=5356231&amp;post=421&amp;subd=kr3l&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>On the flea market here in Ghent a few weeks ago, I bought myself a toy car with a wired remote control. Feeling destructive, I immediately removed the hood of the car, opened up the remote control and measured how the car could be controlled. It turns out there are four wires from the remote to the car. Two of them control the forward / backward motion by setting 5V or -5V across them. The two other wires control the left / right motion of the front wheels, again by setting 5V across them.</p>
<p><a href="http://kr3l.files.wordpress.com/2010/05/cimg7114.jpg"><img class="alignnone size-medium wp-image-422" title="The flea market toy car" src="http://kr3l.files.wordpress.com/2010/05/cimg7114.jpg?w=300&#038;h=225" alt="" width="300" height="225" /></a> <a href="http://kr3l.files.wordpress.com/2010/05/cimg7113.jpg"><img class="alignnone size-medium wp-image-423" title="The guts of the remote control" src="http://kr3l.files.wordpress.com/2010/05/cimg7113.jpg?w=300&#038;h=225" alt="" width="300" height="225" /></a></p>
<p>Next I soldered header pins to the wires of the car so I can control them through the L293D driver chip of my Dwengo board. Next I added the Bluesmirf module (as explained in a previous post) and taped everything together using Duct tape.</p>
<p><a href="http://kr3l.files.wordpress.com/2010/05/cimg7134.jpg"><img class="alignnone size-medium wp-image-426" title="Everything taped together" src="http://kr3l.files.wordpress.com/2010/05/cimg7134.jpg?w=300&#038;h=225" alt="" width="300" height="225" /></a></p>
<p>After some programming and some tweaking (putting the battery pack above the steering wheels so they have more grip) I got my car driving across the appartment <img src='https://s-ssl.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<span class='embed-youtube' style='text-align:center; display: block;'><iframe class='youtube-player' type='text/html' width='455' height='286' src='http://www.youtube.com/embed/n7-tikchm9I?version=3&amp;rel=1&amp;fs=1&amp;showsearch=0&amp;showinfo=1&amp;iv_load_policy=1&amp;wmode=transparent' frameborder='0'></iframe></span>
<p>edit: latest version of code is now available via <a href="https://github.com/kr3l/rommelrubot">https://github.com/kr3l/rommelrubot</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/kr3l.wordpress.com/421/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/kr3l.wordpress.com/421/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/kr3l.wordpress.com/421/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/kr3l.wordpress.com/421/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/kr3l.wordpress.com/421/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/kr3l.wordpress.com/421/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/kr3l.wordpress.com/421/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/kr3l.wordpress.com/421/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/kr3l.wordpress.com/421/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/kr3l.wordpress.com/421/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/kr3l.wordpress.com/421/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/kr3l.wordpress.com/421/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/kr3l.wordpress.com/421/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/kr3l.wordpress.com/421/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=kr3l.wordpress.com&amp;blog=5356231&amp;post=421&amp;subd=kr3l&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>https://kr3l.wordpress.com/2010/05/29/putting-bluetooth-into-a-flea-market-toy-car/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="https://secure.gravatar.com/avatar/40eb860d9b738ffbe85e8aa0c0c0c074?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">kr3l</media:title>
		</media:content>

		<media:content url="http://kr3l.files.wordpress.com/2010/05/cimg7114.jpg?w=300" medium="image">
			<media:title type="html">The flea market toy car</media:title>
		</media:content>

		<media:content url="http://kr3l.files.wordpress.com/2010/05/cimg7113.jpg?w=300" medium="image">
			<media:title type="html">The guts of the remote control</media:title>
		</media:content>

		<media:content url="http://kr3l.files.wordpress.com/2010/05/cimg7134.jpg?w=300" medium="image">
			<media:title type="html">Everything taped together</media:title>
		</media:content>
	</item>
		<item>
		<title>Communication with Pinguino via Bluetooth</title>
		<link>https://kr3l.wordpress.com/2010/02/22/robot-control-via-bluetooth/</link>
		<comments>https://kr3l.wordpress.com/2010/02/22/robot-control-via-bluetooth/#comments</comments>
		<pubDate>Mon, 22 Feb 2010 18:12:03 +0000</pubDate>
		<dc:creator>Karel</dc:creator>
				<category><![CDATA[Electronics]]></category>
		<category><![CDATA[PIC18F]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[18F4455]]></category>
		<category><![CDATA[Bluetooth]]></category>
		<category><![CDATA[Pinguino]]></category>
		<category><![CDATA[processing]]></category>
		<category><![CDATA[rommelrubot]]></category>
		<category><![CDATA[serial]]></category>

		<guid isPermaLink="false">http://kr3l.wordpress.com/?p=409</guid>
		<description><![CDATA[I bought a BlueSMIRF Bluetooth module a few weeks ago, and this weekend I&#8217;ve finally had some time to put it in action Connecting the BlueSMIRF module is really easy. The BlueSMIRF module has 6 pins: CTS-I, VCC, GND, TX-0, RX-1 and RTS-0. You have to connect CTS-I to RTS-0, connect VCC to the supply [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=kr3l.wordpress.com&amp;blog=5356231&amp;post=409&amp;subd=kr3l&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I bought a <a href="http://www.sparkfun.com/commerce/product_info.php?products_id=582" target="_blank">BlueSMIRF Bluetooth</a> module a few weeks ago, and this weekend I&#8217;ve finally had some time to put it in action <img src='https://s-ssl.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>Connecting the BlueSMIRF module is really easy. The BlueSMIRF module has 6 pins: CTS-I, VCC, GND, TX-0, RX-1 and RTS-0. You have to connect CTS-I to RTS-0, connect VCC to the supply voltage and GND to ground. The TX-0 pin is connected to the RX pin of the microprocessor, while the RX-1 pin is connected to the TX pin of the microprocessor. On the PIC18F4455 these are pins 26 and 25 (pinguino pins 9 and 8). s</p>
<pre>CTS-I  O----------------
VCC    O--5V           |
GND    O--0V (gnd)     |
TX-0   O-- to RX PIC   |
RX-1   O-- to TX PIC   |
RTS-0  O----------------</pre>
<p><a href="http://kr3l.files.wordpress.com/2010/02/cimg6700.jpg"><img class="alignnone size-medium wp-image-414" title="CIMG6700" src="http://kr3l.files.wordpress.com/2010/02/cimg6700.jpg?w=300&#038;h=225" alt="" width="300" height="225" /></a></p>
<p>As explained in <a href="http://kr3l.wordpress.com/2009/12/31/using-dwengo-board-as-a-pinguino/">a previous post</a>, I am using a <a href="http://www.hackinglab.org/pinguino/index_pinguino.html">Pinguino board</a>, so the code should work on Arduino as well without needing too many modifications. This is the code I used for writing some text:</p>
<div>
<pre>#define PIC18F4550
char incomingByte = 'K';	// for incoming serial data

void setup() {
  Serial.begin(115200);
}

void loop() {
	// send data only when you receive a C character
	if (Serial.available() &gt; 0) {
		// read the incoming byte:
		incomingByte = Serial.read();
		if (incomingByte == 'C') {
			Serial.print("I received: ");
			Serial.print(incomingByte, DEC);
		}
	}
}</pre>
</div>
<div>In the setup routine I connect to the serial port at 115200 bauds. The bluetooth module is just used as a regular serial cable, so no fancy tricks are necessary.</div>
<div>On my Ubuntu laptop, I had to do the following to get things running:</div>
<div>
<ul>
<li>first connect your Bluetooth dongle to the BlueSMIRF (mine appeared as FireFLY-719A)</li>
<li>sudo hcitool scan #so we know the MAC address of the FireFLY</li>
<li>rfcomm connect 0 00:06:66:03:72:9A #substitute with your BlueSMIRF&#8217;s MAC address</li>
<li>sudo gtkterm -p /dev/rfcomm0 -s 115200 #start gtkterm to read/write to the serial port</li>
</ul>
</div>
<p>Of course we don&#8217;t want to interact through gtkterm with our microcontroller. I wanted to employ Processing, but this gave some additional difficulties in my setup. In Processing, Serial.list() is used to list all available serial ports. The Bluetooth serial port /dev/rfcomm0 does not appear in the list though. A dirty hack to solve the issue is symlinking /dev/ttyS0 to /dev/rfcomm0:</p>
<pre>sudo rm /dev/ttyS0
sudo ln -s /dev/rfcomm0 /dev/ttyS0</pre>
<p>If anyone knows a better way to solve the issue, please mention so in the comments! This is the Processing code:</p>
<div>
<pre>import processing.serial.*;

Serial myPort;                // Create object from Serial class

void setup()
{
  size(200, 200);
  myPort = new Serial(this, Serial.list()[0], 115200);  //the first port in the list is /dev/ttyS0 which we symlinked to /dev/rfcomm0
}

void draw()
{
  while (myPort.available() &gt; 0) {                      //if something was received via serial port
    String inBuffer = myPort.readString();
    print(inBuffer);
  }
}

void keyPressed() {
  print(key);
  myPort.write(key);
}

void stop() {
  myPort.stop();
}</pre>
</div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/kr3l.wordpress.com/409/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/kr3l.wordpress.com/409/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/kr3l.wordpress.com/409/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/kr3l.wordpress.com/409/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/kr3l.wordpress.com/409/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/kr3l.wordpress.com/409/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/kr3l.wordpress.com/409/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/kr3l.wordpress.com/409/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/kr3l.wordpress.com/409/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/kr3l.wordpress.com/409/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/kr3l.wordpress.com/409/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/kr3l.wordpress.com/409/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/kr3l.wordpress.com/409/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/kr3l.wordpress.com/409/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=kr3l.wordpress.com&amp;blog=5356231&amp;post=409&amp;subd=kr3l&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>https://kr3l.wordpress.com/2010/02/22/robot-control-via-bluetooth/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="https://secure.gravatar.com/avatar/40eb860d9b738ffbe85e8aa0c0c0c074?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">kr3l</media:title>
		</media:content>

		<media:content url="http://kr3l.files.wordpress.com/2010/02/cimg6700.jpg?w=300" medium="image">
			<media:title type="html">CIMG6700</media:title>
		</media:content>
	</item>
		<item>
		<title>Synergy rocks</title>
		<link>https://kr3l.wordpress.com/2010/01/09/synergy-rocks/</link>
		<comments>https://kr3l.wordpress.com/2010/01/09/synergy-rocks/#comments</comments>
		<pubDate>Sat, 09 Jan 2010 12:09:47 +0000</pubDate>
		<dc:creator>Karel</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[open-source]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[synergy]]></category>

		<guid isPermaLink="false">http://kr3l.wordpress.com/?p=400</guid>
		<description><![CDATA[Just used the open-source software Synergy to share my mouse and keyboard between three laptops with different Operating Systems (Vista, Ubuntu, Xubuntu)! You&#8217;ll have to start Synergy on all computers (on Ubuntu / Xubuntu I installed the GUI QuickSynergy from the software management). The computer with the keyboard and mouse you want to share will [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=kr3l.wordpress.com&amp;blog=5356231&amp;post=400&amp;subd=kr3l&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Just used the open-source software <a href="http://synergy2.sourceforge.net/" target="_blank">Synergy </a>to share my mouse and keyboard between three laptops with different Operating Systems (Vista, Ubuntu, Xubuntu)!</p>
<p><a href="http://kr3l.files.wordpress.com/2010/01/cimg6664.jpg"><img class="alignnone size-medium wp-image-404" title="CIMG6664" src="http://kr3l.files.wordpress.com/2010/01/cimg6664.jpg?w=300&#038;h=225" alt="" width="300" height="225" /></a></p>
<p>You&#8217;ll have to start Synergy on all computers (on Ubuntu / Xubuntu I installed the GUI QuickSynergy from the software management). The computer with the keyboard and mouse you want to share will be the server, the other the clients. On the server, enter the position of the different screens (laptop1 is on the left of laptop2 etc.). Click start on all Synergy&#8217;s and now the desktop will extend to the other screens!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/kr3l.wordpress.com/400/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/kr3l.wordpress.com/400/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/kr3l.wordpress.com/400/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/kr3l.wordpress.com/400/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/kr3l.wordpress.com/400/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/kr3l.wordpress.com/400/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/kr3l.wordpress.com/400/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/kr3l.wordpress.com/400/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/kr3l.wordpress.com/400/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/kr3l.wordpress.com/400/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/kr3l.wordpress.com/400/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/kr3l.wordpress.com/400/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/kr3l.wordpress.com/400/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/kr3l.wordpress.com/400/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=kr3l.wordpress.com&amp;blog=5356231&amp;post=400&amp;subd=kr3l&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>https://kr3l.wordpress.com/2010/01/09/synergy-rocks/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="https://secure.gravatar.com/avatar/40eb860d9b738ffbe85e8aa0c0c0c074?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">kr3l</media:title>
		</media:content>

		<media:content url="http://kr3l.files.wordpress.com/2010/01/cimg6664.jpg?w=300" medium="image">
			<media:title type="html">CIMG6664</media:title>
		</media:content>
	</item>
		<item>
		<title>Using Dwengo board as a Pinguino</title>
		<link>https://kr3l.wordpress.com/2009/12/31/using-dwengo-board-as-a-pinguino/</link>
		<comments>https://kr3l.wordpress.com/2009/12/31/using-dwengo-board-as-a-pinguino/#comments</comments>
		<pubDate>Thu, 31 Dec 2009 15:35:23 +0000</pubDate>
		<dc:creator>Karel</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Dwengo]]></category>
		<category><![CDATA[Electronics]]></category>
		<category><![CDATA[PIC18F]]></category>
		<category><![CDATA[Pinguino]]></category>

		<guid isPermaLink="false">http://kr3l.wordpress.com/?p=390</guid>
		<description><![CDATA[The Pinguino project is a relatively new project that tries to build an Arduino-like project with a PIC processor. The project comes with a nice and simple IDE and a bootloader so programs can be placed on the PIC very easy.  I found the Dwengo board I own is compatible with the Tiny-4550 Pinguino board, so it [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=kr3l.wordpress.com&amp;blog=5356231&amp;post=390&amp;subd=kr3l&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><a href="http://kr3l.files.wordpress.com/2009/12/logo-pinguino1.jpg"><img class="alignleft size-thumbnail wp-image-396" title="logo pinguino" src="http://kr3l.files.wordpress.com/2009/12/logo-pinguino1.jpg?w=150&#038;h=113" alt="" width="150" height="113" /></a>The <a href="http://www.hackinglab.org/pinguino/index_pinguino.html" target="_blank">Pinguino project</a> is a relatively new project that tries to build an Arduino-like project with a PIC processor. The project comes with a nice and simple IDE and a bootloader so programs can be placed on the PIC very easy.  I found the <a href="http://www.dwengo.org/" target="_blank">Dwengo </a>board I own is compatible with the <a href="http://sites.google.com/site/pinguinotutorial/tiny-4550" target="_blank">Tiny-4550 </a>Pinguino board, so it is possible to use the Pinguino IDE and bootloader with the Dwengo board. </p>
<p>Here are the steps I followed on my Ubuntu (Karmic) machine to get things fired up:</p>
<ul>
<li>Install wxPython as explained <a href="http://wiki.wxpython.org/InstallingOnUbuntuOrDebian" target="_blank">here </a></li>
<li>Download the latest Pinguino IDE from the <a href="http://www.hackinglab.org/pinguino/download/" target="_blank">hackinglab dowload index</a>. Extract the archive. Run the IDE by running the pinguinobetax.py Python script from the terminal. Put sudo before it to run it with administrator rights, because otherwise you&#8217;ll get a &#8221;Could not change device&#8221; error! The IDE looks like this:</li>
</ul>
<p><a href="http://kr3l.files.wordpress.com/2009/12/ddr2q2dx_633ff6d44fq_b1.png"><img class="alignnone size-full wp-image-392" title="ddr2q2dx_633ff6d44fq_b" src="http://kr3l.files.wordpress.com/2009/12/ddr2q2dx_633ff6d44fq_b1.png?w=455&#038;h=525" alt="" width="455" height="525" /></a></p>
<ul>
<li>With the PIC18F4550 we need the second version of the bootloader (see <a href="http://sites.google.com/site/pinguinotutorial/bootloader" target="_blank">Pinguino tutorial site</a>). It can be dowloaded <a href="http://www.hackinglab.org/pinguino/download/bootloader%2018f-20%20V2/" target="_blank">here</a>. To put the bootloader on your PIC, I used xwisp, which is a Windows program (I ran it in a Virtualbox virtual machine).</li>
<li>Once the bootloader is on your PIC, connect your board via a USB cable to your PC. Hold the reset button and the &#8220;up&#8221; button on your board, then release the reset button. The bootloader program knows you want to place a program on it now.</li>
<li>Open up the Pinguino IDE and type e.g. this program in it:</li>
</ul>
<div>// Testing input with Pinguino</div>
<div>// jean-pierre MANDON 2008</div>
<div>// modified kr3l for DWENGO</div>
<div>#define PIC18F4550</div>
<div>void setup() </div>
<div>{</div>
<div>pinMode(0,INPUT);         //button</div>
<div>pinMode(21,OUTPUT);    //led</div>
<div>}</div>
<div>void loop() </div>
<div>{</div>
<div>if (digitalread(0)) digitalWrite(21,HIGH);</div>
<div>else digitalWrite(21,LOW);</div>
<div>}</div>
<div>The pin numbers used here are as in the Tiny-4550 schematic:</div>
<div><a href="http://kr3l.files.wordpress.com/2009/12/pinguino.gif"><img class="alignnone size-full wp-image-394" title="pinguino" src="http://kr3l.files.wordpress.com/2009/12/pinguino.gif?w=455&#038;h=261" alt="" width="455" height="261" /></a></div>
<div>so pin 21 as used in the program is actually pin 19 of the PIC processor.</div>
<ul>
<li>press the compile button, then the &#8220;put program on pinguino&#8221; button. The program starts running after a few seconds. If you press the center button one of the leds will go off.</li>
</ul>
<p>I think the Pinguino project is a really cool initiative and I hope they keep working on it. More experiments will be conducted soon!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/kr3l.wordpress.com/390/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/kr3l.wordpress.com/390/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/kr3l.wordpress.com/390/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/kr3l.wordpress.com/390/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/kr3l.wordpress.com/390/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/kr3l.wordpress.com/390/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/kr3l.wordpress.com/390/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/kr3l.wordpress.com/390/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/kr3l.wordpress.com/390/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/kr3l.wordpress.com/390/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/kr3l.wordpress.com/390/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/kr3l.wordpress.com/390/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/kr3l.wordpress.com/390/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/kr3l.wordpress.com/390/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=kr3l.wordpress.com&amp;blog=5356231&amp;post=390&amp;subd=kr3l&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>https://kr3l.wordpress.com/2009/12/31/using-dwengo-board-as-a-pinguino/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="https://secure.gravatar.com/avatar/40eb860d9b738ffbe85e8aa0c0c0c074?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">kr3l</media:title>
		</media:content>

		<media:content url="http://kr3l.files.wordpress.com/2009/12/logo-pinguino1.jpg?w=150" medium="image">
			<media:title type="html">logo pinguino</media:title>
		</media:content>

		<media:content url="http://kr3l.files.wordpress.com/2009/12/ddr2q2dx_633ff6d44fq_b1.png" medium="image">
			<media:title type="html">ddr2q2dx_633ff6d44fq_b</media:title>
		</media:content>

		<media:content url="http://kr3l.files.wordpress.com/2009/12/pinguino.gif" medium="image">
			<media:title type="html">pinguino</media:title>
		</media:content>
	</item>
	</channel>
</rss>
