<?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>Giddy Planet &#187; Uncategorized</title>
	<atom:link href="http://www.giddyplanet.com/category/uncategorized/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.giddyplanet.com</link>
	<description>by Rene Hangstrup Møller</description>
	<lastBuildDate>Sat, 21 Aug 2010 15:31:52 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Motor Control Experiment</title>
		<link>http://www.giddyplanet.com/2010/08/motor-control-experiment/</link>
		<comments>http://www.giddyplanet.com/2010/08/motor-control-experiment/#comments</comments>
		<pubDate>Sat, 21 Aug 2010 15:10:33 +0000</pubDate>
		<dc:creator>Rene Hangstrup Møller</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[arduino]]></category>
		<category><![CDATA[electronics]]></category>
		<category><![CDATA[l293]]></category>

		<guid isPermaLink="false">http://www.giddyplanet.com/?p=45</guid>
		<description><![CDATA[Spent the afternoon experimenting with controlling DC-motors using an Arduino and a L293DNE motor driver chip. The chip contains two H-bridges, but I have only hooked one motor to it. From the Arduino I use two digital pins to control the direction of the motor and one PWM pin to control the speed. The next [...]]]></description>
			<content:encoded><![CDATA[<p>Spent the afternoon experimenting with controlling DC-motors using an Arduino and a L293DNE motor driver chip. The chip contains two H-bridges, but I have only hooked one motor to it. From the Arduino I use two digital pins to control the direction of the motor and one PWM pin to control the speed.</p>
<p>The next step is to replace the electronics in this RC-car with the Arduino and turn it into a small robot. Inside the RC-car, it has two wires for powering the engine, two wires for turning the front wheels and wires for power and ground. It should be straight forward to hook the control wires to the L293DNE. I would prefer to do it in a way where I can easily switch between the arduino control module and the original RC control module.</p>
<div id="attachment_44" class="wp-caption alignnone" style="width: 160px"><a href="http://www.giddyplanet.com/wp-content/2010/07/motorcontrol.jpg"><img class="size-thumbnail wp-image-44" title="Arduino and L293DNE motor control" src="http://www.giddyplanet.com/wp-content/2010/07/motorcontrol-150x150.jpg" alt="Arduino and L293DNE motor control" width="150" height="150" /></a><p class="wp-caption-text">Arduino and L293DNE motor control</p></div>
]]></content:encoded>
			<wfw:commentRss>http://www.giddyplanet.com/2010/08/motor-control-experiment/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fra LED til Simon</title>
		<link>http://www.giddyplanet.com/2010/07/fra-led-til-simon/</link>
		<comments>http://www.giddyplanet.com/2010/07/fra-led-til-simon/#comments</comments>
		<pubDate>Wed, 07 Jul 2010 15:53:07 +0000</pubDate>
		<dc:creator>Rene Hangstrup Møller</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[arduino]]></category>
		<category><![CDATA[hackaarhus]]></category>
		<category><![CDATA[osaa]]></category>

		<guid isPermaLink="false">http://www.giddyplanet.com/?p=33</guid>
		<description><![CDATA[Here is the slides, a video and the source code from a 15 minute speed-talk I did for the Tech Talk Tuesday at OSAA yesterday. It shows the highlights of how to build a clone of the classic Simon game, using an Arduino and some buttons and LEDs. In Danish only! Slides Fra LED til [...]]]></description>
			<content:encoded><![CDATA[<div id="__ss_4701960" style="width: 425px;">Here is the slides, a video and the source code from a 15 minute speed-talk I did for the Tech Talk Tuesday at OSAA yesterday.</div>
<div style="width: 425px;">It shows the highlights of how to build a clone of the classic Simon game, using an Arduino and some buttons and LEDs. In Danish only!</div>
<h2 style="width: 425px;">Slides</h2>
<div style="width: 425px;"><strong style="display: block; margin: 12px 0 4px;"><a title="Fra LED til Simon" href="http://www.slideshare.net/giddy/osaa-simon">Fra LED til Simon</a></strong><object id="__sse4701960" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="425" height="355" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowScriptAccess" value="always" /><param name="src" value="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=osaa-simon-100707103654-phpapp01&amp;stripped_title=osaa-simon" /><param name="name" value="__sse4701960" /><param name="allowfullscreen" value="true" /><embed id="__sse4701960" type="application/x-shockwave-flash" width="425" height="355" src="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=osaa-simon-100707103654-phpapp01&amp;stripped_title=osaa-simon" name="__sse4701960" allowscriptaccess="always" allowfullscreen="true"></embed></object></div>
<div id="__ss_4701960" style="width: 425px;">
<div style="padding: 5px 0 12px;">View more <a href="http://www.slideshare.net/">presentations</a> from <a href="http://www.slideshare.net/giddy">giddy</a>.</div>
<h2 style="padding: 5px 0 12px;">The Video Demonstration</h2>
</div>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="480" height="385" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://www.youtube.com/v/hMDYLVI37HQ&amp;hl=en_US&amp;fs=1" /><param name="allowfullscreen" value="true" /><embed type="application/x-shockwave-flash" width="480" height="385" src="http://www.youtube.com/v/hMDYLVI37HQ&amp;hl=en_US&amp;fs=1" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<h2>Source Code</h2>
<pre class="brush: c">
/*
* Arduino Clone of the classic Simon Game
*
* Made at Hack Aarhus / OSAA
* http://www.hackaarhus.dk
* http://www.osaa.dk
*
* Released into the public domain by
* Rene Hangstrup Moeller, July 2010
*
* http://www.giddyplanet.com
*/

//---------------------------------------------------------
//	GLOBALS weeeee!
//=========================================================

// the number of leds/switches
int SIZE = 4;

// milliseconds delay between each element in the sequence
int PLAY_DELAY = 250;

// the sequence
int sequence[128];

// current sequence length
int seqlen = 0;

// Sound frequencies for each led-switch pair
int notes[] = {
261/2, 392/2, 587/2, 880/2
};

//---------------------------------------------------------
//	PIN MAPPINGS
//=========================================================

// the buzzer control pin
int buzzPin = 11;

// calculate pin for led
int ledPin(int num) {
return (num + 1) * 2;
}

// calculate pin for button
int buttonPin(int num) {
return ledPin(num) + 1;
}

//---------------------------------------------------------
//	HELPER FUNCTIONS
//=========================================================

// mute the buzzer and turn off all leds
void turnOff() {
noTone(buzzPin);
for (int n = 0; n &lt; SIZE; n++) {
digitalWrite(ledPin(n), LOW);
}
}

// new game
void newGame() {
// generate random sequence with two entries
sequence[0] = random(SIZE);
sequence[1] = random(SIZE);
seqlen = 2;

// blink leds 10 times to indicate game start
for (int i = 0; i &lt; 10; i++) {
for (int n = 0; n &lt; SIZE; n++) {
digitalWrite(ledPin(n), HIGH);
}
delay(200);

turnOff();
delay(200);
}
}

// add an entry to the sequence
void expand() {
sequence[seqlen++] = random(SIZE);
}

// play the sequence
void playSequence() {
Serial.println(&quot;Playing sequence&quot;);

for (int i = 0; i &lt; seqlen; i++) {
int v = sequence[i];
tone(buzzPin, notes[v]);

for (int n = 0; n &lt; SIZE; n++) {
digitalWrite(ledPin(n), n == v ? HIGH : LOW);
}

delay(PLAY_DELAY);
noTone(buzzPin);

for (int n = 0; n &lt; SIZE; n++) {
digitalWrite(ledPin(n), LOW);
}

delay(PLAY_DELAY);
}
turnOff();
}

// wait for button press
int nextButton() {
Serial.println(&quot;Waiting for button...&quot;);

while (true) {

for (int n = 0; n &lt; SIZE; n++) {
if (digitalRead(buttonPin(n)) == HIGH) {
tone(buzzPin, notes[n]);
digitalWrite(ledPin(n), HIGH);
while (digitalRead(buttonPin(n)) == HIGH) {
delay(200);
}

turnOff();
return n;
}
}
delay(200);
}

return 0; // never
}

// read sequence from player
int readSequence() {
for (int i = 0; i &lt; seqlen; i++) {
int nb = nextButton();

if (nb != sequence[i]) {
Serial.println(&quot;Error&quot;);
return false;
}
}

Serial.println(&quot;Accepted&quot;);
return true;
}

//---------------------------------------------------------
//	ARDUINO ENTRY POINTS
//=========================================================

// initialize the Arduino
void setup() {
// initialize random number sequence
randomSeed(micros() + analogRead(0));

// configure pins for LEDs and buttons
for (int i = 0; i &lt; SIZE; i++) {
pinMode(ledPin(i), OUTPUT);
pinMode(buttonPin(i), INPUT);
}

// configure pin for sound
pinMode(buzzPin, OUTPUT);

// initialize serial communication for debugging
Serial.begin(9600);
Serial.println(&quot;Setup completed. Welcome to Simon&quot;);
}

// The game loop - each run corresponds to a game
void loop() {
Serial.println(&quot;Starting new game&quot;);
newGame();

int running = true;

while (running) {
delay(1000);
playSequence();
running = readSequence();
if (running) {
expand();
}
}

delay(250);
}
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.giddyplanet.com/2010/07/fra-led-til-simon/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Simplicity</title>
		<link>http://www.giddyplanet.com/2009/12/simplicity/</link>
		<comments>http://www.giddyplanet.com/2009/12/simplicity/#comments</comments>
		<pubDate>Sat, 12 Dec 2009 10:14:15 +0000</pubDate>
		<dc:creator>Rene Hangstrup Møller</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.giddyplanet.com/?p=19</guid>
		<description><![CDATA[Stumbled upon this fantastic quote: It seems strange to have to emphasize simplicity. You&#8217;d think simple would be the default. Ornate is more work. But something seems to come over people when they try to be creative. Beginning writers adopt a pompous tone that doesn&#8217;t sound anything like the way they speak. Designers trying to [...]]]></description>
			<content:encoded><![CDATA[<p>Stumbled upon this fantastic quote:</p>
<blockquote><p><span style="font-family: verdana; font-size: x-small;">It seems strange to have to emphasize simplicity. You&#8217;d think simple would be the default.  Ornate is more work.  But something seems to come over people when they try to be creative.  Beginning writers adopt    a pompous tone that doesn&#8217;t sound anything like the way  they speak.  Designers trying to be artistic resort to swooshes and curlicues.  Painters discover that they&#8217;re expressionists. It&#8217;s all evasion. Underneath the long words or the &#8220;expressive&#8221; brush strokes, there is not much going on, and that&#8217;s frightening.</span></p>
<p><span style="font-family: verdana; font-size: x-small;">When you&#8217;re forced to be simple, you&#8217;re forced to face the real problem. When you can&#8217;t deliver ornament, you have to deliver substance.</span></p>
<p><a title="Taste for Makers" href="http://www.paulgraham.com/taste.html" target="_self">http://www.paulgraham.com/taste.html</a></p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.giddyplanet.com/2009/12/simplicity/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Hello World</title>
		<link>http://www.giddyplanet.com/2009/11/hello-world/</link>
		<comments>http://www.giddyplanet.com/2009/11/hello-world/#comments</comments>
		<pubDate>Wed, 18 Nov 2009 16:07:07 +0000</pubDate>
		<dc:creator>Rene Hangstrup Møller</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.giddyplanet.com/?p=17</guid>
		<description><![CDATA[&#8230;please hold&#8230;]]></description>
			<content:encoded><![CDATA[<p>&#8230;please hold&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.giddyplanet.com/2009/11/hello-world/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
