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

<channel>
	<title>Arko&#039;s Blog</title>
	<atom:link href="http://arkorobotics.com/blog/?feed=rss2&#038;p=17" rel="self" type="application/rss+xml" />
	<link>http://arkorobotics.com/blog</link>
	<description>This Page Is Intentionally Left Blank.</description>
	<lastBuildDate>Mon, 10 Sep 2012 01:02:27 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.4.2</generator>
		<item>
		<title>Programmable Mars Watch for $50</title>
		<link>http://arkorobotics.com/blog/?p=93</link>
		<comments>http://arkorobotics.com/blog/?p=93#comments</comments>
		<pubDate>Sat, 08 Sep 2012 23:10:33 +0000</pubDate>
		<dc:creator>arko</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://arkorobotics.com/blog/?p=93</guid>
		<description><![CDATA[We have all heard by now that Curiosity, JPL/NASA&#8217;s new rover, has successfully landed on mars and is now roving the surface  http://www.jpl.nasa.gov/msl/ Here&#8217;s the thing with mars though.. time is kept differently there. This is because mars itself rotates a little slower than earth. Rather than a solar day taking 24 hours like it [...]]]></description>
			<content:encoded><![CDATA[<p>We have all heard by now that Curiosity, JPL/NASA&#8217;s new rover, has successfully landed on mars and is now roving the surface <img src='http://arkorobotics.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />   <a href="http://www.jpl.nasa.gov/msl/">http://www.jpl.nasa.gov/msl/</a></p>
<p>Here&#8217;s the thing with mars though.. time is kept differently there. This is because mars itself rotates a little slower than earth. Rather than a solar day taking 24 hours like it does here on earth, mars has a solar day of 24 earth hours 39 earth minutes and 35 earth seconds. This proves to be a pain when it comes to timekeeping. If you set your normal earth watch to the exact mars time at that moment, you will lose a mars second every 36 seconds on your watch. This is because earth seconds and mars seconds are different. Since you want to have a 24 hours day (Sol) you must scale the 24 earth hours, 39 earth minutes and 35 earth seconds into 24 mars hours. This redefines a second: 1 mars second = 1.0274912510416665 earth seconds. Side note: a mars day is called a &#8220;Sol&#8221;.</p>
<p>More on timekeeping on mars:</p>
<p><a href="http://www.giss.nasa.gov/tools/mars24/help/notes.html">http://www.giss.nasa.gov/tools/mars24/help/notes.html</a></p>
<p><a href="http://en.wikipedia.org/wiki/Timekeeping_on_Mars">http://en.wikipedia.org/wiki/Timekeeping_on_Mars</a></p>
<p>NASA&#8217;s official mars clock <a href="http://www.giss.nasa.gov/tools/mars24/">http://www.giss.nasa.gov/tools/mars24/</a></p>
<p>Awesome Android and iPhone app written by Scott Maxwell (@marsroverdriver):</p>
<p><a href="https://play.google.com/store/apps/details?id=org.scottmaxwell.android.marsclock">https://play.google.com/store/apps/details?id=org.scottmaxwell.android.marsclock</a></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>Now who really needs this? The answer is the mars rover team. In order to have an efficient day driving on mars, the rover driving team lives on mars time. From what I can tell, it seems painful. However, I wouldn&#8217;t mind doing it if it was for the opportunity to drive a rover on mars <img src='http://arkorobotics.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />   Although I don&#8217;t live on mars time and am not involved in the driving process, I still have this odd fascination with keeping track of mars time. I remember back in 2004 a local jeweler has figured out how to make analog mars watches: <a href="http://marsrovers.jpl.nasa.gov/spotlight/spirit/a3_20040108.html">http://marsrovers.jpl.nasa.gov/spotlight/spirit/a3_20040108.html</a>  This was too cool! I realized I couldn&#8217;t dish out $300 (a lot of money for a kid back then) to get a watch I wouldn&#8217;t need. Most of the people who bought them were apart of the mars team anyway.</p>
<p>Fast forward 8 years and now we have a new rover on the surface of mars, and all though I had a very very small role in the mission I&#8217;m still no where near having to live on mars time, but who says I can&#8217;t have a mars watch anyway? <img src='http://arkorobotics.com/blog/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
<p>&nbsp;</p>
<p>With the knowledge of keeping time on mars and a good background in embedded systems I figured it shouldn&#8217;t be too hard to modify a digital watch. I searched around and found the perfect watch for this project:</p>
<p>Ti Chronos ez430 915Mhz   &#8211;    <a href="http://processors.wiki.ti.com/index.php/EZ430-Chronos">http://processors.wiki.ti.com/index.php/EZ430-Chronos</a></p>
<p>Buy Here:    <a title="Ti-Store" href="https://estore.ti.com/eZ430-Chronos-915-eZ430-Chronos-Wireless-Watch-Development-Tool-P1736.aspx" target="_blank">Ti-Store</a>   ,   <a title="Digi-Key" href="http://search.digikey.com/scripts/DkSearch/dksus.dll?vendor=0&amp;keywords=296-25344-ND" target="_blank">Digi-Key</a>   ,   <a title="Mouser" href="http://www.mouser.com/Search/Refine.aspx?Keyword=chronos" target="_blank">Mouser</a>   ,  <a title="Newark" href="http://www.newark.com/jsp/search/browse.jsp;jsessionid=CIESIGDKJQXMICXDUZ1G2WQ?N=0&amp;Ntk=gensearch_001&amp;Ntt=EZ430-CHRONOS&amp;Ntx=mode+matchallpartial&amp;suggestions=false&amp;ref=globalsearch&amp;_requestid=28264" target="_blank">Newark</a></p>
<p><img class="alignnone" title="http://processors.wiki.ti.com/images/8/89/EZ430-Chronos.png" src="http://processors.wiki.ti.com/images/8/89/EZ430-Chronos.png" alt="" width="300" height="300" /></p>
<p>&nbsp;</p>
<p>The watch comes loaded with features:  rf communication, timers, alarms, accelerometer, barometer, and a temperature sensor.</p>
<p>The watch also comes with an rf to usb module, usb programmer/debugger, and a screw driver. For $50, it&#8217;s a steal. I looked over the example code before purchasing it and discovered that I could modify the timer that controls watches master timer. So I put in the order, rewrote the timer code (which I go into detail below) and modified the date files to keep track of sol&#8217;s rather than days.</p>
<p>&nbsp;</p>
<p>So lets dive right in.</p>
<p>First off, if you want to develop, you will need to download <strong>Code Composer Studio</strong> (<a href="http://processors.wiki.ti.com/index.php/Download_CCS">http://processors.wiki.ti.com/index.php/Download_CCS</a> ) which will come with the default watch firmware (also available here: <a title="http://www.ti.com/lit/zip/slac341" href="http://www.ti.com/lit/zip/slac341">http://www.ti.com/lit/zip/slac341</a> ).  If you just want to flash the watch with the mars watch firmware scroll down to the &#8220;Firmware:&#8221; link and follow instructions below. So anyway, the processor on the watch is based on the TI MSP430 and has several timers. The default program (<strong>ez430_chronos</strong>)  that keeps track of the time is located in <strong>clock.c</strong>, <strong>clock.h</strong>,<strong> timer.c</strong>, and <strong>timer.h</strong>. The first thing we need know is that the clock source is a 32.768khz internal crystal. This  internal clock is connected to Timer 0. The code in the function <strong>void Timer0_Init(void)</strong> found in <strong>timer.c</strong> configures the timer to count continuously up to 32768 (<strong>TA0CCR0</strong> register) which takes exactly 1 second to reach. Once the timer reaches 32768 it triggers an interrupt which calls the function <strong>void clock_tick(void)</strong> in <strong>clock.c</strong> which takes care of the clock logic (when to increment hours, minutes, and seconds). Since the Sol is 24 mars hours the logic will remain the same and we will mess with the timer that triggers the mars second. What we want is the timer to go off every 1.0274912510416665 earth seconds so that it would be the equivalent to 1 mars second. So you essentially want to scale up and count that extra 0.0274912510416665 earth seconds. Which means you need to increase the <strong>TA0CCR0</strong> register value. This requires some really simple math:</p>
<p><img class="alignnone" title="http://i.imgur.com/AWrbc.png" src="http://i.imgur.com/AWrbc.png" alt="" width="235" height="52" /></p>
<p><img class="alignnone" title="http://i.imgur.com/9ToKC.png" src="http://i.imgur.com/9ToKC.png" alt="" width="192" height="28" /></p>
<p>Here we do some basic scaling and discover the new <strong>TA0CCR0</strong> register value to be 33668.83&#8230; but we have a problem now.. the register isn&#8217;t a decimal value it&#8217;s a 16bit value. So that means we can either choose 33668 or 33669 to count to. So I decided to calculate the error for each value, expecting less error if I went with 33669. The error for 33668 is losing 1 mars second every 0.4 Sols and the error for 33669 is gaining 1 mars second every 1.3 Sols. Makes sense since 33669 is closer to 33668.83 than to 33668. So I began to wonder how bad does this drift really become? To drift 1 mars minute it would take about 78 Sols and to drift 8.57 mars minutes would take about 1 martian year (approx 668.6 Sols).</p>
<p>As for calculating Sol, I modified <strong>date.c </strong>and <strong>date.h</strong> so that when 24 hours is reached it increments 1 Sol rather than day and month. The Sol is displayed below the time. The Sol tracking works just fine but the back end code is a little messy so I will clean that up asap.</p>
<p>&nbsp;</p>
<p>After some testing and comparing against the<strong> mars24</strong> and <strong>mars clock</strong> programs I concluded that the clock drift isn&#8217;t too bad and could easily be changed by going into the time set menu by holding the &#8220;<strong>*</strong>&#8221; button. You can also set the Sol by holding the &#8220;<strong>#</strong>&#8221; button. Worst case, 2 years from now you may get 5 minutes late to something if you relied on the watch.</p>
<p>&nbsp;</p>
<p>This all took me about 5 hours to figure out, write, and test. Plus another hours to write this blog. The code is not very complete, but is a work in progress. I would say that it has the essentials to a mars watch, and that the bells and whistles will come late. In the coming weeks I will try to see if I can build in some compensation for the drift or modify the timer some how to get a more accurate reading. I will also clean up the sol code and make it so that you can track both earth and mars time in one watch. I figured it&#8217;d be nice to get the code out there so others who want to modify their watches into mars watches can do so.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>UPDATE:  Jon Hollander made a comment on hackaday with a very elegant solution to loosing that 0.833 in 33668.883. Rather than just picking 33669 and dealing with the loss of 0.166 he recommended switching between 33669 and 33668 until you average 33668.883. Turns out if you replace the  <strong>TA0CCR0 += 33669; </strong> in <strong>Timer.c</strong> with the following code below you can greatly increase the accuracy. The code below will count 33669 5 times then 33668 1 time thus averaging out the counting to 33668.833. Hooray for minimizing error!</p>
<p><span style="text-decoration: underline;">New Timer0 Code:</span></p>
<p>static u8 dither_counter = 0;</p>
<p>if(dither_counter &lt; 5)<br />
{<br />
TA0CCR0 += 33669; //33669<br />
dither_counter++;<br />
}<br />
else<br />
{<br />
TA0CCR0 += 33668; //33668<br />
dither_counter = 0;<br />
}</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>Source Code:  <a href="https://code.google.com/p/ti-chronos-mars-watch/source/browse/#svn%2Ftrunk%2FMars%20Watch%2Fez430_chronos">https://code.google.com/p/ti-chronos-mars-watch/source/browse/#svn%2Ftrunk%2FMars%20Watch%2Fez430_chronos</a></p>
<p>Firmware:</p>
<p>Just download the txt and upload it to your watch!</p>
<p>Download: <a href="http://ti-chronos-mars-watch.googlecode.com/files/ez430_chronos_915MHz.txt">http://ti-chronos-mars-watch.googlecode.com/files/ez430_chronos_915MHz.txt</a></p>
<p>To upload the firmware you can select the firmware txt file and upload it using the <strong>Chronos Control Center</strong> software that comes with the watch or download the software here <a title="http://www.ti.com/lit/zip/slac341" href="http://www.ti.com/lit/zip/slac341">http://www.ti.com/lit/zip/slac341</a> . The connection is established through the USB wireless access point (included with the watch).</p>
<p>&nbsp;</p>
<p>Here&#8217;s a demo:<br />
<iframe src="http://www.youtube.com/embed/M3adya5-p8w" frameborder="0" width="560" height="315"></iframe></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://arkorobotics.com/blog/?feed=rss2&#038;p=93</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Unlock and Backup your Ninja Tel phone</title>
		<link>http://arkorobotics.com/blog/?p=83</link>
		<comments>http://arkorobotics.com/blog/?p=83#comments</comments>
		<pubDate>Tue, 31 Jul 2012 05:16:10 +0000</pubDate>
		<dc:creator>arko</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://arkorobotics.com/blog/?p=83</guid>
		<description><![CDATA[Disclaimer: I&#8217;m a n00b. My process was successful, so it must be really easy to do this So if you are one of the lucky few to have been given a ninja phone (thanks ninjas!) this post may help you. I&#8217;ll go through the process I went through to unlock my bootloader and back up [...]]]></description>
			<content:encoded><![CDATA[<p>Disclaimer: I&#8217;m a n00b. My process was successful, so it must be really easy to do this <img src='http://arkorobotics.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>So if you are one of the lucky few to have been given a ninja phone (thanks ninjas!) this post may help you. I&#8217;ll go through the process I went through to unlock my bootloader and back up my phone.</p>
<p>&nbsp;</p>
<p>Before you start, plug your ninja phone into your computer and put it into hard drive mode. Take all your photos out in case something goes wrong.</p>
<p>&nbsp;</p>
<p>Fancy phone <img src='http://arkorobotics.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br />
<img src="http://i.imgur.com/friEn.jpg" alt="http://i.imgur.com/friEn.jpg" /></p>
<p>Ok, first things first, here are two links that will help (thanks to davo for sending me these links):</p>
<p>1) This all-in-one tool will help you if you are a n00b like me: <a title="http://forum.xda-developers.com/showthread.php?t=1676686" href="http://forum.xda-developers.com/showthread.php?t=1676686" target="_blank">http://forum.xda-developers.com/showthread.php?t=1676686</a> Go there and download the HTC One V AIO Kit, and boot it up.</p>
<p>2) This is a link that will get you all the tools, roms, etc that you will ever need: <a title="http://forum.xda-developers.com/showthread.php?p=27509958" href="http://forum.xda-developers.com/showthread.php?p=27509958" target="_blank">http://forum.xda-developers.com/showthread.php?p=27509958</a></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>Instructions:</p>
<p>0) Unpack the &#8220;One V 1.1.exe&#8221; and it&#8217;s data files from the first link, you should see this:</p>
<p><img src="http://i.imgur.com/2WQqg.png" alt="htcv" /></p>
<p>1) Select &#8220;1. Install HTC Drivers&#8221;, click &#8220;Go&#8221;.</p>
<p>2) Go to <a title="http://www.htcdev.com/" href="http://www.htcdev.com/">http://www.htcdev.com/</a> and register and account.</p>
<p>3) Click &#8220;Unlock Bootloader&#8221;, Select &#8220;All Other Supported Models&#8221;, then click &#8220;Begin Unlock Bootloader&#8221;, accept everything and get to page 3 where you have to input the Token, leave this window open.</p>
<p>4) Connect your ninja phone to the computer, and run the &#8220;One V 1.1.exe&#8221;</p>
<p>5)  Select &#8220;3. Get Token ID&#8221;, click &#8220;Go&#8221;. This will get the Token for you, right click on the cmd and select &#8220;mark&#8221; then select all of the token, this copies the token (instructions are given during the &#8220;Begin Unlock Bootloader&#8221; process).  Close the cmd.</p>
<p>6) Go to the htcdev site where you should have window open to page three, and paste in that tokin into the field, click &#8220;Submit&#8221;.</p>
<p>7) You will receive an email with the &#8220;Unlock_code.bin&#8221;, download and move that file into your data folder (/One_V_All-In-One_Kit_v1.1/Data/)</p>
<p>8 )  Run the &#8220;One V 1.1.exe&#8221;, Select &#8220;5. Unlock Bootloader&#8221;, click &#8220;Go&#8221;. Then select yes (select with volume button, press power to OK it) when prompted for unlocking the bootloader. You should see this:</p>
<p><img src="http://i.imgur.com/FvHS0.jpg" alt="http://i.imgur.com/FvHS0.jpg" /></p>
<p>&nbsp;</p>
<p>9) This voids your warranty.. lol?</p>
<p>10) Congrats, you&#8217;re unlocked!</p>
<p>&nbsp;</p>
<p>Onward to Backing up:</p>
<p>0) Reboot.</p>
<p>1) Put a microSD card inside</p>
<p>2) Open up &#8221;One V 1.1.exe&#8221;, Select &#8220;ClockWorkMod&#8221;, Click &#8220;Flash Recovery&#8221;. This will replace a part of the recovery partition on the phone allowing you to use the tool to recover the phone.</p>
<p>3) Once that&#8217;s done, the phone will automatically reboot. Mine froze up when rebooting, but after holding the power button and resetting it it was fine.</p>
<p>4) Open up &#8221;One V 1.1.exe&#8221;, Select &#8220;Boot into Recovery&#8221;, Click &#8220;Do Command&#8221;.</p>
<p>5) This will reboot the phone into recovery mode.</p>
<p>6) Look at the phone, the phone should have some options, select &#8220;Back up and restore&#8221;.</p>
<p>7)  Look at the phone, once that&#8217;s done, it will give you a &#8220;Reboot&#8221; option, select that.</p>
<p>8) You&#8217;re done! Everything is on the sd card now!</p>
<p>&nbsp;</p>
<p>You can feel free to screw around with the phone now. I&#8217;m not responsible for any of you screw ups <img src='http://arkorobotics.com/blog/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
<p>Happy hacking!</p>
<p>&nbsp;</p>
<p><img src="http://i.imgur.com/81jtS.jpg" alt="http://i.imgur.com/81jtS.jpg" /></p>
]]></content:encoded>
			<wfw:commentRss>http://arkorobotics.com/blog/?feed=rss2&#038;p=83</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Simple Hexapod Project &#8211; Part 1</title>
		<link>http://arkorobotics.com/blog/?p=71</link>
		<comments>http://arkorobotics.com/blog/?p=71#comments</comments>
		<pubDate>Wed, 27 Jun 2012 07:58:39 +0000</pubDate>
		<dc:creator>arko</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://arkorobotics.com/blog/?p=71</guid>
		<description><![CDATA[So aside from the hush hush projects, I&#8217;ve recently picked up a new project on the side that I can talk about This project has been started at Nullspace Labs working along with charliex and mmca. &#160; I&#8217;ve always wanted an army of loyal robots to follow me around.. what better than a 6 legged [...]]]></description>
			<content:encoded><![CDATA[<p>So aside from the hush hush projects, I&#8217;ve recently picked up a new project on the side that I can talk about <img src='http://arkorobotics.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>This project has been started at Nullspace Labs working along with charliex and mmca.</p>
<p>&nbsp;</p>
<p>I&#8217;ve always wanted an army of loyal robots to follow me around.. what better than a 6 legged crawler!</p>
<p>The goal has been to create a new and simple hexapod design that can be easily laser cut and assembled in one night. Oddly enough I&#8217;ve been CAD and rebuilding one each night at NSL. The process from design, to cad, to laser cut and assembled can take about 4-5 hours.. which is just mind blowing fast.</p>
<p>&nbsp;</p>
<p>Here&#8217;s a shot of the original design from CAD to real life prototype:</p>
<p><img class="alignnone" title="hexproto" src="http://farm9.staticflickr.com/8003/7453112150_c941362c1d_b.jpg" alt="" width="1024" height="768" /></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>It&#8217;s crazy to see it come together so quickly.</p>
<p>Now, the prototypes design has several flaws.. For example the joints are very wobbly. So to help this I fit the servo mount into the acrylic body to make a tight fit. Then I brought the boards closer together to decrease the bending at the joints.</p>
<p>&nbsp;</p>
<p><img class="alignnone" title="hexaa" src="http://farm9.staticflickr.com/8146/7453110994_0d266e1d88_b.jpg" alt="" width="1024" height="768" /></p>
<p>&nbsp;</p>
<p>So with the design slightly improved I&#8217;m going to move on to making a much more sturdy base. The base is currently the most wobbly part. Once the base is fixed up I&#8217;ll be ready to add the electronics / servo controller. Lots to do, but I figured I&#8217;ll give a quick peak at one of the things I&#8217;ve been working on.</p>
<p>&nbsp;</p>
<p>Gonna keep on prototyping.. more to come! I&#8217;ll post CAD files when the design isn&#8217;t changing every 5 minutes <img src='http://arkorobotics.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>&nbsp;</p>
<p><img class="alignnone" title="hexfamily" src="http://farm8.staticflickr.com/7256/7453110244_b79d24744f_b.jpg" alt="" width="1024" height="768" /></p>
<p>&nbsp;</p>
<p>New CAD:</p>
<p><a href="http://arkorobotics.com/blog/wp-content/uploads/2012/06/new_hexa.png"><img class="alignnone  wp-image-74" title="new_hexa" src="http://arkorobotics.com/blog/wp-content/uploads/2012/06/new_hexa.png" alt="" width="962" height="593" /></a></p>
<p>&nbsp;<br />
<a href="http://i.imgur.com/JPokI.jpg"><img class="alignnone  wp-image-74" title="new_hexa" src="http://i.imgur.com/JPokI.jpg" alt="" width="962" /></a><br />
&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><iframe src="http://www.youtube.com/embed/cPJmxRwnsVI" frameborder="0" width="560" height="315"></iframe></p>
]]></content:encoded>
			<wfw:commentRss>http://arkorobotics.com/blog/?feed=rss2&#038;p=71</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Layerone 2012 Autonomous Car &#8220;Stanley Jr&#8221; Badge Hack</title>
		<link>http://arkorobotics.com/blog/?p=47</link>
		<comments>http://arkorobotics.com/blog/?p=47#comments</comments>
		<pubDate>Tue, 29 May 2012 02:11:53 +0000</pubDate>
		<dc:creator>arko</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://arkorobotics.com/blog/?p=47</guid>
		<description><![CDATA[Woo! Haven&#8217;t been blogging much since most of my recent projects have required me to keep quiet until they are done.. it sucks not to be able to share a lot of what&#8217;s going on Anyway, with more to come I thought I&#8217;d share a recent project that was completed within a few hours of [...]]]></description>
			<content:encoded><![CDATA[<p>Woo! Haven&#8217;t been blogging much since most of my recent projects have required me to keep quiet until they are done.. it sucks not to be able to share a lot of what&#8217;s going on <img src='http://arkorobotics.com/blog/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /> </p>
<p>Anyway, with more to come I thought I&#8217;d share a recent project that was completed within a few hours of tinkering and hacking.</p>
<p>But first a quick back story, I had the great pleasure to be running the Hardware Hacking Village this year at <a href="http://www.layerone.org/" target="_blank">Layerone 2012</a> along side with Krs, Charliex, and Mmca of Nullspace Labs. Layerone is a security conference that covers everything from computer security to lockpicking and hardware hacking. Each year since last year, Layerone has had <a href="http://charliex2.wordpress.com/2012/05/24/preparing-for-layerone-2012/" target="_blank">electronics badges</a> and has provided a working space for attendees to build and hack their badges. What happens is we pretty much pack up most of our equipment at the <a href="http://032.la/" target="_blank">Nullspace Labs Hackerspace in Downtown LA</a> and bring it down to the conference. This year we had 12 metcal solder stations and 10 microscopes along with many tools such as heat guns and tweezers to help you build and hack your badge. <a href="http://charliex2.wordpress.com/">Charliex</a>, Krs, and Mmca spent the last 2 week designing, revising, ordering, testing, and building them (along with some help of a few NSL members, fiances,  and myself). With only 4 hours and 45 minutes left to spare, we all arrived at the Layerone hotel at 4:15am.. good times.</p>
<p>This years badge was a bullet proof pcb that was half an Arduino and half an RC car controller (with traces running between them allowing you to control it with the Arduino). When you bought the kit to populate the boards you also received an RC car which you could interface with your badge. I felt that human control was fun, but thought it would be awesome if my badge could just follow me and avoid obstacles so I wouldn&#8217;t have to carry it around my neck <img src='http://arkorobotics.com/blog/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> </p>
<p>I,  knowing ahead of time what the badge would be, decided to order a few parts a week in advance so when I had some time I could build and hack my own badge. I should note that there was a badge hacking competition held at the conference, and very fairly, I was disqualified due to prior knowledge <img src='http://arkorobotics.com/blog/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  no problem though, I have an awesome car that drives itself! I should note that you should check out <a href="http://charliex2.wordpress.com/">Charliex&#8217;s blog</a> which has a much more in depth write up about the badge hacking competition. Mad props to Jason who made a <a href="http://w6iee.blogspot.com/2012/05/i-won-layerone-badge-hacking-contest.html">morse code keyer</a> and Funsized who made <a href="http://zachpahle.wordpress.com/2012/05/29/layerone-badge-hack/">an EL-wire/IMU based badge</a>.</p>
<p>&nbsp;</p>
<p>Back to the car, I purchased the following:</p>
<p>&nbsp;</p>
<p>Sparkfun Prototyping Shield: ($14) <a href="http://www.sparkfun.com/products/7914">http://www.sparkfun.com/products/7914</a></p>
<p>&nbsp;</p>
<p>Parallax Ultrasonic Range Sensor PING))): ($30) <a href="http://www.parallax.com/StoreSearchResults/tabid/768/txtSearch/ping/List/0/SortField/4/ProductID/92/Default.aspx">http://www.parallax.com/&#8230;.</a></p>
<p>&nbsp;</p>
<p>Servo Motor Hitec HS-81: ($16)  <a href="http://www.xheli.com/hrc31081s.html?gclid=CLvBwq6hpLACFY4FRQods2JqXg">http://www.xheli.com/hrc31081s.html?gclid=CLvBwq6hpLACFY4FRQods2JqXg</a></p>
<p>&nbsp;</p>
<p>and  few wires..</p>
<p>&nbsp;</p>
<p>What I decided to make was an autonomous car that would use the badge as a base/brain, the car as the controls, and the ultrasonic sensor on top of a servo for finding and avoiding obstacles.</p>
<p>&nbsp;</p>
<p><a href="http://arkorobotics.com/blog/wp-content/uploads/2012/05/7290363510_c3fdd402b5_c.jpg"><img class="alignnone size-full wp-image-48" title="stanley jr" src="http://arkorobotics.com/blog/wp-content/uploads/2012/05/7290363510_c3fdd402b5_c.jpg" alt="" width="600" height="800" /></a></p>
<p>&nbsp;</p>
<p>I ended up naming it &#8220;Stanley Jr&#8221; after the notorious &#8220;<a href="http://cs.stanford.edu/group/roadrunner/stanley.html" target="_blank">Stanley</a>&#8221; DARPA Grand Challenge car built by Stanford&#8217;s team. I will take this moment to note that if you are a GoogleX Labs employer (or know of one) and are looking for someone madly obsessed with self-driving cars to work on your team, I will gladly send you my resume <img src='http://arkorobotics.com/blog/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' />  I build robots too!</p>
<p>So between helping others build their badges for the con, I was able to piece together the hardware in under an hour. After some troubleshooting I had a non-continuous hour of coding. The results aren&#8217;t great by a long shot when it comes to autonomous vehicles, but I do plan to improve the code and make Stanley Jr smarter. As of right now, the ultrasonic pans in three positions, left 45deg, center 90deg, and right 135deg. Since the steering is practically trianary (left, center, right) I figured it&#8217;d be best to sweep the three directions it had available, move a small step, and then repeat. After solving a few bugs and fixing  other peoples badges I had some working code. The goal the vehicle is given is to drive in the direction in which it sees the furthest distance. If the distances on all three options is too small, it will not make any moves to avoid accidents. Improved code that is currently in the works has a mode where it backs up in the direction it came in and then picks the alternative direction from that previous move.</p>
<p>The proper way to go about this control system would be to have a smooth sweeping of the ultrasonic sensors to obtain a more accurate model of the world. The car would then be given the goal of &#8220;drive forward and don&#8217;t hit anything&#8221;.  Then rather than &#8220;sweep, stop, think, act, repeat&#8221;, it would be constantly moving at a regulated speed based on how far it can see. Once objects to its center get close it will pick the furthest distance out and go in that direction with the intention to return to wheels center. So lots to come <img src='http://arkorobotics.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>&nbsp;</p>
<p>Stanley Jr is pretty stupid at this point, but not bad for about 2 hours of work. I plan to drastically improve the code and eventually move to a wheelchair base system that can drive around a beer keg delivering beer to bystanders while using a Microsoft Kinect to both recognize people and avoid objects.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>Here&#8217;s a video and few pictures of the car:</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><iframe src="http://www.youtube.com/embed/V4vyJ-SEwXo" frameborder="0" width="560" height="315"></iframe></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><a href="http://arkorobotics.com/blog/wp-content/uploads/2012/05/7290365398_42ec05b93a_c.jpg"><img class="alignnone size-full wp-image-51" title="stanley jr 2" src="http://arkorobotics.com/blog/wp-content/uploads/2012/05/7290365398_42ec05b93a_c.jpg" alt="" width="600" height="800" /></a></p>
<p>&nbsp;</p>
<p><a href="http://arkorobotics.com/blog/wp-content/uploads/2012/05/7290367392_fc4a17cd2b_c.jpg"><img class="alignnone size-full wp-image-52" title="stanley jr 3" src="http://arkorobotics.com/blog/wp-content/uploads/2012/05/7290367392_fc4a17cd2b_c.jpg" alt="" width="800" height="600" /></a></p>
<p>&nbsp;</p>
<p><a href="http://arkorobotics.com/blog/wp-content/uploads/2012/05/7290370940_108346d2e4_c.jpg"><img class="alignnone size-full wp-image-53" title="stanley jr 4" src="http://arkorobotics.com/blog/wp-content/uploads/2012/05/7290370940_108346d2e4_c.jpg" alt="" width="800" height="600" /></a></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>Be warned, I wrote this code in a rush, it&#8217;s no where near complete or smart. Here&#8217;s the code:</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>// Layerone 2012 Autonomous Car Code<br />
// By: Arko</p>
<p>#include &lt;Servo.h&gt;</p>
<p>Servo myservo;</p>
<p>int pos = 0;</p>
<p>const int pingPin = 2;</p>
<p>long world[4];<br />
int world_count = 0;</p>
<p>void setup()<br />
{<br />
Serial.begin(9600);<br />
myservo.attach(3);</p>
<p>pinMode(13,OUTPUT);</p>
<p>pinMode(9, OUTPUT); // BACK<br />
pinMode(8, OUTPUT); // FWD</p>
<p>pinMode(7, OUTPUT); // RIGHT<br />
pinMode(6, OUTPUT); // LEFT</p>
<p>}</p>
<p>void loop()<br />
{</p>
<p>digitalWrite(6,HIGH);<br />
digitalWrite(7,HIGH);<br />
digitalWrite(8,HIGH);<br />
digitalWrite(9,HIGH);</p>
<p>digitalWrite(13,HIGH);<br />
// Obtain Environmental Model</p>
<p>world_count = 0;<br />
delay(500);</p>
<p>for(pos = 45; pos &lt; 180; pos += 45)<br />
{<br />
myservo.write(pos);<br />
long duration, inches, cm;<br />
delay(500);<br />
pinMode(pingPin, OUTPUT);<br />
digitalWrite(pingPin, LOW);<br />
delayMicroseconds(2);<br />
digitalWrite(pingPin, HIGH);<br />
delayMicroseconds(5);<br />
digitalWrite(pingPin, LOW);</p>
<p>pinMode(pingPin, INPUT);<br />
duration = pulseIn(pingPin, HIGH);</p>
<p>// convert the time into a distance<br />
inches = microsecondsToInches(duration);<br />
cm = microsecondsToCentimeters(duration);</p>
<p>world[world_count] = cm;<br />
world_count++;</p>
<p>Serial.print(inches);<br />
Serial.print(&#8220;in, &#8220;);<br />
Serial.print(cm);<br />
Serial.print(&#8220;cm&#8221;);<br />
Serial.println();</p>
<p>delay(1000);<br />
}</p>
<p>Serial.print(&#8220;World: &#8220;);<br />
for(int c=0; c&lt;3; c++)<br />
{<br />
Serial.print(world[c]);<br />
Serial.print(&#8220;,&#8221;);<br />
}</p>
<p>digitalWrite(13,LOW);</p>
<p>delay(100);</p>
<p>// Control</p>
<p>// Direction 0 &#8211; LEFT<br />
// 1 &#8211; CENTER<br />
// 2 &#8211; RIGHT</p>
<p>if((world[0] &gt; world[1]) &amp;&amp; (world[0] &gt; world[2]) &amp;&amp; (world[0] &gt; 30)) // Go Left<br />
{<br />
digitalWrite(6, LOW);<br />
digitalWrite(7, HIGH);<br />
digitalWrite(8, LOW);<br />
Serial.println(&#8220;LEFT&#8221;);<br />
}<br />
else if((world[0] &lt; world[2]) &amp;&amp; (world[2] &gt; world[1]) &amp;&amp; (world[2] &gt; 30)) // Go Right<br />
{<br />
digitalWrite(6, HIGH);<br />
digitalWrite(7, LOW);<br />
digitalWrite(8, LOW);<br />
Serial.println(&#8220;RIGHT&#8221;);<br />
}<br />
else if(world[1] &gt; 30) // Go Center<br />
{<br />
digitalWrite(6, HIGH);<br />
digitalWrite(7, HIGH);<br />
digitalWrite(8, LOW);<br />
Serial.println(&#8220;CENTER&#8221;);<br />
}<br />
delay(500);<br />
}</p>
<p>&nbsp;</p>
<p>long microsecondsToInches(long microseconds)<br />
{<br />
return microseconds / 74 / 2;<br />
}</p>
<p>long microsecondsToCentimeters(long microseconds)<br />
{<br />
return microseconds / 29 / 2;<br />
}</p>
]]></content:encoded>
			<wfw:commentRss>http://arkorobotics.com/blog/?feed=rss2&#038;p=47</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Ardrone Hacking</title>
		<link>http://arkorobotics.com/blog/?p=39</link>
		<comments>http://arkorobotics.com/blog/?p=39#comments</comments>
		<pubDate>Mon, 09 Jan 2012 02:35:05 +0000</pubDate>
		<dc:creator>arko</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://arkorobotics.com/blog/?p=39</guid>
		<description><![CDATA[I did this a while back at NSL.. not really a whole lot of hacking involved really, but I thought I&#8217;d share. &#160; If you&#8217;d like to have ftp access to your ardrone you can follow these step: 1) Plug in your battery and using your laptop, connect to your Ar.Drone. 2) Download and open [...]]]></description>
			<content:encoded><![CDATA[<p>I did this a while back at NSL.. not really a whole lot of hacking involved really, but I thought I&#8217;d share.</p>
<p>&nbsp;</p>
<p>If you&#8217;d like to have ftp access to your ardrone you can follow these step:</p>
<p>1) Plug in your battery and using your laptop, connect to your Ar.Drone.</p>
<p>2) Download and open Putty (or whatever you use to telnet), telnet to 192.168.1.1 Port 23</p>
<p>3) ??? (This means you&#8217;re in, no password)</p>
<p>4) Profit</p>
<p>5) Congrats you&#8217;re in, but let&#8217;s make this easier to hack, let&#8217;s get it to give us ftp access to the root. cd into &#8216;/etc&#8217;</p>
<p>6) vi inetd.config</p>
<p>7) Change the first line &#8220;21 stream tcp nowait root ftpd ftpd -w /data/video&#8221; to &#8220;21 stream tcp nowait root ftpd ftpd -w /&#8221;</p>
<p>8) Open your web browser or filezilla and ftp into your Ar.Drone: <a href="ftp://192.168.1.1/" rel="nofollow">ftp://192.168.1.1</a></p>
<p>9) Enjoy</p>
<p>&nbsp;</p>
<p>The Ardrone uses AT commands, using google I found: <a href="https://projects.ardrone.org/boards/1/topics/show/852" rel="nofollow">https://projects.ardrone.org/boards/1/topics/show/852</a></p>
<p>&nbsp;</p>
<p>I made a really quick hack while back where I replaced the terrible battery connector they use with a deans connector (<a href="http://www.wsdeans.com/products/plugs/ultra_plug.html">http://www.wsdeans.com/products/plugs/ultra_plug.html</a>). So now I can connect the helicopter batteries I have lying around. It allows me to put in higher mAh batteries for longer flight time, which is always good <img src='http://arkorobotics.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>&nbsp;</p>
<p>Here&#8217;s the hardware teardown specs:</p>
<p>Processor Board: (Front)</p>
<ul>
<li>Parrot 6 &#8211; CPICS01192A 1022 R1A 7POF47424.00 ARM</li>
<li>01A17 D9HSJ M LTX1</li>
<li>Atmel 58A870 AT73C246 0P0987A 1025</li>
<li>ROCm ATHREOS AR6102G-8M2D 007K0523.51A F52257.1K 1023</li>
<li>SMSC USB3317 1409600C CKR</li>
<li>32.000Mhz Crystal</li>
</ul>
<p>(Back)</p>
<ul>
<li>1012 I-2 29FIG08AAC WP C BTT9</li>
</ul>
<p>Navigation Board:</p>
<ul>
<li>Microchip PIC24HJ 16GP304 I/PT 1019K WB</li>
<li>6L04STE 1017 V5B</li>
<li>Invensense IDG 500 143363-H AL1020C</li>
<li>043 U018 206</li>
</ul>

<a href='http://arkorobotics.com/blog/?attachment_id=40' title='NavBoard'><img width="150" height="150" src="http://arkorobotics.com/blog/wp-content/uploads/2012/01/NavBoard-150x150.jpg" class="attachment-thumbnail" alt="NavBoard" title="NavBoard" /></a>
<a href='http://arkorobotics.com/blog/?attachment_id=41' title='ProcessorBoard'><img width="150" height="150" src="http://arkorobotics.com/blog/wp-content/uploads/2012/01/ProcessorBoard-150x150.jpg" class="attachment-thumbnail" alt="ProcessorBoard" title="ProcessorBoard" /></a>
<a href='http://arkorobotics.com/blog/?attachment_id=42' title='ProcessorBoardBack'><img width="150" height="150" src="http://arkorobotics.com/blog/wp-content/uploads/2012/01/ProcessorBoardBack-150x150.jpg" class="attachment-thumbnail" alt="ProcessorBoardBack" title="ProcessorBoardBack" /></a>

<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://arkorobotics.com/blog/?feed=rss2&#038;p=39</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>[NSL] Nullspace Labs Gaming Night</title>
		<link>http://arkorobotics.com/blog/?p=33</link>
		<comments>http://arkorobotics.com/blog/?p=33#comments</comments>
		<pubDate>Wed, 23 Nov 2011 04:40:50 +0000</pubDate>
		<dc:creator>arko</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://arkorobotics.com/blog/?p=33</guid>
		<description><![CDATA[For the past few weeks the Nullspace Labs hackerspace has been holding a gaming night every Thursday starting 8pm. The games range from some of the most modern games such as Starcraft II to some of the oldest games in existence such as Go. The first night was a great hit, we had a Starcraft [...]]]></description>
			<content:encoded><![CDATA[<p>For the past few weeks the Nullspace Labs hackerspace has been holding a gaming night every Thursday starting 8pm. The games range from some of the most modern games such as Starcraft II to some of the oldest games in existence such as Go. The first night was a great hit, we had a Starcraft II tournament resulting in much friendly yelling and exciting matches.</p>
<p>&nbsp;</p>
<p>Interested in joining the NSL Gaming Night?</p>
<p>It&#8217;s simple, just show up! Bring your laptop, power brick, and game face.</p>
<p>&nbsp;</p>
<p>Where: Nullspace Labs in Downtown Los Angeles (3rd Floor): <a title="http://g.co/maps/tst36" href="http://g.co/maps/tst36">http://g.co/maps/tst36</a></p>
<p>When: Every Thursday</p>
<p>About NSL: <a href="http://032.la/">http://032.la/</a></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>First game of Go for the night ended up becoming a &#8220;How to play Go&#8221; match. As you can see, the player with the black stones is in quite some trouble.</p>
<p><img class="alignnone" title="go" src="http://farm7.staticflickr.com/6111/6334581033_09e7eb2b8e_z.jpg" alt="" width="640" height="427" /></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>Starcraft II matches taking place</p>
<p><img class="alignnone" title="sc2" src="http://farm7.staticflickr.com/6053/6335332860_e7427ff333_z.jpg" alt="" width="640" height="427" /></p>
<p>&nbsp;</p>
<p><img class="alignnone" title="sc22" src="http://farm7.staticflickr.com/6039/6334577505_5fcbdaa80f_z.jpg" alt="" width="427" height="640" /></p>
<p>&nbsp;</p>
<p><img class="alignnone" title="sc32" src="http://farm7.staticflickr.com/6091/6334577661_b178ac9b05_z.jpg" alt="" width="640" height="427" /></p>
<p>&nbsp;</p>
<p><img class="alignnone" title="sc223" src="http://farm7.staticflickr.com/6237/6334578149_7df5ec6e05_z.jpg" alt="" width="640" height="427" /></p>
<p>&nbsp;</p>
<p>Game of Cosmic Encounters going on</p>
<p><img class="alignnone" title="scc22" src="http://farm7.staticflickr.com/6237/6334578335_ac84cc540d_z.jpg" alt="" width="640" height="427" /></p>
<p>&nbsp;</p>
<p>A seriously intense game of Mouse Trap!</p>
<p><img class="alignnone" title="sc324" src="http://farm7.staticflickr.com/6053/6335336638_989f1aae00_z.jpg" alt="" width="640" height="427" /></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://arkorobotics.com/blog/?feed=rss2&#038;p=33</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>iClicker Hacking &#8211; Part 1</title>
		<link>http://arkorobotics.com/blog/?p=17</link>
		<comments>http://arkorobotics.com/blog/?p=17#comments</comments>
		<pubDate>Sat, 22 Oct 2011 09:53:01 +0000</pubDate>
		<dc:creator>arko</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://arkorobotics.com/blog/?p=17</guid>
		<description><![CDATA[Before I start, I&#8217;d like to note that this is my first reverse engineering project. So the story here starts with me taking a class that required me to purchase one of these iClicker&#8217;s ( http://www.iclicker.com/Products/iclicker/ ), otherwise I wouldn&#8217;t get &#8220;participation&#8221; points in class :/ So I purchased one and booted it up during lecture to [...]]]></description>
			<content:encoded><![CDATA[<p>Before I start, I&#8217;d like to note that this is my first reverse engineering project.</p>
<p>So the story here starts with me taking a class that required me to purchase one of these iClicker&#8217;s ( <a href="http://www.iclicker.com/Products/iclicker/">http://www.iclicker.com/Products/iclicker/</a> ), otherwise I wouldn&#8217;t get &#8220;participation&#8221; points in class :/ So I purchased one and booted it up during lecture to &#8220;participate&#8221;. It was neat to see some tech in the classroom, but the material wasn&#8217;t any more interesting, so I decided to tear this thing apart&#8230; I busted out my utilikey and tore it apart mid-lecture.</p>
<p><img class="alignnone" title="First Teardown" src="http://farm7.static.flickr.com/6106/6232045104_f2809a0e4b_z.jpg" alt="" width="478" height="640" /></p>
<p>At this point the professor noticed all the students were &#8220;participating&#8221; except me. She then walked up to my desk and noticed the iClicker completely torn apart and asked &#8220;What are you doing?&#8221; to which I responded &#8220;Opening this thing up..&#8221; and she responded with &#8221;This is not apart of the lecture, you shouldn&#8217;t be doing this in class. This is very important you should be paying attention.&#8221;  I figured it&#8217;s time to protect my grades so I said I would clean it up right away, and did so.. (unhappily)</p>
<p>I snapped a few shots of the tear down before doing so..</p>
<p><img class="alignnone" title="buttons" src="http://farm7.static.flickr.com/6240/6231514445_4eea3196b6_z.jpg" alt="" width="640" height="478" /></p>
<p>Here we see the Buttons &#8220;A&#8221;  &#8221;B&#8221;  &#8221;C&#8221;  &#8221;D&#8221;  &#8221;E&#8221;  and &#8220;ON/OFF&#8221;.</p>
<p><img class="alignnone" title="XE1203F" src="http://farm7.static.flickr.com/6212/6232034330_7ca725b2d9_z.jpg" alt="" width="478" height="640" /></p>
<p>Noticed the RF hardware consisted of an XE1203F ( <a href="http://www.semtech.com/images/datasheet/xe1203f.pdf">http://www.semtech.com/images/datasheet/xe1203f.pdf</a> ) which does ISM band (iClicker is configured for 900Mhz)</p>
<p><img class="alignnone" title="atmel" src="http://farm7.static.flickr.com/6158/6232034688_7e6e746db1_z.jpg" alt="" width="478" height="640" /></p>
<p>Discovered the microcontroller is an ATMega8A ( <a href="http://www.atmel.com/dyn/resources/prod_documents/doc8159.pdf">http://www.atmel.com/dyn/resources/prod_documents/doc8159.pdf</a> )  and best of all.. the ICSP pads are broken out for you already!! At this point I was hoping that the security bit wasn&#8217;t set so I could dump the firmware and EEPROM.</p>
<p><img class="alignnone" title="wpor" src="http://farm7.static.flickr.com/6233/6238061367_c1d72f3616_z.jpg" alt="" width="640" height="478" /></p>
<p><img class="alignnone" title="prog" src="http://farm7.static.flickr.com/6238/6238063401_3877468e10_z.jpg" alt="" width="640" height="478" /></p>
<p>&nbsp;</p>
<p>I later got to my setup at Nullspace Labs ( <a href="http://032.la/">http://032.la/</a> )  and soldered on a 6pin header for the ICSP line. Then connected my AVR Dragon and attempted to dump the firmware and EEPROM from the ATMega8A with an external power supply connected to the power leads for the battery. As soon as I attempted the read, the iClicker reset itself. So I figured the power management must be doing some funky things, so lets by pass all that and go directly to the ATMega8A&#8217;s VCC and GND line. I soldered on some kynar wire to pin 4 (vcc) and pin 5 (gnd) and attempted the read again..</p>
<p><img class="alignnone" title="success" src="http://farm7.static.flickr.com/6213/6268774188_a9d65b246c.jpg" alt="" width="473" height="500" /></p>
<p><img class="alignnone" title="fuse" src="http://farm7.static.flickr.com/6041/6268247965_7bf16c90aa.jpg" alt="" width="469" height="500" /></p>
<p>Success!! The security bit was never set! So now that I could communicate with the chip, I decided dumped the firmware and EEPROM. (Reversing in IDA to come in Part 2)</p>
<p>&nbsp;</p>
<p>At this point I realized the hardware ID must be in the EEPROM, so I went exploring looking for &#8220;3300B586&#8243; which is the hardware ID written on the back of the device:</p>
<p><img class="alignnone" title="agae" src="http://farm7.static.flickr.com/6155/6238581760_3f38f6b487_z.jpg" alt="" width="640" height="478" /></p>
<p><img class="alignnone" title="ff" src="http://farm7.static.flickr.com/6040/6268258829_abc604709f_z.jpg" alt="" width="640" height="252" /></p>
<p>I noticed at line 0 column A the sequence &#8220;3300B5&#8243;, huzah!  At this point I could just modify this and change the hardware ID of the iClicker!</p>
<p>&nbsp;</p>
<p><img class="alignnone" title="fss" src="http://farm7.static.flickr.com/6032/6268161495_fcd90eb6ed_z.jpg" alt="" width="640" height="478" /></p>
<p>Next I decided to listen to the communication between the ATMega8A and XE1203F by sniffing the SPI bus, following the datasheets I soldered up some wire to the SPI lines. Once the wiring was done I used my handy AnnaLogic to sniff the SPI bus.</p>
<p><img title="fdwwww" src="http://farm7.static.flickr.com/6225/6265085297_9781ee3bc8.jpg" alt="" width="500" height="374" /></p>
<p>AnnaLogic (16-channel logic analyzer) from Nullspace Labs (available for purchase here for $40:  <a href="http://www.nullspacelabs.com/catalog/products.php?5&amp;sid=mkkhjkoj10qo012972ufdfhka3">http://www.nullspacelabs.com/catalog/products.php?5&amp;sid=mkkhjkoj10qo012972ufdfhka3</a> ) Totally easy to use and it fits in an egg!!</p>
<p>&nbsp;</p>
<p>Once I powered up the iClicker (note: it&#8217;s not connected to an instructor machine) I began the sniffing and pressed the following sequence of buttons:  A  B  C  D  E . I noticed that there was only data on the Slave Input lines, which makes sense since there is no instructor machine to send data back. Between each button I pressed only one byte was changed, and it doesn&#8217;t seem to be as intuitive as &#8216;A&#8217;, &#8216;B&#8217;, &#8216;C&#8217;,'D&#8217;,'E&#8217;. Instead A = 177 (0xB1) , B = 181 (0xB5), C = 189 (0xBD), D = 190 (0xBE), E = 186 (0xBA).</p>
<p><img class="alignnone" title="sniff" src="http://farm7.static.flickr.com/6212/6268859244_8eb6f13777_b.jpg" alt="" width="1024" height="324" /></p>
<p>Next I need to capture some traffic between my iClicker and the instructor machine to see a full cycle of registering the iClicker to the instructor machine, voting and receiving confirmation that the vote went through.. I&#8217;ll leave that for Part 2.</p>
<p>Please note that I will NOT be doing this packet capture in the classroom (it&#8217;s no place for learning anyway), I&#8217;ve decided to purchase an instructor base station to prevent any issues with my school. Plus it gives me control to test and try out things I normally wouldn&#8217;t be able to do.</p>
<p>&nbsp;</p>
<p>For the mean time I need the clicker for lectures so I&#8217;ve poked a hole into it.. totally looks normal <img src='http://arkorobotics.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><img class="alignnone" title="ewewf" src="http://farm7.static.flickr.com/6100/6238581614_e9beaf038a_z.jpg" alt="" width="478" height="640" /></p>
<p>&nbsp;</p>
<p>Next up.. reverse engineering the firmware in IDA, stay tuned for Part 2:</p>
<p><img class="alignnone" title="ida" src="http://farm7.static.flickr.com/6160/6268799588_489c8380e6_b.jpg" alt="" width="1024" height="395" /></p>
<p>&nbsp;</p>
<p>So far the only defeat has been spoofing other iClicker hardware ID&#8217;s by reprogramming the EEPROM (thankfully iClicker never set any security bits <img src='http://arkorobotics.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  ) It&#8217;s not much yet, but next up is to reverse the firmware and figuring out how the packets are sent, handled and then to create a new firmware with some extra features. A few new features I&#8217;ve thought of are listening in to other iClickers, submitting and spoofing as other iClickers, and making a  general purpose ISM band radio.</p>
<p>&nbsp;</p>
<p>Interested in hardware hacking?   Layerone 2012 <a href="http://www.layerone.org/">http://www.layerone.org/</a>  <img src='http://arkorobotics.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://arkorobotics.com/blog/?feed=rss2&#038;p=17</wfw:commentRss>
		<slash:comments>21</slash:comments>
		</item>
		<item>
		<title>Juki 360 Renovation</title>
		<link>http://arkorobotics.com/blog/?p=15</link>
		<comments>http://arkorobotics.com/blog/?p=15#comments</comments>
		<pubDate>Sun, 18 Sep 2011 07:44:05 +0000</pubDate>
		<dc:creator>arko</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[360]]></category>
		<category><![CDATA[Arduino]]></category>
		<category><![CDATA[CAD]]></category>
		<category><![CDATA[charliex]]></category>
		<category><![CDATA[cp/m]]></category>
		<category><![CDATA[drafting]]></category>
		<category><![CDATA[juki]]></category>
		<category><![CDATA[l1]]></category>
		<category><![CDATA[labs]]></category>
		<category><![CDATA[layerone]]></category>
		<category><![CDATA[mmca]]></category>
		<category><![CDATA[nullspace]]></category>
		<category><![CDATA[solidworks]]></category>

		<guid isPermaLink="false">http://arkorobotics.com/blog/?p=15</guid>
		<description><![CDATA[So a few weeks ago Nullspace Labs got an old pick&#8217;n'place and decided it was time for a renovation with much newer technology. Charliex and mmca for the past few weeks have been working non-stop on rebuilding this thing. It went from a busted old computer running CP/M with &#8220;ok&#8221; precision to a higher precision, [...]]]></description>
			<content:encoded><![CDATA[<p>So a few weeks ago Nullspace Labs got an old pick&#8217;n'place and decided it was time for a renovation with much newer technology. Charliex and mmca for the past few weeks have been working non-stop on rebuilding this thing. It went from a busted old computer running CP/M with &#8220;ok&#8221; precision to a higher precision, computer control/vision machine which controls the pnp with an Arduino! Charliex&#8217;s blog explains the process it has gone through is great detail (it is a must read): <a href="http://charliex2.wordpress.com/tag/juki/">http://charliex2.wordpress.com/tag/juki/</a></p>
<p>I have been fortunate to have had a small role in this project by drafting up/CADing some of the new parts designed by mmca for the machine!  Here are a few pictures from the Solidworks files for what is to come!</p>
<p>&nbsp;</p>
<p>Here is a plate with an adjustable height where components are placed for the pnp to pick them up!</p>
<p><img class="alignnone" title="Adjustable Plate" src="http://farm7.static.flickr.com/6070/6153018865_4f267a5a3f_z.jpg" alt="" width="640" height="456" /></p>
<p>&nbsp;</p>
<p><img class="alignnone" title="seethrough" src="http://farm7.static.flickr.com/6184/6153563616_0444ec8dd1_z.jpg" alt="" width="640" height="390" /></p>
<p>&nbsp;</p>
<p>Here is the new head plate adding the capability of 360 component rotation, camera mount, and a pneumatic solder paste applier!</p>
<p><img class="alignnone" title="pnp" src="http://farm7.static.flickr.com/6203/6153563562_640dda0ddc_z.jpg" alt="" width="622" height="640" /></p>
<p>&nbsp;</p>
<p>Also, go to Layerone 2012: <a href="http://layerone.org">layerone.org </a></p>
]]></content:encoded>
			<wfw:commentRss>http://arkorobotics.com/blog/?feed=rss2&#038;p=15</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>H3LL0 Verld!</title>
		<link>http://arkorobotics.com/blog/?p=1</link>
		<comments>http://arkorobotics.com/blog/?p=1#comments</comments>
		<pubDate>Sat, 17 Sep 2011 20:06:33 +0000</pubDate>
		<dc:creator>arko</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://arkorobotics.com/blog/?p=1</guid>
		<description><![CDATA[I guess it&#8217;s time to start blogging about the things I do!]]></description>
			<content:encoded><![CDATA[<p>I guess it&#8217;s time to start blogging about the things I do!</p>
]]></content:encoded>
			<wfw:commentRss>http://arkorobotics.com/blog/?feed=rss2&#038;p=1</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
