<?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>Bret Kuhns &#187; arduino</title>
	<atom:link href="http://www.bretkuhns.com/blog/tag/arduino/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.bretkuhns.com/blog</link>
	<description>Programming, Cars, and Life</description>
	<lastBuildDate>Sun, 19 Dec 2010 19:05:04 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Flashing OpenLog Firmware in Ubuntu Linux</title>
		<link>http://www.bretkuhns.com/blog/2010/03/flashing-openlog-firmware-in-ubuntu-linux/</link>
		<comments>http://www.bretkuhns.com/blog/2010/03/flashing-openlog-firmware-in-ubuntu-linux/#comments</comments>
		<pubDate>Wed, 24 Mar 2010 18:36:37 +0000</pubDate>
		<dc:creator>Bret Kuhns</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[arduino]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[OpenLog]]></category>
		<category><![CDATA[sparkfun]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://www.bretkuhns.com/blog/?p=85</guid>
		<description><![CDATA[I recently hit a bug in the Sparkfun OpenLog v1.1 firmware that left the device useless. I found out the hard way that version 1.1 only supports up to 255 log files. Once it hits this limit the firmware doesn&#8217;t know what to do with itself and loops endlessly. This even prevents you from entering command [...]]]></description>
			<content:encoded><![CDATA[<p>I recently hit a bug in the Sparkfun <a href="http://www.sparkfun.com/commerce/product_info.php?products_id=9530">OpenLog </a>v1.1 firmware that left the device useless. I found out the hard way that version 1.1 only supports up to 255 log files. Once it hits this limit the firmware doesn&#8217;t know what to do with itself and loops endlessly. This even prevents you from entering command mode where you could otherwise reset the log number. <a href="http://github.com/nseidle">Nate Seidle</a> at SparkFun quickly released an update, v1.2, to correct this problem I was having. But now I had to figure out how to flash the firmware on my OpenLog. It turns out the process is extremely easy in Ubuntu, but the GitHub documentation targets mostly Windows, so I decided to document the process for Ubuntu users from start to finish here.<span id="more-85"></span></p>
<p>I expect that you have the Arduino IDE <a href="http://www.arduino.cc/playground/Learning/Linux">installed and running properly</a>. This means the avrdude and avr-gcc libraries necessary to flash OpenLog will already be installed. Next step is to pull the firmware source code from the <a href="http://github.com/nseidle/OpenLog">GitHub repository</a>. If you don&#8217;t have git installed, run the following command:</p>
<pre class="brush: plain; gutter: false;">$ sudo apt-get install git-core</pre>
<p>Now you can run the git command to pull the source code over the read-only HTTP path. This is generally the easiest path to use to avoid issues with proxies or closed/blocked ports on your network.</p>
<pre class="brush: plain; gutter: false;">$ git clone http://github.com/nseidle/OpenLog.git</pre>
<p>Once the command has completed, you&#8217;ll have an OpenLog directory in your currently active directory. Time to compile the source code to make the required hex file that we&#8217;ll write to OpenLog.</p>
<pre class="brush: plain; gutter: false;">$ cd OpenLog/Code/</pre>
<pre class="brush: plain; gutter: false;">$ make</pre>
<p style="text-align: left;">You should see several notices about compiling various .c files, linking main.elf, and most importantly loading main.hex. Now we need to get that hex file onto OpenLog. Grab your trusty <a href="http://www.sparkfun.com/commerce/product_info.php?products_id=8772">FTDI breakout board</a> (you should never leave home without it) and wire it to OpenLog as shown below.</p>
<p style="text-align: left; padding-top: 0;"><a href="http://www.bretkuhns.com/blog/wp-content/uploads/2010/03/FTDI-Connections.jpg"><img class="aligncenter size-medium wp-image-86" title="FTDI to OpenLog connection diagram." src="http://www.bretkuhns.com/blog/wp-content/uploads/2010/03/FTDI-Connections-300x96.jpg" alt="" width="300" height="96" /></a></p>
<p style="text-align: left; padding-top: 0;">Before connecting the FTDI to your computer, we want to make sure we have the correct device path for the next step. Look at the list of all tty-capable USB devices. It&#8217;s okay if none show up right now.</p>
<p style="text-align: left; padding-top: 0;">
<pre class="brush: plain; gutter: false;">$ ls /dev/ttyUSB*</pre>
<p style="text-align: left; padding-top: 0;">Now connect the FTDI board and run the command again. The new ttyUSB# device listed is your FTDI board. I&#8217;ll use ttyUSB0 in the command below, so you will need to change the zero if your # is different.</p>
<p style="text-align: left; padding-top: 0;">I hope you have an extra wire at hand. The Linux build of avrdude unfortunately doesn&#8217;t have the &#8220;DTR wiggle&#8221; necessary to automatically reset OpenLog&#8217;s ATMega328p, so we have to do it ourselves. Grab a wire and connect one end to ground. If necessary, the microSD socket&#8217;s case can be used as a ground if you don&#8217;t have OpenLog on a breadboard. You&#8217;ll need to tap the other end of the wire onto the GPIO pin 6 on OpenLog. This is the square pin pad near the &#8220;O&#8221; in &#8220;OpenLog&#8221; on the silkscreen (the bottom-left most pin in the image featured above). Timing here is of the essence; run the command below, hit enter on your keyboard, then immediately tap the other end of your grounded wire to pin 6. Don&#8217;t leave the wire sitting on pin 6, it&#8217;s just a quick tap to momentarily ground it and force a reset.</p>
<p style="text-align: left; padding-top: 0;">
<div id="_mcePaste">
<pre class="brush: plain; gutter: false;">$ avrdude -p atmega328p -P /dev/ttyUSB0 -c stk500v1 -b 57600 -U flash:w:main.hex</pre>
</div>
<p>Don&#8217;t forget to change the ttyUSB# number if necessary. If your timing was good enough, you should see avrdude show a progress bar as it flashes the hex firmware onto OpenLog. If not, you&#8217;ll likely see errors like &#8220;programmer not responding&#8221; or &#8220;out of sync&#8221;. Try try again. Tapping enter and grounding pin 6 should be almost instantaneous, with the enter key coming ever so slightly first.</p>
<p>After a few seconds, the updated firmware will now be on your OpenLog chip and you&#8217;ll be on your merry way. I hope this helps someone out there.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bretkuhns.com/blog/2010/03/flashing-openlog-firmware-in-ubuntu-linux/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>8-bits of Processing Goodness</title>
		<link>http://www.bretkuhns.com/blog/2010/01/8-bits-of-processing-goodness/</link>
		<comments>http://www.bretkuhns.com/blog/2010/01/8-bits-of-processing-goodness/#comments</comments>
		<pubDate>Thu, 14 Jan 2010 18:49:43 +0000</pubDate>
		<dc:creator>Bret Kuhns</dc:creator>
				<category><![CDATA[Cars]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[arduino]]></category>
		<category><![CDATA[electronics]]></category>
		<category><![CDATA[School]]></category>
		<category><![CDATA[senior design]]></category>

		<guid isPermaLink="false">http://www.bretkuhns.com/blog/?p=30</guid>
		<description><![CDATA[The last semester of my undergrad program in CSE is finally here! This semester I have a Senior Design course where students form their own groups and come up with an idea related to the curriculum and implement it. Now if only I had an idea of what to design&#8230;
I&#8217;ve been participating in autocross events [...]]]></description>
			<content:encoded><![CDATA[<p>The last semester of my undergrad program in <a href="http://www.eng.utoledo.edu/eecs/">CSE </a>is finally here! This semester I have a Senior Design course where students form their own groups and come up with an idea related to the curriculum and implement it. Now if only I had an idea of what to design&#8230;</p>
<p>I&#8217;ve been participating in <a href="http://en.wikipedia.org/wiki/Autocross">autocross </a>events for years and have always wished I could afford a data acquisition system like those you see used in Formula 1, Indy, Le Mans, and/or NASCAR. With a <a href="http://en.wikipedia.org/wiki/Data_acquisition">DAQ</a>, I&#8217;d be able to see exactly what my car is doing at an event and use that information to help me drive the course faster on my next run. Hopefully.</p>
<p>That got me thinking. Surely I&#8217;m not the only amateur autocrosser wishing for an affordable data acquisition system made for the weekend warrior. In fact, LOTS of people across the nation, and across the globe would probably love such a system. I didn&#8217;t know of any that existed on a college student budget, so I figured why not make one? It just so happens this senior design semester is the perfect time to get started. But where to begin?<span id="more-30"></span></p>
<p>I began looking at professional systems to see what they were doing so I could get an idea where to start. After looking at a few of the products out there, most of them seemed to be doing some sort of GPS tracking as well as logging all the sensor data the user needs (or can afford). I started looking into using a USB GPS plugged into a laptop and use software to track and log the position data so the user could review it later. In the midst of looking for a GPS, I discovered most of the professional units were boasting GPS units with 5-20Hz refresh rates, but the units I found were all 1Hz. Hmm, I know I want to go cheap, but it also needs to do it&#8217;s job well. I had to find something better. I eventually stumbled upon a <a href="http://www.sparkfun.com/commerce/product_info.php?products_id=9060">10Hz GPS chip</a> that sounded like it would do the trick, but how in the world was I going to get data off a lone circuit chip? I also want to use an accelerometer to measure precise movements of the car, but USB versions were expensive. Chip-only models were vastly cheaper, but how do I connect one to a computer? Time for some more research.</p>
<p>That&#8217;s when I met the <a href="http://www.arduino.cc/">Arduino</a>.</p>
<div id="attachment_78" class="wp-caption aligncenter" style="width: 310px"><a rel="lightbox" href="http://www.bretkuhns.com/blog/wp-content/uploads/2010/01/arduino.jpg"><img class="size-medium wp-image-78 " title="Arduino Duemilanove" src="http://www.bretkuhns.com/blog/wp-content/uploads/2010/01/arduino-300x225.jpg" alt="Arduino Duemilanove" width="300" height="225" /></a><p class="wp-caption-text">So many possibilities in such a tiny package.</p></div>
<p>I think the Nintendo was the last time I used an 8-bit processor, but I have a feeling I&#8217;m going to have so much more fun with this thing! Could your Nintendo convert an analog voltage into a 10-bit digital value? I didn&#8217;t think so.</p>
<p>The <a href="http://www.arduino.cc/en/Main/ArduinoBoardDuemilanove">Arduino Duemilanove</a> is the latest board to come from the open hardware Arduino project. The beauty of Arduino is it&#8217;s openess and ease of use. The design schematics are openly available; ready for people to adapt and improve, or to integrate directly into their own projects. The microcontrollers used also come pre-programmed with the Arduino <a href="http://arduino.cc/en/Hacking/Bootloader?from=Main.Bootloader">bootloader</a> which makes it a piece of cake to write some code, plug the board in via USB, click a button to upload the code and make it run. The Arduino drastically lowers the learning curve necessary to start using a microcontroller.</p>
<p>With my Arduino, the possibilities are endless. This little board has opened the door wide open to this project and should be able to handle everything a motorsport data acquisition system should need. Now it&#8217;s time to fire this thing up and see what it can do! Stay tuned.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bretkuhns.com/blog/2010/01/8-bits-of-processing-goodness/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
	</channel>
</rss>

