<?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>JeeLabs &#187; Search Results  &#187;  nunchuk</title>
	<atom:link href="http://jeelabs.org/search/nunchuk/feed/rss2/" rel="self" type="application/rss+xml" />
	<link>http://jeelabs.org</link>
	<description>Computing stuff tied to the physical world</description>
	<lastBuildDate>Wed, 01 Feb 2012 23:01:18 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Horizontal JeeBot</title>
		<link>http://jeelabs.org/2009/06/01/horizontal-jeebot/</link>
		<comments>http://jeelabs.org/2009/06/01/horizontal-jeebot/#comments</comments>
		<pubDate>Sun, 31 May 2009 22:01:20 +0000</pubDate>
		<dc:creator>jcw</dc:creator>
				<category><![CDATA[AVR]]></category>
		<category><![CDATA[Hardware]]></category>
		<category><![CDATA[JeeBot]]></category>

		<guid isPermaLink="false">http://jeelab.wordpress.com/?p=1865</guid>
		<description><![CDATA[The JeeBot has made its first explorations, using a Nunchuk controller: It drives on two wheels plus a coaster ball to support the batteries &#8211; although not very fast and veering slightly to the right. It will also turn, by rotating the servos in opposite directions. The batteries push down hard on the coaster ball, [...]]]></description>
			<content:encoded><![CDATA[<p>The JeeBot has made its first explorations, using a Nunchuk controller:</p>

<p><span class="removed_link" title="http://www.flickr.com/photos/32880127@N07/3577879499"><img src="http://jeelabs.org/wp-content/uploads/flickr/2437/3577879499_b2317afce6_o.jpg" alt="JeeBot baby steps" border="0" width="604" height="396" /></span></p>

<p>It drives on two wheels plus a coaster ball to support the batteries &#8211; although not very fast and veering slightly to the right. It will also turn, by rotating the servos in opposite directions. The batteries push down hard on the coaster ball, making the wheels slip when turning if the surface is not hard enough. The control mechanism is somewhat proportional, although it seems to work best by just pushing the joystick to its limits.</p>

<p>Here&#8217;s the current primitive control loop:</p>

<p><img src="http://jeelabs.org/wp-content/uploads/2009/05/picture-112.png" alt="Picture 1.png" border="0" width="378" height="183" /></p>

<p>Some more close-ups:</p>

<p><span class="removed_link" title="http://www.flickr.com/photos/32880127@N07/3577879567"><img src="http://jeelabs.org/wp-content/uploads/flickr/3099/3577879567_024f5fbe5f_o.jpg" alt="JeeBot baby steps" border="0" width="604" height="300" /></span></p>

<p>From left to right: the Wii adapter, batteries with coaster ball underneath, on-off switch, JeeNode, and the edge of the servos.</p>

<p>Not much wiring needed to get it going:</p>

<p><span class="removed_link" title="http://www.flickr.com/photos/32880127@N07/3578683702"><img src="http://jeelabs.org/wp-content/uploads/flickr/3335/3578683702_d15cbc4db5_o.jpg" alt="JeeBot baby steps" border="0" width="604" height="245" /></span></p>

<p>The two resistors divide the battery voltage in half, so it can be measured by an ADC pin. Note the use of wire to &#8220;bundle up&#8221; the Nunchuk I2C &#8220;bus&#8221;.</p>

<p>Port layout so far: 1 = unused, 2 = left servo + battery level, 3 = right servo, 4 = Nunchuk via I2C.</p>

<p>I&#8217;ve also mounted the gyroscope (not connected yet) in the proper orientation to sense rotations around the wheel axis:</p>

<p><span class="removed_link" title="http://www.flickr.com/photos/32880127@N07/3577879725"><img src="http://jeelabs.org/wp-content/uploads/flickr/3224/3577879725_777d7e176d_o.jpg" alt="JeeBot baby steps" border="0" width="604" height="428" /></span></p>

<p>Will need to add an accelerometer as well, no doubt.</p>

<p>The center of gravity is just about on the power-switch, between the battery pack and the JeeNode. Which is quite low when this thing is placed upright, not sure the servos + control loop will respond fast / accurately enough for balancing.</p>

<p>Current consumption is around 30 mA when idle, 160 mA with wheels turning freely, and up to some 300 mA under load &#8211; these 4 NiMH batteries give about 5.2V under no load when full, but I&#8217;ve seen it drop to 3.7 V under load after a bit of use &#8211; <em>not so good&#8230;</em></p>
]]></content:encoded>
			<wfw:commentRss>http://jeelabs.org/2009/06/01/horizontal-jeebot/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Servo fun</title>
		<link>http://jeelabs.org/2009/05/24/servo-fun/</link>
		<comments>http://jeelabs.org/2009/05/24/servo-fun/#comments</comments>
		<pubDate>Sat, 23 May 2009 22:01:10 +0000</pubDate>
		<dc:creator>jcw</dc:creator>
				<category><![CDATA[AVR]]></category>
		<category><![CDATA[Hardware]]></category>
		<category><![CDATA[JeeBot]]></category>
		<category><![CDATA[JeeNode]]></category>
		<category><![CDATA[Sensors]]></category>

		<guid isPermaLink="false">http://jeelab.wordpress.com/?p=1813</guid>
		<description><![CDATA[Here&#8217;s some fun with a servo: A slider drives the two servos in opposite directions, so you can make this thing turn on the spot. Here&#8217;s the sketch: Had to use SoftwareServo instead of the Servo library which comes with Arduino IDE 0015 &#8211; which didn&#8217;t work for me. Turns out that only pulses from [...]]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s some fun with a servo:</p>

<p><span class="removed_link" title="http://www.flickr.com/photos/32880127@N07/3555798507"><img src="http://jeelabs.org/wp-content/uploads/flickr/3559/3555798507_c1bf0ddab0_o.jpg" border="0" alt="Servo fun" width="604" height="422" /></span></p>

<p>A slider drives the two servos in opposite directions, so you can make this thing turn on the spot.</p>

<p>Here&#8217;s the sketch:</p>

<p><img src="http://jeelabs.org/wp-content/uploads/2009/05/picture-19.png" border="0" alt="Picture 1.png" width="375" height="387" /></p>

<p>Had to use <a href="http://www.avride.com/pop/?p=57">SoftwareServo</a> instead of the Servo library which comes with Arduino IDE 0015 &#8211; which didn&#8217;t work for me.</p>

<p>Turns out that only pulses from 1.4 to 1.6 msec actually have any effect on the speed of the servos, the rest of the 1.0 .. 2.0 msec range just makes them run at full speed. These ara Parallax (Futaba) Continuous Rotation Servos.</p>

<p>Note that the servos are driven from the PWR line, i.e. the full 5V &#8211; but the servo pulses are 3.3V, like the rest of the JeeNode.</p>

<p>It&#8217;d be nice to use a Wii <a href="http://jeelabs.org/?s=nunchuk">Nunchuk</a> controller as input. Even more fun would be an accelerometer / gyro combo to turn this thing into a self-balancing bot &#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://jeelabs.org/2009/05/24/servo-fun/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>All together now</title>
		<link>http://jeelabs.org/2009/02/22/all-together-now/</link>
		<comments>http://jeelabs.org/2009/02/22/all-together-now/#comments</comments>
		<pubDate>Sat, 21 Feb 2009 23:01:32 +0000</pubDate>
		<dc:creator>jcw</dc:creator>
				<category><![CDATA[AVR]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[JeeNode]]></category>
		<category><![CDATA[Sensors]]></category>

		<guid isPermaLink="false">http://jeelab.wordpress.com/?p=746</guid>
		<description><![CDATA[It&#8217;s time to combine everything: This is a setup with all the sensor interfaces documented in recent posts: a SHT11 to measure relative humidity (and temperature) a BMP085 sensor to measure barometric pressure (and temperature) PIR + LDR sensors to demonstrate reading digital and analog signals a Nunchuk with 2-axis joystick, 3-axis accelerometer, and 2 [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s time to combine everything:</p>

<p><span class="removed_link" title="http://www.flickr.com/photos/32880127@N07/3297530486"><img src="http://jeelabs.org/wp-content/uploads/flickr/3342/3297530486_e00e82a69b_o.jpg" border="0" alt="Combi demo" width="604" height="439" /></span></p>

<p>This is a setup with all the sensor interfaces documented in recent posts:</p>

<ol>
    <li>a SHT11 to measure relative humidity (and temperature)</li>
    <li>a BMP085 sensor to measure barometric pressure (and temperature)</li>
    <li>PIR + LDR sensors to demonstrate reading digital and analog signals</li>
    <li>a Nunchuk with 2-axis joystick, 3-axis accelerometer, and 2 buttons</li>
</ol>

<p>A new &#8220;combi_demo&#8221; has been added to the Ports library. The code is essentially the concatenation of the individual demo source files (you can browse the real thing <a href="http://jeelabs.net/projects/cafe/repository/entry/Ports/examples/combi_demo/">here</a>):</p>

<p><span class="removed_link" title="http://www.flickr.com/photos/32880127@N07/3297530450"><img src="http://jeelabs.org/wp-content/uploads/flickr/3639/3297530450_97964038b2_o.png" border="0" alt="Combi demo" width="485" height="553" /></span></p>

<p>This example illustrates how the Ports library lets you mix and match drivers and ports at will. Note that two I2C interfaces are running in parallel at different speeds (<em>sure</em>, the BMP085 and the Nunchuk <em>could</em> also have been tied to a single port, running at 100 KHz).</p>

<p>Sample output;</p>

<p><span class="removed_link" title="http://www.flickr.com/photos/32880127@N07/3296705659"><img src="http://jeelabs.org/wp-content/uploads/flickr/3642/3296705659_7045ecf45c_o.png" border="0" alt="Combi demo" width="211" height="200" /></span></p>

<p>This example compiles to 9114 bytes of code with the Arduino 13 IDE, so there is still plenty of room left to add, say, a wireless driver.</p>
]]></content:encoded>
			<wfw:commentRss>http://jeelabs.org/2009/02/22/all-together-now/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Hooking up a Nunchuk</title>
		<link>http://jeelabs.org/2009/02/21/hooking-up-a-nunchuk/</link>
		<comments>http://jeelabs.org/2009/02/21/hooking-up-a-nunchuk/#comments</comments>
		<pubDate>Fri, 20 Feb 2009 23:01:16 +0000</pubDate>
		<dc:creator>jcw</dc:creator>
				<category><![CDATA[AVR]]></category>
		<category><![CDATA[JeeNode]]></category>
		<category><![CDATA[Sensors]]></category>

		<guid isPermaLink="false">http://jeelab.wordpress.com/?p=744</guid>
		<description><![CDATA[The Nintendo &#8220;Nunchuk&#8221; controller is for the Wii game console, but it&#8217;s also a great I2C input device. So for fun and as a game&#8230; I hooked one up to port 4 of a JeeNode: Although the &#8220;Wiichuck&#8221; adapter lets you connect an unmodified Nunchuk, I just ripped the whole thing apart, and cut off [...]]]></description>
			<content:encoded><![CDATA[<p>The Nintendo &#8220;Nunchuk&#8221; controller is for the Wii game console, but it&#8217;s also a great I<sup>2</sup>C input device. So for fun and as a game&#8230; I hooked one up to port 4 of a JeeNode:</p>

<p><span class="removed_link" title="http://www.flickr.com/photos/32880127@N07/3296748861"><img src="http://jeelabs.org/wp-content/uploads/flickr/3654/3296748861_0cf4ee68ae_o.jpg" border="0" alt="Hooking up a Nunchuk" width="604" height="370" /></span></p>

<p>Although the &#8220;Wiichuck&#8221; adapter lets you connect an unmodified Nunchuk, I just ripped the whole thing apart, and cut off the proprietary connector. There are four wires, tied to pins 2..5 of port 4, respectively: green (SDA), white (GND), yellow (SCL), and red (+3.3V). The following &#8220;nunchuk_demo&#8221; has been added to the Ports library:</p>

<p><span class="removed_link" title="http://www.flickr.com/photos/32880127@N07/3296749865"><img src="http://jeelabs.org/wp-content/uploads/flickr/3390/3296749865_2d50cfeb4b_o.png" border="0" alt="Hooking up a Nunchuk" width="423" height="663" /></span></p>

<p>Sample output:</p>

<p><span class="removed_link" title="http://www.flickr.com/photos/32880127@N07/3297574608"><img src="http://jeelabs.org/wp-content/uploads/flickr/3382/3297574608_2a29036143_o.png" border="0" alt="Hooking up a Nunchuk" width="181" height="106" /></span></p>

<p>PS. I2C on port 4 = (on Arduino) SDA: D7, SCL: A3 (see <a href="http://jeelabs.net/projects/hardware/wiki/jn2">JeeNode-v2.pdf</a> page 3).</p>

<p><strong>Update</strong> &#8211; swap the red and yellow wires for the JeeNode v3 and v4 (the above is an older unit).</p>
]]></content:encoded>
			<wfw:commentRss>http://jeelabs.org/2009/02/21/hooking-up-a-nunchuk/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Nunchuk</title>
		<link>http://jeelabs.org/2008/11/09/nunchuk/</link>
		<comments>http://jeelabs.org/2008/11/09/nunchuk/#comments</comments>
		<pubDate>Sat, 08 Nov 2008 23:45:37 +0000</pubDate>
		<dc:creator>jcw</dc:creator>
				<category><![CDATA[AVR]]></category>
		<category><![CDATA[Sensors]]></category>

		<guid isPermaLink="false">http://jeelab.wordpress.com/?p=27</guid>
		<description><![CDATA[The Wii Nunchuk controller is really just an I2C device, with a triple-axis accelerometer, an X-Y proportional joystick, and two push buttons. Breaking it out of its case allows us to connect it in ways it was never meant for: It’s very easy to hook up to an Arduino and there’s a good example on [...]]]></description>
			<content:encoded><![CDATA[<p>The Wii Nunchuk controller is really just an I2C device, with a triple-axis accelerometer, an X-Y proportional joystick, and two push buttons. Breaking it out of its case allows us to connect it in ways it was never meant for:</p>

<p><img src="http://jeelabs.org/wp-content/uploads/2009/01/ec19cafa-dd22-4b24-8a54-dd7b726365d1.jpg" border="0" alt="EC19CAFA-DD22-4B24-8A54-DD7B726365D1.jpg" width="425" height="497" /></p>

<p>It’s very easy to hook up to an Arduino and there’s a good example on the web to read out all the sensors. I’ve tweaked it a bit to use pins 8 and 9 as the I2C/TWI interface.</p>

<p>Connections above are as follows: red = +3.3..5V, white = ground, green = SDA, yellow = SCL.</p>
]]></content:encoded>
			<wfw:commentRss>http://jeelabs.org/2008/11/09/nunchuk/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic page generated in 0.364 seconds. -->
<!-- Cached page generated by WP-Super-Cache on 2012-02-09 21:53:58 -->
<!-- Compression = gzip -->
