<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://wiki.lvl1.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Ckharnett</id>
	<title>LVL1 - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="http://wiki.lvl1.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Ckharnett"/>
	<link rel="alternate" type="text/html" href="http://wiki.lvl1.org/Special:Contributions/Ckharnett"/>
	<updated>2026-10-15T18:07:21Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.5</generator>
	<entry>
		<id>http://wiki.lvl1.org/index.php?title=Freeduino_Games&amp;diff=5235</id>
		<title>Freeduino Games</title>
		<link rel="alternate" type="text/html" href="http://wiki.lvl1.org/index.php?title=Freeduino_Games&amp;diff=5235"/>
		<updated>2013-01-24T16:30:36Z</updated>

		<summary type="html">&lt;p&gt;Ckharnett: Added some software links&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Software to get==&lt;br /&gt;
(WILL NEED) Arduino--to write &amp;amp; install software on your Freeduino&lt;br /&gt;
[http://arduino.googlecode.com/files/arduino-1.0.3-windows.zip]&lt;br /&gt;
&lt;br /&gt;
(Optional) Processing--write PC, Mac, Linux/Android applications that work alone or with your Arduino&lt;br /&gt;
[http://processing.googlecode.com/files/processing-1.5.1-windows.zip]&lt;br /&gt;
&lt;br /&gt;
(Optional) Eagle PCB Layout--create circuit boards &lt;br /&gt;
[ftp://ftp.cadsoft.de/eagle/program/6.4/eagle-win-6.4.0.exe&lt;br /&gt;
]&lt;br /&gt;
&lt;br /&gt;
You might also like SolidWorks (free for Speed students) or Sketchup (Free) for 3D prints&lt;br /&gt;
&lt;br /&gt;
==Freeduino Truck Lane==&lt;br /&gt;
Go from the Freeduino Spring Training LCD activity to a game!&lt;br /&gt;
&lt;br /&gt;
Need a Freeduino, a 10K pot, and a 16x2 LCD and a solderless breadboard.&lt;br /&gt;
Follow all steps in [[4th Inning]].&lt;br /&gt;
Now, pull the middle pot pin out of the LCD. Just connect that LCD pin to ground. (It&#039;s the third pin from the end of the LCD) This should give you a high contrast display. We need to use the pot for steering!&lt;br /&gt;
Connect the middle pot pin instead to Analog Input pin 1 of your Freeduino.&lt;br /&gt;
We didn&#039;t add a speaker, just used pin 13 to light up the onboard green LED if you &amp;quot;crash&amp;quot; in the game. If you want to use a speaker, connect it to a PWM pin like digital 3, 5 or 6 and adjust the code accordingly.&lt;br /&gt;
&lt;br /&gt;
Here&#039;s the code, cut and paste this into Arduino and install it to your board. Play away. To play again, press the Freeduino&#039;s reset button.&lt;br /&gt;
&lt;br /&gt;
Much more including videos at the game&#039;s original site [http://www.instructables.com/id/Truck-Lane-a-16x2-LCD-Arduino-game/].&lt;br /&gt;
We&#039;ve changed the pinouts in the code to match what we did in the Freeduino Spring Training LCD activity.&lt;br /&gt;
&lt;br /&gt;
Can you modify the code to make a game that rewards crashing? For example, scoot around catching falling &amp;quot;coins,&amp;quot; and see how many you can collect within a certain time. Then, make them fall faster and faster! This would be a fun way to learn more about what the code is doing.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;/* Simple Car game for a 16x2 LCD display &lt;br /&gt;
   You can use any Hitachi HD44780 compatible LCD.&lt;br /&gt;
   Modified for LVL1 Spring Training LCD Activity,&lt;br /&gt;
    Originally from &lt;br /&gt;
    @TheRealDod, Nov 25, 2010&lt;br /&gt;
   There&#039;s a &amp;quot;steering wheel&amp;quot; potentiometer on analog input 1,&lt;br /&gt;
   and a led on pin 13&lt;br /&gt;
   &lt;br /&gt;
   Enjoy,&lt;br /&gt;
&lt;br /&gt;
*/&lt;br /&gt;
#include &amp;lt;LiquidCrystal.h&amp;gt;&lt;br /&gt;
// LiquidCrystal display&lt;br /&gt;
// You can use any Hitachi HD44780 compatible. Wiring explained at&lt;br /&gt;
// http://www.arduino.cc/en/Tutorial/LiquidCrystal&lt;br /&gt;
LiquidCrystal lcd(7, 8, 9, 10, 11, 12);&lt;br /&gt;
&lt;br /&gt;
// Steering wheel potentiometer&lt;br /&gt;
const int POTPIN = 1;&lt;br /&gt;
const int MAXPOT = 800; // no need to turn the wheel all the way to 1023 :)&lt;br /&gt;
&lt;br /&gt;
// Piezo speaker&lt;br /&gt;
const int SPEAKERPIN = 13;//you can see the led flash when u crash&lt;br /&gt;
&lt;br /&gt;
const int RANDSEEDPIN = 0; // an analog pin that isn&#039;t connected to anything&lt;br /&gt;
&lt;br /&gt;
const int MAXSTEPDURATION = 300; // Start slowly, each step is 1 millisec shorter.&lt;br /&gt;
const int MINSTEPDURATION = 150; // This is as fast as it gets&lt;br /&gt;
&lt;br /&gt;
const int NGLYPHS = 6;&lt;br /&gt;
// the glyphs will be defined starting from 1 (not 0),&lt;br /&gt;
// to enable lcd.print() of null-terminated strings&lt;br /&gt;
byte glyphs[NGLYPHS][8] = {&lt;br /&gt;
  // 1: car up&lt;br /&gt;
  { B00000,&lt;br /&gt;
    B01110,&lt;br /&gt;
    B11111,&lt;br /&gt;
    B01010,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B00000}&lt;br /&gt;
  // 2: car down&lt;br /&gt;
  ,{B00000,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B01110,&lt;br /&gt;
    B11111,&lt;br /&gt;
    B01010,&lt;br /&gt;
    B00000}&lt;br /&gt;
  // 3: truck up&lt;br /&gt;
  ,{B00000,&lt;br /&gt;
    B11110,&lt;br /&gt;
    B11111,&lt;br /&gt;
    B01010,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B00000}&lt;br /&gt;
  // 4: truck down&lt;br /&gt;
  ,{B00000,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B11110,&lt;br /&gt;
    B11111,&lt;br /&gt;
    B01010,&lt;br /&gt;
    B00000}&lt;br /&gt;
  // 5: crash up&lt;br /&gt;
  ,{B10101,&lt;br /&gt;
    B01110,&lt;br /&gt;
    B01110,&lt;br /&gt;
    B10101,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B00000}&lt;br /&gt;
  // 6: crash down&lt;br /&gt;
  ,{B00000,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B10101,&lt;br /&gt;
    B01110,&lt;br /&gt;
    B01110,&lt;br /&gt;
    B10101,&lt;br /&gt;
    B00000}&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
const int NCARPOSITIONS = 4;&lt;br /&gt;
&lt;br /&gt;
// Each position is mapped to a column of 2 glyphs&lt;br /&gt;
// Used to make sense when I had a 5th position&lt;br /&gt;
// where car or crash was drawn as 2 glyphs&lt;br /&gt;
// (can&#039;t do that since 0 terminates strings),&lt;br /&gt;
// so it&#039;s kinda silly now, but it ain&#039;t broke :)&lt;br /&gt;
const char BLANK=32;&lt;br /&gt;
char car2glyphs[NCARPOSITIONS][2] = {&lt;br /&gt;
  {1,BLANK},{2,BLANK},{BLANK,1},{BLANK,2}&lt;br /&gt;
};&lt;br /&gt;
char truck2glyphs[NCARPOSITIONS][2] = {&lt;br /&gt;
  {3,BLANK},{4,BLANK},{BLANK,3},{BLANK,4}&lt;br /&gt;
};&lt;br /&gt;
char crash2glyphs[NCARPOSITIONS][2] = {&lt;br /&gt;
  {5,BLANK},{6,BLANK},{BLANK,5},{BLANK,6}&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
const int ROADLEN = 15; // LCD width (not counting our car)&lt;br /&gt;
int road[ROADLEN]; // positions of other cars&lt;br /&gt;
char line_buff[2+ROADLEN]; // aux string for drawRoad()&lt;br /&gt;
int road_index;&lt;br /&gt;
int car_pos;&lt;br /&gt;
// Off-the-grid position means empty column, so MAXROADPOS&lt;br /&gt;
// determines the probability of a car in a column&lt;br /&gt;
// e.g. 3*NCARPOSITIONS gives p=1/3&lt;br /&gt;
const int MAXROADPOS = 3*NCARPOSITIONS;&lt;br /&gt;
int step_duration;&lt;br /&gt;
&lt;br /&gt;
int crash; // true if crashed&lt;br /&gt;
unsigned int crashtime; // millis() when crashed&lt;br /&gt;
const int CRASHSOUNDDURATION = 250;&lt;br /&gt;
&lt;br /&gt;
const char *INTRO1=&amp;quot;Trucks ahead,&amp;quot;;&lt;br /&gt;
const char *INTRO2=&amp;quot;Drive carefully&amp;quot;;&lt;br /&gt;
const int INTRODELAY = 2000;&lt;br /&gt;
&lt;br /&gt;
void setup()&lt;br /&gt;
{&lt;br /&gt;
  crash = crashtime = road_index = 0;&lt;br /&gt;
  step_duration = MAXSTEPDURATION;&lt;br /&gt;
  line_buff[1+ROADLEN] = &#039;\0&#039;; // null terminate it&lt;br /&gt;
  randomSeed(analogRead(RANDSEEDPIN));&lt;br /&gt;
  for (int i=0; i&amp;lt;NGLYPHS; i++) {&lt;br /&gt;
    lcd.createChar(i+1,glyphs[i]);&lt;br /&gt;
  }&lt;br /&gt;
  for (int i=0; i&amp;lt;ROADLEN; i++) {&lt;br /&gt;
    road[i]=-1;&lt;br /&gt;
  }&lt;br /&gt;
  pinMode(SPEAKERPIN,OUTPUT);&lt;br /&gt;
  analogWrite(SPEAKERPIN,0); // to be on the safe side&lt;br /&gt;
  lcd.begin(16,2);&lt;br /&gt;
  getSteeringWheel();&lt;br /&gt;
  drawRoad();&lt;br /&gt;
  lcd.setCursor(1,0);&lt;br /&gt;
  lcd.print(INTRO1);&lt;br /&gt;
  lcd.setCursor(1,1);&lt;br /&gt;
  lcd.print(INTRO2);&lt;br /&gt;
  delay(INTRODELAY);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void loop() {&lt;br /&gt;
  unsigned long now = millis()-INTRODELAY;&lt;br /&gt;
  if (!crash) {&lt;br /&gt;
    getSteeringWheel();&lt;br /&gt;
    crash = (car_pos==road[road_index]);&lt;br /&gt;
  }&lt;br /&gt;
  if (crash) {&lt;br /&gt;
    if (!crashtime) {&lt;br /&gt;
      crashtime=now;&lt;br /&gt;
      drawRoad();&lt;br /&gt;
      // Game over text&lt;br /&gt;
      // (keep first 2 &amp;quot;crash&amp;quot; columns intact)&lt;br /&gt;
      lcd.setCursor(2,0);&lt;br /&gt;
      lcd.print(&amp;quot;Crashed after&amp;quot;);&lt;br /&gt;
      lcd.setCursor(2,1);&lt;br /&gt;
      lcd.print(now/1000);&lt;br /&gt;
      lcd.print(&amp;quot; seconds.&amp;quot;);&lt;br /&gt;
    }&lt;br /&gt;
    if ((now-crashtime)&amp;lt;CRASHSOUNDDURATION) {&lt;br /&gt;
      analogWrite(SPEAKERPIN,random(255)); // white noise&lt;br /&gt;
    } &lt;br /&gt;
    else {&lt;br /&gt;
      analogWrite(SPEAKERPIN,0); // dramatic post-crush silence :)   &lt;br /&gt;
    }&lt;br /&gt;
    delay(10); // Wait a bit between writes&lt;br /&gt;
  } &lt;br /&gt;
  else {&lt;br /&gt;
&lt;br /&gt;
    int prev_pos = road[(road_index-1)%ROADLEN];&lt;br /&gt;
    int this_pos = random(MAXROADPOS);&lt;br /&gt;
    while (abs(this_pos-prev_pos)&amp;lt;2) { // don&#039;t jam the road&lt;br /&gt;
      this_pos = random(MAXROADPOS);&lt;br /&gt;
    }&lt;br /&gt;
    road[road_index] = this_pos;&lt;br /&gt;
    road_index = (road_index+1)%ROADLEN;&lt;br /&gt;
    drawRoad();&lt;br /&gt;
    delay(step_duration);&lt;br /&gt;
    if (step_duration&amp;gt;MINSTEPDURATION) {&lt;br /&gt;
      step_duration--; // go faster&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
void getSteeringWheel() {&lt;br /&gt;
  car_pos = map(analogRead(POTPIN),0,1024,0,NCARPOSITIONS);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void drawRoad() {&lt;br /&gt;
  for (int i=0; i&amp;lt;2; i++) {&lt;br /&gt;
    if (crash) {&lt;br /&gt;
      line_buff[0]=crash2glyphs[car_pos][i];&lt;br /&gt;
    } &lt;br /&gt;
    else {&lt;br /&gt;
      line_buff[0]=car2glyphs[car_pos][i];&lt;br /&gt;
    }&lt;br /&gt;
    for (int j=0; j&amp;lt;ROADLEN; j++) {&lt;br /&gt;
      int pos = road[(j+road_index)%ROADLEN];&lt;br /&gt;
      line_buff[j+1] = pos&amp;gt;=0 &amp;amp;&amp;amp; pos&amp;lt;NCARPOSITIONS ? truck2glyphs[pos][i] : BLANK;&lt;br /&gt;
    }&lt;br /&gt;
    lcd.setCursor(0,i);&lt;br /&gt;
    lcd.print(line_buff);&lt;br /&gt;
  }&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Freeduino Whack-A-Mole==&lt;br /&gt;
And next, Freeduino Whack-A-Mole![http://www.google.com/url?sa=t&amp;amp;rct=j&amp;amp;q=&amp;amp;esrc=s&amp;amp;source=web&amp;amp;cd=1&amp;amp;cts=1331224454832&amp;amp;ved=0CCkQFjAA&amp;amp;url=http%3A%2F%2Fwww.arduino.cc%2Fcgi-bin%2Fyabb2%2FYaBB.pl%3Fnum%3D1262971548&amp;amp;ei=VeFYT7udG-W30gHRztSsDw&amp;amp;usg=AFQjCNF8jYa_NAlX93ekQY-i1_jE6sCTuQ&amp;amp;sig2=KC_H8S7tHq7lLiaMqooF1g] We need 5-way joysticks for this one. It will introduce the Arduino Serial Monitor.&lt;br /&gt;
We&#039;re getting this 5-way joystick (5 way= up,down,left,right and button press)- it&#039;s a navigation switch from Adafruit.[https://www.adafruit.com/products/504]&lt;br /&gt;
&lt;br /&gt;
Here&#039;s the datasheet for the 5-way switch&amp;quot; [http://www.adafruit.com/datasheets/SKQUCAA010-ALPS.pdf]&lt;br /&gt;
&lt;br /&gt;
Here&#039;s how it&#039;s hooked up:[[File:WhackamoleSwitch.jpg]]&lt;br /&gt;
&lt;br /&gt;
Here&#039;s the code:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/*&lt;br /&gt;
This is a whackamole game. &lt;br /&gt;
 Joystick connected as follows: (Instructions are for Adafruit 5-way switch part 504)&lt;br /&gt;
 Up    Arduino digital pin 3, to switch pin 5&lt;br /&gt;
 Right		 Arduino digital pin 4, to switch pin 3&lt;br /&gt;
 Down		  Arduino digital pin 5, to switch pin 2&lt;br /&gt;
 Left		  Arduino digital pin 6, to switch pin 1&lt;br /&gt;
 Button		Arduino digital pin 7, to switch pin 6&lt;br /&gt;
 &lt;br /&gt;
 If you follow this map it should work--you might have to rotate your breadboard&lt;br /&gt;
 Make sure the switch is well connected to the breadboard.&lt;br /&gt;
 &lt;br /&gt;
 Common: Digital Pin 2 to switch pin 4&lt;br /&gt;
 &lt;br /&gt;
 Press the button to start&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
const char cross = &#039;*&#039;;&lt;br /&gt;
const char mole = &#039;O&#039;;&lt;br /&gt;
const char both = &#039;@&#039;;&lt;br /&gt;
const char miss = &#039;x&#039;;&lt;br /&gt;
const char hit = &#039;#&#039;;&lt;br /&gt;
const char blank = &#039;.&#039;;&lt;br /&gt;
&lt;br /&gt;
int crossCoor;&lt;br /&gt;
int moleCoor;&lt;br /&gt;
long spawn;&lt;br /&gt;
int limit;&lt;br /&gt;
char pic;&lt;br /&gt;
boolean dead;&lt;br /&gt;
int coor;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
void setup()  {&lt;br /&gt;
  for(int i=3; i&amp;lt;=7; i++) {&lt;br /&gt;
    pinMode(i, INPUT);&lt;br /&gt;
    digitalWrite(i, HIGH);&lt;br /&gt;
  }&lt;br /&gt;
  pinMode(2, OUTPUT);&lt;br /&gt;
  digitalWrite(2, LOW);&lt;br /&gt;
  Serial.begin(115200);&lt;br /&gt;
  coor=5;//start out in the middle&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
int crossGet()  {//fixed so it works a little better w 5 way switch now&lt;br /&gt;
&lt;br /&gt;
  int mycoor = coor;&lt;br /&gt;
  if(digitalRead(3) == HIGH)  {//up&lt;br /&gt;
    mycoor += 3;&lt;br /&gt;
  }&lt;br /&gt;
  if(digitalRead(5) == HIGH)  {//down&lt;br /&gt;
    mycoor -= 3;&lt;br /&gt;
  }&lt;br /&gt;
  if(digitalRead(4) == HIGH)  {//right&lt;br /&gt;
    mycoor --;&lt;br /&gt;
  }&lt;br /&gt;
  if(digitalRead(6) == HIGH)  {//left&lt;br /&gt;
    mycoor ++;&lt;br /&gt;
  }&lt;br /&gt;
  if((mycoor&amp;gt;0)&amp;amp;(mycoor&amp;lt;10)){&lt;br /&gt;
     coor=mycoor;&lt;br /&gt;
  }&lt;br /&gt;
   return coor;  &lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
boolean pressed()  {&lt;br /&gt;
  boolean res;&lt;br /&gt;
  if(digitalRead(7)==LOW)  {&lt;br /&gt;
    res=true;&lt;br /&gt;
  }&lt;br /&gt;
  else  {&lt;br /&gt;
    res=false;&lt;br /&gt;
  }&lt;br /&gt;
  return res;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void display(int molePos)  {&lt;br /&gt;
  int one=crossGet();&lt;br /&gt;
  boolean button = pressed();&lt;br /&gt;
  for(int i=1; i&amp;lt;=9; i++)  {&lt;br /&gt;
&lt;br /&gt;
    if(one==i &amp;amp;&amp;amp; molePos==i)  {&lt;br /&gt;
      if(button)  {&lt;br /&gt;
        pic = hit;&lt;br /&gt;
        dead=true;&lt;br /&gt;
      }&lt;br /&gt;
      else  {&lt;br /&gt;
        pic=both;&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
    else if(one == i)  {&lt;br /&gt;
      if(button)  {&lt;br /&gt;
        pic=miss;&lt;br /&gt;
      }&lt;br /&gt;
      else  {&lt;br /&gt;
        pic=cross;&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
    else if(molePos==i)  {&lt;br /&gt;
      pic=mole;&lt;br /&gt;
    }&lt;br /&gt;
    else  {&lt;br /&gt;
      pic=blank;&lt;br /&gt;
    }&lt;br /&gt;
    if(i==3 || i==6 || i==9)  {&lt;br /&gt;
      Serial.println(pic);&lt;br /&gt;
    }&lt;br /&gt;
    else  {&lt;br /&gt;
      Serial.print(pic);&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void makeMole()  {&lt;br /&gt;
  spawn = millis();&lt;br /&gt;
  randomSeed(analogRead(0));&lt;br /&gt;
  moleCoor = random(1, 10);&lt;br /&gt;
  dead=false;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void noMole()  {&lt;br /&gt;
  moleCoor=10;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void loop()  {&lt;br /&gt;
  Serial.println(&amp;quot;Ready to play?&amp;quot;);&lt;br /&gt;
  while(digitalRead(7)==HIGH)  {&lt;br /&gt;
  }&lt;br /&gt;
  Serial.println(&amp;quot;Ready...&amp;quot;);&lt;br /&gt;
  delay(1000);&lt;br /&gt;
  Serial.println(&amp;quot;Set...&amp;quot;);&lt;br /&gt;
  delay(1000);&lt;br /&gt;
  Serial.println(&amp;quot;GO!&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
  boolean lost = false;&lt;br /&gt;
  int score = 0;&lt;br /&gt;
  limit= 5000;&lt;br /&gt;
&lt;br /&gt;
  while(lost==false ) {&lt;br /&gt;
    int time = random(100, 300);&lt;br /&gt;
    for(int i=0; i&amp;lt;=time; i++)  {&lt;br /&gt;
      display(10);&lt;br /&gt;
      Serial.println();&lt;br /&gt;
      delay(50);&lt;br /&gt;
    }&lt;br /&gt;
    makeMole();&lt;br /&gt;
    while(dead==false &amp;amp;&amp;amp; spawn+limit &amp;gt;= millis())  {&lt;br /&gt;
      display(moleCoor);&lt;br /&gt;
      if(pic==&#039;#&#039;)  {&lt;br /&gt;
        dead = true;&lt;br /&gt;
      }&lt;br /&gt;
      Serial.println();&lt;br /&gt;
      delay(50);&lt;br /&gt;
    }&lt;br /&gt;
    if(dead)  {&lt;br /&gt;
&lt;br /&gt;
      score++;&lt;br /&gt;
      if(limit&amp;gt;1000)  {&lt;br /&gt;
        limit -= 50;&lt;br /&gt;
      }&lt;br /&gt;
      delay(100);&lt;br /&gt;
&lt;br /&gt;
    }&lt;br /&gt;
    else  {&lt;br /&gt;
      break;&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
  Serial.println(&amp;quot;You lost&amp;quot;);&lt;br /&gt;
  delay(1000);&lt;br /&gt;
  Serial.print(&amp;quot;Your score was  &amp;quot;);&lt;br /&gt;
  Serial.println(score);&lt;br /&gt;
  Serial.println();&lt;br /&gt;
  delay(1000);&lt;br /&gt;
  while(digitalRead(7)==HIGH)  {&lt;br /&gt;
  }&lt;br /&gt;
  delay(1000);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The code works okay with the Serial Monitor, except it scrolls away so it can be hard to track what&#039;s happening with the little whack-a-mole symbols. Instead--you could have a Processing program turn the symbols into pictures. Download &amp;amp; install Processing from processing.org (very similar to Arduino except is generally for making programs on your laptop), unzip these files [http://www.lvl1.org/wp-content/uploads/2012/03/WhackAMoleScreen2.zip] and put them in your Processing sketch folder, plug in your Arduino running the Whack-a-Mole code and finally launch the Processing Whack-a-Mole screen program. For Windows users, if it doesn&#039;t connect, you might have to adjust the portName string from Serial.list()[0] to Serial.list()[1] or another number that connects with your Arduino. Then you&#039;ll get this:&lt;br /&gt;
[[File:WhackAMoleScreenShot.png]]&lt;br /&gt;
&lt;br /&gt;
==Others==&lt;br /&gt;
What games can you make from a Freeduino, LCD, one pot, one 5-way joystick, some LEDs, a temperature sensor, a light sensor and maybe a piezo speaker? &lt;br /&gt;
&lt;br /&gt;
==Advanced==&lt;br /&gt;
You are also allowed to use the Serial Monitor in combination with Processing or the like, to do stuff on your computer&#039;s display. The Freeduino should be the game engine.&lt;/div&gt;</summary>
		<author><name>Ckharnett</name></author>
	</entry>
	<entry>
		<id>http://wiki.lvl1.org/index.php?title=Trilife_Workshop&amp;diff=4690</id>
		<title>Trilife Workshop</title>
		<link rel="alternate" type="text/html" href="http://wiki.lvl1.org/index.php?title=Trilife_Workshop&amp;diff=4690"/>
		<updated>2012-09-23T10:02:30Z</updated>

		<summary type="html">&lt;p&gt;Ckharnett: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Trilife is a project designed for large groups. You solder a small board and plug it into neighboring boards, making a giant array of lights that interact with each other. Here is a simulation of an 800 board array in action. [http://www.youtube.com/embed/c5o8RIuZyIo]&lt;br /&gt;
&lt;br /&gt;
Here&#039;s a step-by-step guide [http://www.lvl1.org/wp-content/uploads/2012/05/BuildingTrilife.pdf] to building a board. &lt;br /&gt;
Here&#039;s the Github page [http://blipworks.github.com/trilife/] that connects to the project repository and video. We also programmed a &amp;quot;kicker&amp;quot; board (that&#039;s always on the brightest state) to start up interesting patterns when the kicker board is connected to the network. A 118 Hz, 0-5V square wave from a function generator also works.&lt;br /&gt;
Kits were built by GadgetLabbers, then by folks at LVL1 (Thanks!) with more available through spring/summer 2012.&lt;br /&gt;
Questions? Email trilife-help@lvl1.org.&lt;/div&gt;</summary>
		<author><name>Ckharnett</name></author>
	</entry>
	<entry>
		<id>http://wiki.lvl1.org/index.php?title=Trilife_Workshop&amp;diff=4689</id>
		<title>Trilife Workshop</title>
		<link rel="alternate" type="text/html" href="http://wiki.lvl1.org/index.php?title=Trilife_Workshop&amp;diff=4689"/>
		<updated>2012-09-23T10:01:07Z</updated>

		<summary type="html">&lt;p&gt;Ckharnett: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Trilife is a project designed for large groups. You solder a small board and plug it into neighboring boards, making a giant array of lights that interact with each other. &lt;br /&gt;
Here&#039;s a step-by-step guide [http://www.lvl1.org/wp-content/uploads/2012/05/BuildingTrilife.pdf] to building a board. &lt;br /&gt;
Here&#039;s the Github page [http://blipworks.github.com/trilife/] that connects to the project repository and video. We also programmed a &amp;quot;kicker&amp;quot; board (that&#039;s always on the brightest state) to start up interesting patterns when the kicker board is connected to the network. A 118 Hz, 0-5V square wave from a function generator also works.&lt;br /&gt;
Kits were built by GadgetLabbers, then by folks at LVL1 (Thanks!) with more available through spring/summer 2012.&lt;br /&gt;
Questions? Email trilife-help@lvl1.org&lt;br /&gt;
Here is a simulation of an 800 board array in action. [http://www.youtube.com/embed/c5o8RIuZyIo]&lt;/div&gt;</summary>
		<author><name>Ckharnett</name></author>
	</entry>
	<entry>
		<id>http://wiki.lvl1.org/index.php?title=Trilife_Workshop&amp;diff=4628</id>
		<title>Trilife Workshop</title>
		<link rel="alternate" type="text/html" href="http://wiki.lvl1.org/index.php?title=Trilife_Workshop&amp;diff=4628"/>
		<updated>2012-09-19T02:25:30Z</updated>

		<summary type="html">&lt;p&gt;Ckharnett: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Trilife is a project designed for large groups. You solder a small board and plug it into neighboring boards, making a giant array of lights that interact with each other. &lt;br /&gt;
Here&#039;s a step-by-step guide [http://www.lvl1.org/wp-content/uploads/2012/05/BuildingTrilife.pdf] to building a board. &lt;br /&gt;
Here&#039;s the Github page [http://blipworks.github.com/trilife/] that connects to the project repository and video. We also programmed a &amp;quot;kicker&amp;quot; board (that&#039;s always on the brightest state) to start up interesting patterns when the kicker board is connected to the network. A 118 Hz, 0-5V square wave from a function generator also works.&lt;br /&gt;
Kits were built by GadgetLabbers, then by folks at LVL1 (Thanks!) with more available through spring/summer 2012.&lt;br /&gt;
&amp;lt;iframe width=&amp;quot;560&amp;quot; height=&amp;quot;315&amp;quot; src=&amp;quot;http://www.youtube.com/embed/c5o8RIuZyIo&amp;quot; frameborder=&amp;quot;0&amp;quot; allowfullscreen&amp;gt;&amp;lt;/iframe&amp;gt;&lt;/div&gt;</summary>
		<author><name>Ckharnett</name></author>
	</entry>
	<entry>
		<id>http://wiki.lvl1.org/index.php?title=Trilife_Workshop&amp;diff=4128</id>
		<title>Trilife Workshop</title>
		<link rel="alternate" type="text/html" href="http://wiki.lvl1.org/index.php?title=Trilife_Workshop&amp;diff=4128"/>
		<updated>2012-05-19T13:37:44Z</updated>

		<summary type="html">&lt;p&gt;Ckharnett: added info about kicker board&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Trilife is a project designed for large groups. You solder a small board and plug it into neighboring boards, making a giant array of lights that interact with each other. &lt;br /&gt;
Here&#039;s a step-by-step guide [http://www.lvl1.org/wp-content/uploads/2012/05/BuildingTrilife.pdf] to building a board. &lt;br /&gt;
Here&#039;s the Github page [http://blipworks.github.com/trilife/] that connects to the project repository and video. We also programmed a &amp;quot;kicker&amp;quot; board (that&#039;s always on the brightest state) to start up interesting patterns when the kicker board is connected to the network. A 118 Hz, 0-5V square wave from a function generator also works.&lt;br /&gt;
Kits were built by GadgetLabbers, then by folks at LVL1 (Thanks!) with more available through spring/summer 2012.&lt;/div&gt;</summary>
		<author><name>Ckharnett</name></author>
	</entry>
	<entry>
		<id>http://wiki.lvl1.org/index.php?title=Trilife_Workshop&amp;diff=4127</id>
		<title>Trilife Workshop</title>
		<link rel="alternate" type="text/html" href="http://wiki.lvl1.org/index.php?title=Trilife_Workshop&amp;diff=4127"/>
		<updated>2012-05-19T12:03:35Z</updated>

		<summary type="html">&lt;p&gt;Ckharnett: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Trilife is a project designed for large groups. You solder a small board and plug it into neighboring boards, making a giant array of lights that interact with each other. &lt;br /&gt;
Here&#039;s a step-by-step guide [http://www.lvl1.org/wp-content/uploads/2012/05/BuildingTrilife.pdf] to building a board. &lt;br /&gt;
Here&#039;s the Github page [http://blipworks.github.com/trilife/] that connects to the project repository and video.&lt;br /&gt;
Kits were built by GadgetLabbers, then by folks at LVL1 (Thanks!) with more available through spring/summer 2012.&lt;/div&gt;</summary>
		<author><name>Ckharnett</name></author>
	</entry>
	<entry>
		<id>http://wiki.lvl1.org/index.php?title=Trilife_Workshop&amp;diff=4034</id>
		<title>Trilife Workshop</title>
		<link rel="alternate" type="text/html" href="http://wiki.lvl1.org/index.php?title=Trilife_Workshop&amp;diff=4034"/>
		<updated>2012-05-02T21:08:38Z</updated>

		<summary type="html">&lt;p&gt;Ckharnett: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Trilife is a project designed for large groups. You solder a small board and plug it into neighboring boards, making a giant array of lights that interact with each other. &lt;br /&gt;
Here&#039;s a step-by-step guide [http://www.lvl1.org/wp-content/uploads/2012/04/BuildingTrilife.pdf] to building a board. &lt;br /&gt;
Here&#039;s the Github page [http://blipworks.github.com/trilife/] that connects to the project repository and video.&lt;br /&gt;
Kits were built by GadgetLabbers, then by folks at LVL1 (Thanks!) with more available through spring/summer 2012.&lt;/div&gt;</summary>
		<author><name>Ckharnett</name></author>
	</entry>
	<entry>
		<id>http://wiki.lvl1.org/index.php?title=Trilife_Workshop&amp;diff=4023</id>
		<title>Trilife Workshop</title>
		<link rel="alternate" type="text/html" href="http://wiki.lvl1.org/index.php?title=Trilife_Workshop&amp;diff=4023"/>
		<updated>2012-05-01T17:15:04Z</updated>

		<summary type="html">&lt;p&gt;Ckharnett: added link to Trilife repository&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Trilife is a project designed for large groups. You solder a small board and plug it into neighboring boards, making a giant array of lights that interact with each other. &lt;br /&gt;
Here&#039;s a step-by-step guide [http://www.lvl1.org/wp-content/uploads/2012/04/BuildingTrilife.pdf] to building a board. &lt;br /&gt;
Here&#039;s the Github page [http://blipworks.github.com/trilife/] that connects to the project repository and video.&lt;br /&gt;
Kits will be coming to LVL1 in spring/summer 2012.&lt;/div&gt;</summary>
		<author><name>Ckharnett</name></author>
	</entry>
	<entry>
		<id>http://wiki.lvl1.org/index.php?title=Trilife_Workshop&amp;diff=4020</id>
		<title>Trilife Workshop</title>
		<link rel="alternate" type="text/html" href="http://wiki.lvl1.org/index.php?title=Trilife_Workshop&amp;diff=4020"/>
		<updated>2012-04-29T04:26:04Z</updated>

		<summary type="html">&lt;p&gt;Ckharnett: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Trilife is a project designed for large groups. You solder a small board and plug it into neighboring boards, making a giant array of lights that interact with each other. &lt;br /&gt;
Here&#039;s a step-by-step guide [http://www.lvl1.org/wp-content/uploads/2012/04/BuildingTrilife.pdf] to building a board. Kits will be coming to LVL1 in spring/summer 2012.&lt;/div&gt;</summary>
		<author><name>Ckharnett</name></author>
	</entry>
	<entry>
		<id>http://wiki.lvl1.org/index.php?title=Trilife_Workshop&amp;diff=4019</id>
		<title>Trilife Workshop</title>
		<link rel="alternate" type="text/html" href="http://wiki.lvl1.org/index.php?title=Trilife_Workshop&amp;diff=4019"/>
		<updated>2012-04-29T03:58:17Z</updated>

		<summary type="html">&lt;p&gt;Ckharnett: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Trilife is a project designed for large groups. You solder a small board and plug it into neighboring boards, making a giant array of lights that interact with each other.&lt;/div&gt;</summary>
		<author><name>Ckharnett</name></author>
	</entry>
	<entry>
		<id>http://wiki.lvl1.org/index.php?title=Trilife_Workshop&amp;diff=4018</id>
		<title>Trilife Workshop</title>
		<link rel="alternate" type="text/html" href="http://wiki.lvl1.org/index.php?title=Trilife_Workshop&amp;diff=4018"/>
		<updated>2012-04-29T03:57:13Z</updated>

		<summary type="html">&lt;p&gt;Ckharnett: Started page on Trilife kit&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Trilife is a project I am developing for large groups. You solder a small board and plug it into neighboring boards, making a giant array of lights that interact with each other.&lt;/div&gt;</summary>
		<author><name>Ckharnett</name></author>
	</entry>
	<entry>
		<id>http://wiki.lvl1.org/index.php?title=Workshops&amp;diff=4017</id>
		<title>Workshops</title>
		<link rel="alternate" type="text/html" href="http://wiki.lvl1.org/index.php?title=Workshops&amp;diff=4017"/>
		<updated>2012-04-29T03:53:13Z</updated>

		<summary type="html">&lt;p&gt;Ckharnett: /* GadgetLab TriLife blinker files */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page is a free resource for all learning materials used in LVL1 workshops. Check our [[Calendar]] to see what LVL1 workshops are on the horizon! Enjoy!&lt;br /&gt;
&lt;br /&gt;
== How to Solder ==&lt;br /&gt;
* [[media:soldercomic.pdf|Soldering is Easy Comic]]&lt;br /&gt;
&lt;br /&gt;
== Solder Your Own Freeduino ==&lt;br /&gt;
*[http://www.arduino.cc/en/Main/Software Download Arduino Software] the Arduino software and install.&lt;br /&gt;
*[http://arduino.cc/en/Tutorial/HomePage Arduino Tutorials] Arduino Tutorials&lt;br /&gt;
*[[Media:Solder_your_own_freeduino_handout.pdf|Solder Your Own Freeduino Instructions PDF]]&lt;br /&gt;
*[[Media:Solder_your_own_freeduino_handout.odp|Solder Your Own Freeduino Instructions Open Office Presentation]]&lt;br /&gt;
*[[Media:ResistorQV.pdf|Resistor Color Code PDF]]&lt;br /&gt;
*[[Media:Arduino_cheat_sheet_v02c.pdf|Arduino Cheatsheet PDF]]&lt;br /&gt;
&lt;br /&gt;
== Freeduino Spring Training ==&lt;br /&gt;
&lt;br /&gt;
http://wiki.lvl1.org/Freediuino_Spring_Training&lt;br /&gt;
&lt;br /&gt;
Below are the lessons for the Freeduino Spring Training.  They are Creative Commons licensed, so share and use.  Pass them along.  If there are issues (bugs) with the instruction, code or circuits, then email me brian_at_lvl1.org.  The breadboard and schematic pictures are drawn using the [http://www.fritzing.org Fritzing] Program.  Try Fritzing out - it is really cool! &lt;br /&gt;
&lt;br /&gt;
*[[1st Inning]] - Arduino and Breadboard setup, Power&lt;br /&gt;
*[[2nd Inning]] - Blinking LED&lt;br /&gt;
*[[3rd Inning]] - Tri-Color LED fading&lt;br /&gt;
*[[4th Inning]] - LCD display&lt;br /&gt;
*[[5th Inning]] - Pushbutton switches&lt;br /&gt;
*[[6th Inning]] - Potentiometers and voltage dividers&lt;br /&gt;
*[[7th Inning]] - Photocell, Thermistor&lt;br /&gt;
*[[8th Inning]] - Spin a motor, transistors and diodes&lt;br /&gt;
*[[9th Inning]] - Sounds and speakers&lt;br /&gt;
&lt;br /&gt;
== February Freeduino Frenzy ==&lt;br /&gt;
[[February Freeduino Frenzy]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Learn To Solder with Mitch Altman and Jimmie Rodgers ==&lt;br /&gt;
*[[Media:LearnToSolderWithMitch.odt|Flyer for the workshop in OOO Writer format.]]&lt;br /&gt;
*[[Media:LearnToSolderWithMitch.pdf|Flyer for the workshop in PDF format.]]&lt;br /&gt;
&lt;br /&gt;
== Intermediate Microcontroller Workshop, &amp;quot;Beyond Arduino&amp;quot; == &lt;br /&gt;
*[http://drop.io/kt3wfh7 Presentation] - The Powerpoint Presentation used in the workshop, with notes.&lt;br /&gt;
*[[Resources and Code]] - The files used during the course of this workshop.&lt;br /&gt;
*[[Parts]] - Parts used in this workshop&lt;br /&gt;
*[[Media:Lvl1_avr_workshop.svg|Flyer for the workshop in SVG Format.]]&lt;br /&gt;
*[[Media:Lvl1_avr_workshop.pdf|Flyer for the workshop in PDF Format.]]&lt;br /&gt;
&lt;br /&gt;
== TV-B-Gone Workshop ==&lt;br /&gt;
*[[Media:Tv-b-gone.odp|TV-B-Gone instructions Open Office Presentation]]&lt;br /&gt;
*[[Media:Tv-b-gone.pdf|TV-B-Gone instructions PDF]]&lt;br /&gt;
&lt;br /&gt;
== Minti Boost Workshop ==&lt;br /&gt;
[[MintiBoost]] Workshop Information for 12/6/10 and 12/18/10&lt;br /&gt;
&lt;br /&gt;
== Android Game Workshop ==&lt;br /&gt;
*[https://docs.google.com/viewer?a=v&amp;amp;pid=explorer&amp;amp;chrome=true&amp;amp;srcid=0B4p7lji7MVk7NGU3Zjk1NDUtMTliMS00NzFhLTg4YTMtNjMzMjQ1ZWIxMzVm&amp;amp;hl=en&amp;amp;authkey=CLqd-usM] Android Slides PDF&lt;br /&gt;
*[https://docs.google.com/leaf?id=0B4p7lji7MVk7YjBlN2Q1OTYtNjIyZS00MmZiLWIzMGMtYzMxMmNmZTQ0MGRm&amp;amp;hl=en&amp;amp;authkey=CMHRx3E] Android Sample App&lt;br /&gt;
&lt;br /&gt;
== Ruby on Rails Workshop ==&lt;br /&gt;
==== Source Code &amp;amp; Notes ====&lt;br /&gt;
*[https://docs.google.com/leaf?id=0Bzy184pfAcrUMThkNGVjMmItMWVmNS00OTM2LTg3ZTctOWY5MDk1MDdjY2Mx&amp;amp;hl=en&amp;amp;authkey=CP_Qo5kI] blog.zip&lt;br /&gt;
==== References ====&lt;br /&gt;
*[http://www.amazon.com/Design-Patterns-Ruby-Russ-Olsen/dp/0321490452/ref=sr_1_1?ie=UTF8&amp;amp;qid=1305291175&amp;amp;sr=8-1|Design Patterns in Ruby, by Russ Olsen]&lt;br /&gt;
This book is both very readable (a rarity in tech books) and a fantastic introduction to Ruby for someone familiar with the GoF design pattern implementations in other languages. It has a quick Ruby syntax primer in the beginning, then jumps straight into the patterns.&lt;br /&gt;
&lt;br /&gt;
*[http://www.amazon.com/Programming-Ruby-1-9-Pragmatic-Programmers/dp/1934356085/ref=sr_1_1?s=books&amp;amp;ie=UTF8&amp;amp;qid=1305291335&amp;amp;sr=1-1|Programming Ruby 1.9, by Dave Thomas, Chad Fowler, and Andy Hunt]&lt;br /&gt;
This is the latest edition of the book commonly known as &amp;quot;The Pickaxe&amp;quot; in the Ruby community -- in its first edition, it was the first comprehensive English-language reference for Ruby, and was therefore indispensable to someone just getting started with the language. The latest edition is still a great reference book to have around.&lt;br /&gt;
&lt;br /&gt;
*[http://www.amazon.com/Agile-Development-Rails-Pragmatic-Programmers/dp/1934356549/ref=sr_1_1?ie=UTF8&amp;amp;qid=1305291555&amp;amp;sr=8-1|Agile Web Development with Rails, 4th Edition, by Sam Ruby, Dave Thomas, and David Heinemeier Hansson]&lt;br /&gt;
Agile Web Development was co-authored by David Heinemeier Hansson, the creator of Rails, and was the closest thing that the Rails community had to &amp;quot;The Pickaxe&amp;quot; for Ruby, in its first edition. The authors have done a great job of cleaning it up and keeping it relevant, and the latest version covers Rails 3.&lt;br /&gt;
&lt;br /&gt;
*[http://www.amazon.com/Rails-Way-Addison-Wesley-Professional-Ruby/dp/0321601661/ref=sr_1_1?s=books&amp;amp;ie=UTF8&amp;amp;qid=1305291830&amp;amp;sr=1-1|The Rails 3 Way, 2nd Edition, by Obie Fernandez]&lt;br /&gt;
Obie heads up the Florida-based Rails consultancy, Hashrocket, and was an early adopter of Rails, coming over from the Java camp. He&#039;s been a vocal advocate of best practices in Rails for just about as long as Rails has existed, and his book helps to explain not just how to do things in Rails, but why.&lt;br /&gt;
&lt;br /&gt;
== Pimping your Home Network with DDWRT ==&lt;br /&gt;
&lt;br /&gt;
*[http://www.dd-wrt.com/site/support/router-database DDWRT Database Search]&lt;br /&gt;
*[http://www.dd-wrt.com/wiki/index.php/Repeater_Bridge Creating a wireless bridge]&lt;br /&gt;
*[http://www.pennock.nl/dd-wrt/Multiple_BSSIDs.html Guest Wifi]&lt;br /&gt;
*[https://docs.google.com/leaf?id=1w1FSYX70ejcjo5jaXnvqVe3HGLekPd3I0CW5LnRBrs6RnAOcU8jWBn4ES-Lb&amp;amp;hl=en_US&amp;amp;authkey=CKC21ZMF DDWRT Power Point]&lt;br /&gt;
&lt;br /&gt;
===Parts for a custom home router===&lt;br /&gt;
*[http://www.newegg.com/Product/Product.aspx?Item=N82E16813153154 Motherboard]&lt;br /&gt;
*[http://www.newegg.com/Product/Product.aspx?Item=N82E16820144151 RAM]&lt;br /&gt;
*[http://www.newegg.com/Product/Product.aspx?Item=N82E16822136771 Hard Drive]&lt;br /&gt;
*[http://www.newegg.com/Product/Product.aspx?Item=N82E16811108196 Case]&lt;br /&gt;
&lt;br /&gt;
== LVL1 Summer Camp ==&lt;br /&gt;
&lt;br /&gt;
LVL1 Summer Camp was a workshop that is occurring during the month of June, 2011, taking up every Saturday in June, from 1pm to 5pm.&lt;br /&gt;
&lt;br /&gt;
=== Eagle Workshop ===&lt;br /&gt;
&lt;br /&gt;
==== Links ====&lt;br /&gt;
&lt;br /&gt;
Eagle itself: [http://www.cadsoft.de/download.htm Eagle Download]&lt;br /&gt;
&lt;br /&gt;
Sparkfun parts library used for this workshop: [https://github.com/sparkfun/SparkFun-Eagle-Library/raw/master/SparkFun.lbr Sparkfun Library]&lt;br /&gt;
&lt;br /&gt;
Dangerous Prototypes Parts Library: [http://dangerous-prototypes-open-hardware.googlecode.com/svn/trunk/Eagle_Part_Library/dp_devices.lbr DP Parts Library]&lt;br /&gt;
&lt;br /&gt;
Sparkfun Keyboard Shortcuts, Appropriate for most layouts: [http://www.sparkfun.com/tutorial/BeginningEmbedded/8-EagleSchematics/sfe_eagle_shortcuts.zip Keyboard Shortcuts]&lt;br /&gt;
&lt;br /&gt;
CAM file: [http://www.sparkfun.com/tutorial/BeginningEmbedded/9-EaglePCBs/sfe-gerb274x.cam Sparkfun CAM, appropriate for GoldPhoenix]&lt;br /&gt;
&lt;br /&gt;
==== Board files we created ====&lt;br /&gt;
&lt;br /&gt;
[http://dl.dropbox.com/u/13484341/capsLocker.brd Caps Locker Board File]&lt;br /&gt;
&lt;br /&gt;
[http://dl.dropbox.com/u/13484341/tinyBreakout.brd Caps Locker Schematic File]&lt;br /&gt;
&lt;br /&gt;
[http://dl.dropbox.com/u/13484341/vusbtiny.brd V-USB Tiny Board File]&lt;br /&gt;
&lt;br /&gt;
[http://dl.dropbox.com/u/13484341/vusbtiny.sch V-USB Tiny Schematic File]&lt;br /&gt;
&lt;br /&gt;
==== GadgetLab TriLife blinker files ====&lt;br /&gt;
OK, this wasn&#039;t part of summer camp but it&#039;s here if you want more Eagle practice. [[GadgetLab_Trilife_Blinker]] is an Eagle layout project to route a board that contains about 10 parts and fits in a small footprint. The board controls the brightness of a LED depending on what neighboring boards&#039; LEDs are doing. From the University of Louisville GadgetLab class.&lt;br /&gt;
&lt;br /&gt;
=== Etching Workshop ===&lt;br /&gt;
&lt;br /&gt;
Please See: [http://www.meatandnetworking.com/?p=47 Toner Transfer and Muriatic Acid Etchant: Making PCBs at LVL1]&lt;br /&gt;
&lt;br /&gt;
=== Soldering Workshop ===&lt;br /&gt;
&lt;br /&gt;
[http://wiki.lvl1.org/File:Surface_Mount_Soldering.pdf Summer Camp Soldering Presentation]&lt;br /&gt;
&lt;br /&gt;
If you&#039;d like to create your own, you&#039;ll need these parts:&lt;br /&gt;
&lt;br /&gt;
== V-USB Programmer ==&lt;br /&gt;
&lt;br /&gt;
* 1x AtTiny45, .3&amp;quot; SOIC package&lt;br /&gt;
* 1x Mini-USB B Port (surface mount)&lt;br /&gt;
* 1x Surface Mount Slide Switch (See Sparkfun)&lt;br /&gt;
* 2x 1.5k Ohm, 0805 Resistors&lt;br /&gt;
* 2x 68 Ohm, 0805 Resistors&lt;br /&gt;
* 1x Decoupling Cap&lt;br /&gt;
* 2x 3.3v Zener Diodes, SMB Package (Note: MUST Clamp Voltage to 3.3v)&lt;br /&gt;
* 1x Surface Mount, 6 pin, 2 row terminal block&lt;br /&gt;
&lt;br /&gt;
== Caps Locker ==&lt;br /&gt;
&lt;br /&gt;
* 1x AtTiny45, .3&amp;quot; SOIC package&lt;br /&gt;
* 2x 68 Ohm 0805 Resistors&lt;br /&gt;
* 1x 1.5k Ohm 0805 Resistors&lt;br /&gt;
* 1x Surface Mount, 6 pin, 2 row terminal block&lt;br /&gt;
&lt;br /&gt;
=== Programming Workshop === &lt;br /&gt;
&lt;br /&gt;
[http://wiki.lvl1.org/File:Presentationn.pdf Presentation with Notes]&lt;br /&gt;
&lt;br /&gt;
For Code, see [[Resources and Code]]&lt;br /&gt;
&lt;br /&gt;
== Tinkering to Commercialization Workshop ==&lt;br /&gt;
[[Media:Tinkering_To_Commercialization_-_August_2011.pdf|Tinkering to Commercialization Presentation]]&lt;br /&gt;
&lt;br /&gt;
== KiCad Workshop (1/21/12) ==&lt;br /&gt;
&lt;br /&gt;
[http://wiki.lvl1.org/File:KiCad.pdf Kicad Presentation]&lt;br /&gt;
[meatandnetworking.com/w/Kicad_Resources More KiCad links and resources]&lt;br /&gt;
&lt;br /&gt;
== Freeduino Games (Gadget Lab at U of Louisville) ==&lt;br /&gt;
Add some games to the Freeduino Frenzy/Spring Training workshops!&lt;br /&gt;
*[[Freeduino Games]]&lt;br /&gt;
&lt;br /&gt;
== Trilife Workshop (Gadget Lab at U of Louisville + LVL1) ==&lt;br /&gt;
Learn to solder by building a small board that interacts with others in a giant array.&lt;br /&gt;
*[[Trilife Workshop]]&lt;/div&gt;</summary>
		<author><name>Ckharnett</name></author>
	</entry>
	<entry>
		<id>http://wiki.lvl1.org/index.php?title=Workshops&amp;diff=4016</id>
		<title>Workshops</title>
		<link rel="alternate" type="text/html" href="http://wiki.lvl1.org/index.php?title=Workshops&amp;diff=4016"/>
		<updated>2012-04-29T03:52:07Z</updated>

		<summary type="html">&lt;p&gt;Ckharnett: added Trilife Workshop&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page is a free resource for all learning materials used in LVL1 workshops. Check our [[Calendar]] to see what LVL1 workshops are on the horizon! Enjoy!&lt;br /&gt;
&lt;br /&gt;
== How to Solder ==&lt;br /&gt;
* [[media:soldercomic.pdf|Soldering is Easy Comic]]&lt;br /&gt;
&lt;br /&gt;
== Solder Your Own Freeduino ==&lt;br /&gt;
*[http://www.arduino.cc/en/Main/Software Download Arduino Software] the Arduino software and install.&lt;br /&gt;
*[http://arduino.cc/en/Tutorial/HomePage Arduino Tutorials] Arduino Tutorials&lt;br /&gt;
*[[Media:Solder_your_own_freeduino_handout.pdf|Solder Your Own Freeduino Instructions PDF]]&lt;br /&gt;
*[[Media:Solder_your_own_freeduino_handout.odp|Solder Your Own Freeduino Instructions Open Office Presentation]]&lt;br /&gt;
*[[Media:ResistorQV.pdf|Resistor Color Code PDF]]&lt;br /&gt;
*[[Media:Arduino_cheat_sheet_v02c.pdf|Arduino Cheatsheet PDF]]&lt;br /&gt;
&lt;br /&gt;
== Freeduino Spring Training ==&lt;br /&gt;
&lt;br /&gt;
http://wiki.lvl1.org/Freediuino_Spring_Training&lt;br /&gt;
&lt;br /&gt;
Below are the lessons for the Freeduino Spring Training.  They are Creative Commons licensed, so share and use.  Pass them along.  If there are issues (bugs) with the instruction, code or circuits, then email me brian_at_lvl1.org.  The breadboard and schematic pictures are drawn using the [http://www.fritzing.org Fritzing] Program.  Try Fritzing out - it is really cool! &lt;br /&gt;
&lt;br /&gt;
*[[1st Inning]] - Arduino and Breadboard setup, Power&lt;br /&gt;
*[[2nd Inning]] - Blinking LED&lt;br /&gt;
*[[3rd Inning]] - Tri-Color LED fading&lt;br /&gt;
*[[4th Inning]] - LCD display&lt;br /&gt;
*[[5th Inning]] - Pushbutton switches&lt;br /&gt;
*[[6th Inning]] - Potentiometers and voltage dividers&lt;br /&gt;
*[[7th Inning]] - Photocell, Thermistor&lt;br /&gt;
*[[8th Inning]] - Spin a motor, transistors and diodes&lt;br /&gt;
*[[9th Inning]] - Sounds and speakers&lt;br /&gt;
&lt;br /&gt;
== February Freeduino Frenzy ==&lt;br /&gt;
[[February Freeduino Frenzy]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Learn To Solder with Mitch Altman and Jimmie Rodgers ==&lt;br /&gt;
*[[Media:LearnToSolderWithMitch.odt|Flyer for the workshop in OOO Writer format.]]&lt;br /&gt;
*[[Media:LearnToSolderWithMitch.pdf|Flyer for the workshop in PDF format.]]&lt;br /&gt;
&lt;br /&gt;
== Intermediate Microcontroller Workshop, &amp;quot;Beyond Arduino&amp;quot; == &lt;br /&gt;
*[http://drop.io/kt3wfh7 Presentation] - The Powerpoint Presentation used in the workshop, with notes.&lt;br /&gt;
*[[Resources and Code]] - The files used during the course of this workshop.&lt;br /&gt;
*[[Parts]] - Parts used in this workshop&lt;br /&gt;
*[[Media:Lvl1_avr_workshop.svg|Flyer for the workshop in SVG Format.]]&lt;br /&gt;
*[[Media:Lvl1_avr_workshop.pdf|Flyer for the workshop in PDF Format.]]&lt;br /&gt;
&lt;br /&gt;
== TV-B-Gone Workshop ==&lt;br /&gt;
*[[Media:Tv-b-gone.odp|TV-B-Gone instructions Open Office Presentation]]&lt;br /&gt;
*[[Media:Tv-b-gone.pdf|TV-B-Gone instructions PDF]]&lt;br /&gt;
&lt;br /&gt;
== Minti Boost Workshop ==&lt;br /&gt;
[[MintiBoost]] Workshop Information for 12/6/10 and 12/18/10&lt;br /&gt;
&lt;br /&gt;
== Android Game Workshop ==&lt;br /&gt;
*[https://docs.google.com/viewer?a=v&amp;amp;pid=explorer&amp;amp;chrome=true&amp;amp;srcid=0B4p7lji7MVk7NGU3Zjk1NDUtMTliMS00NzFhLTg4YTMtNjMzMjQ1ZWIxMzVm&amp;amp;hl=en&amp;amp;authkey=CLqd-usM] Android Slides PDF&lt;br /&gt;
*[https://docs.google.com/leaf?id=0B4p7lji7MVk7YjBlN2Q1OTYtNjIyZS00MmZiLWIzMGMtYzMxMmNmZTQ0MGRm&amp;amp;hl=en&amp;amp;authkey=CMHRx3E] Android Sample App&lt;br /&gt;
&lt;br /&gt;
== Ruby on Rails Workshop ==&lt;br /&gt;
==== Source Code &amp;amp; Notes ====&lt;br /&gt;
*[https://docs.google.com/leaf?id=0Bzy184pfAcrUMThkNGVjMmItMWVmNS00OTM2LTg3ZTctOWY5MDk1MDdjY2Mx&amp;amp;hl=en&amp;amp;authkey=CP_Qo5kI] blog.zip&lt;br /&gt;
==== References ====&lt;br /&gt;
*[http://www.amazon.com/Design-Patterns-Ruby-Russ-Olsen/dp/0321490452/ref=sr_1_1?ie=UTF8&amp;amp;qid=1305291175&amp;amp;sr=8-1|Design Patterns in Ruby, by Russ Olsen]&lt;br /&gt;
This book is both very readable (a rarity in tech books) and a fantastic introduction to Ruby for someone familiar with the GoF design pattern implementations in other languages. It has a quick Ruby syntax primer in the beginning, then jumps straight into the patterns.&lt;br /&gt;
&lt;br /&gt;
*[http://www.amazon.com/Programming-Ruby-1-9-Pragmatic-Programmers/dp/1934356085/ref=sr_1_1?s=books&amp;amp;ie=UTF8&amp;amp;qid=1305291335&amp;amp;sr=1-1|Programming Ruby 1.9, by Dave Thomas, Chad Fowler, and Andy Hunt]&lt;br /&gt;
This is the latest edition of the book commonly known as &amp;quot;The Pickaxe&amp;quot; in the Ruby community -- in its first edition, it was the first comprehensive English-language reference for Ruby, and was therefore indispensable to someone just getting started with the language. The latest edition is still a great reference book to have around.&lt;br /&gt;
&lt;br /&gt;
*[http://www.amazon.com/Agile-Development-Rails-Pragmatic-Programmers/dp/1934356549/ref=sr_1_1?ie=UTF8&amp;amp;qid=1305291555&amp;amp;sr=8-1|Agile Web Development with Rails, 4th Edition, by Sam Ruby, Dave Thomas, and David Heinemeier Hansson]&lt;br /&gt;
Agile Web Development was co-authored by David Heinemeier Hansson, the creator of Rails, and was the closest thing that the Rails community had to &amp;quot;The Pickaxe&amp;quot; for Ruby, in its first edition. The authors have done a great job of cleaning it up and keeping it relevant, and the latest version covers Rails 3.&lt;br /&gt;
&lt;br /&gt;
*[http://www.amazon.com/Rails-Way-Addison-Wesley-Professional-Ruby/dp/0321601661/ref=sr_1_1?s=books&amp;amp;ie=UTF8&amp;amp;qid=1305291830&amp;amp;sr=1-1|The Rails 3 Way, 2nd Edition, by Obie Fernandez]&lt;br /&gt;
Obie heads up the Florida-based Rails consultancy, Hashrocket, and was an early adopter of Rails, coming over from the Java camp. He&#039;s been a vocal advocate of best practices in Rails for just about as long as Rails has existed, and his book helps to explain not just how to do things in Rails, but why.&lt;br /&gt;
&lt;br /&gt;
== Pimping your Home Network with DDWRT ==&lt;br /&gt;
&lt;br /&gt;
*[http://www.dd-wrt.com/site/support/router-database DDWRT Database Search]&lt;br /&gt;
*[http://www.dd-wrt.com/wiki/index.php/Repeater_Bridge Creating a wireless bridge]&lt;br /&gt;
*[http://www.pennock.nl/dd-wrt/Multiple_BSSIDs.html Guest Wifi]&lt;br /&gt;
*[https://docs.google.com/leaf?id=1w1FSYX70ejcjo5jaXnvqVe3HGLekPd3I0CW5LnRBrs6RnAOcU8jWBn4ES-Lb&amp;amp;hl=en_US&amp;amp;authkey=CKC21ZMF DDWRT Power Point]&lt;br /&gt;
&lt;br /&gt;
===Parts for a custom home router===&lt;br /&gt;
*[http://www.newegg.com/Product/Product.aspx?Item=N82E16813153154 Motherboard]&lt;br /&gt;
*[http://www.newegg.com/Product/Product.aspx?Item=N82E16820144151 RAM]&lt;br /&gt;
*[http://www.newegg.com/Product/Product.aspx?Item=N82E16822136771 Hard Drive]&lt;br /&gt;
*[http://www.newegg.com/Product/Product.aspx?Item=N82E16811108196 Case]&lt;br /&gt;
&lt;br /&gt;
== LVL1 Summer Camp ==&lt;br /&gt;
&lt;br /&gt;
LVL1 Summer Camp was a workshop that is occurring during the month of June, 2011, taking up every Saturday in June, from 1pm to 5pm.&lt;br /&gt;
&lt;br /&gt;
=== Eagle Workshop ===&lt;br /&gt;
&lt;br /&gt;
==== Links ====&lt;br /&gt;
&lt;br /&gt;
Eagle itself: [http://www.cadsoft.de/download.htm Eagle Download]&lt;br /&gt;
&lt;br /&gt;
Sparkfun parts library used for this workshop: [https://github.com/sparkfun/SparkFun-Eagle-Library/raw/master/SparkFun.lbr Sparkfun Library]&lt;br /&gt;
&lt;br /&gt;
Dangerous Prototypes Parts Library: [http://dangerous-prototypes-open-hardware.googlecode.com/svn/trunk/Eagle_Part_Library/dp_devices.lbr DP Parts Library]&lt;br /&gt;
&lt;br /&gt;
Sparkfun Keyboard Shortcuts, Appropriate for most layouts: [http://www.sparkfun.com/tutorial/BeginningEmbedded/8-EagleSchematics/sfe_eagle_shortcuts.zip Keyboard Shortcuts]&lt;br /&gt;
&lt;br /&gt;
CAM file: [http://www.sparkfun.com/tutorial/BeginningEmbedded/9-EaglePCBs/sfe-gerb274x.cam Sparkfun CAM, appropriate for GoldPhoenix]&lt;br /&gt;
&lt;br /&gt;
==== Board files we created ====&lt;br /&gt;
&lt;br /&gt;
[http://dl.dropbox.com/u/13484341/capsLocker.brd Caps Locker Board File]&lt;br /&gt;
&lt;br /&gt;
[http://dl.dropbox.com/u/13484341/tinyBreakout.brd Caps Locker Schematic File]&lt;br /&gt;
&lt;br /&gt;
[http://dl.dropbox.com/u/13484341/vusbtiny.brd V-USB Tiny Board File]&lt;br /&gt;
&lt;br /&gt;
[http://dl.dropbox.com/u/13484341/vusbtiny.sch V-USB Tiny Schematic File]&lt;br /&gt;
&lt;br /&gt;
==== GadgetLab TriLife blinker files ====&lt;br /&gt;
[[GadgetLab_Trilife_Blinker]] is an Eagle layout project to route a board that contains about 10 parts and fits in a small footprint. The board controls the brightness of a LED depending on what neighboring boards&#039; LEDs are doing. From the University of Louisville GadgetLab class.&lt;br /&gt;
&lt;br /&gt;
=== Etching Workshop ===&lt;br /&gt;
&lt;br /&gt;
Please See: [http://www.meatandnetworking.com/?p=47 Toner Transfer and Muriatic Acid Etchant: Making PCBs at LVL1]&lt;br /&gt;
&lt;br /&gt;
=== Soldering Workshop ===&lt;br /&gt;
&lt;br /&gt;
[http://wiki.lvl1.org/File:Surface_Mount_Soldering.pdf Summer Camp Soldering Presentation]&lt;br /&gt;
&lt;br /&gt;
If you&#039;d like to create your own, you&#039;ll need these parts:&lt;br /&gt;
&lt;br /&gt;
== V-USB Programmer ==&lt;br /&gt;
&lt;br /&gt;
* 1x AtTiny45, .3&amp;quot; SOIC package&lt;br /&gt;
* 1x Mini-USB B Port (surface mount)&lt;br /&gt;
* 1x Surface Mount Slide Switch (See Sparkfun)&lt;br /&gt;
* 2x 1.5k Ohm, 0805 Resistors&lt;br /&gt;
* 2x 68 Ohm, 0805 Resistors&lt;br /&gt;
* 1x Decoupling Cap&lt;br /&gt;
* 2x 3.3v Zener Diodes, SMB Package (Note: MUST Clamp Voltage to 3.3v)&lt;br /&gt;
* 1x Surface Mount, 6 pin, 2 row terminal block&lt;br /&gt;
&lt;br /&gt;
== Caps Locker ==&lt;br /&gt;
&lt;br /&gt;
* 1x AtTiny45, .3&amp;quot; SOIC package&lt;br /&gt;
* 2x 68 Ohm 0805 Resistors&lt;br /&gt;
* 1x 1.5k Ohm 0805 Resistors&lt;br /&gt;
* 1x Surface Mount, 6 pin, 2 row terminal block&lt;br /&gt;
&lt;br /&gt;
=== Programming Workshop === &lt;br /&gt;
&lt;br /&gt;
[http://wiki.lvl1.org/File:Presentationn.pdf Presentation with Notes]&lt;br /&gt;
&lt;br /&gt;
For Code, see [[Resources and Code]]&lt;br /&gt;
&lt;br /&gt;
== Tinkering to Commercialization Workshop ==&lt;br /&gt;
[[Media:Tinkering_To_Commercialization_-_August_2011.pdf|Tinkering to Commercialization Presentation]]&lt;br /&gt;
&lt;br /&gt;
== KiCad Workshop (1/21/12) ==&lt;br /&gt;
&lt;br /&gt;
[http://wiki.lvl1.org/File:KiCad.pdf Kicad Presentation]&lt;br /&gt;
[meatandnetworking.com/w/Kicad_Resources More KiCad links and resources]&lt;br /&gt;
&lt;br /&gt;
== Freeduino Games (Gadget Lab at U of Louisville) ==&lt;br /&gt;
Add some games to the Freeduino Frenzy/Spring Training workshops!&lt;br /&gt;
*[[Freeduino Games]]&lt;br /&gt;
&lt;br /&gt;
== Trilife Workshop (Gadget Lab at U of Louisville + LVL1) ==&lt;br /&gt;
Learn to solder by building a small board that interacts with others in a giant array.&lt;br /&gt;
*[[Trilife Workshop]]&lt;/div&gt;</summary>
		<author><name>Ckharnett</name></author>
	</entry>
	<entry>
		<id>http://wiki.lvl1.org/index.php?title=GadgetLab_Trilife_Blinker&amp;diff=3916</id>
		<title>GadgetLab Trilife Blinker</title>
		<link rel="alternate" type="text/html" href="http://wiki.lvl1.org/index.php?title=GadgetLab_Trilife_Blinker&amp;diff=3916"/>
		<updated>2012-04-05T17:28:57Z</updated>

		<summary type="html">&lt;p&gt;Ckharnett: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The TriLife circuit lights a LED depending on what three neighboring TriLife circuits are doing. It&#039;s like the Game of Life on a triangular grid.*&lt;br /&gt;
&lt;br /&gt;
It&#039;s working on a breadboard--there&#039;s one microcontroller**, one LED***, a few resistors and a capacitor. Let&#039;s get boards made so 10, 20, or 400 people can solder one board each, then assemble all into a giant display! We&#039;ll need to add lots of connectors (three per board plus an optional programming connector). &lt;br /&gt;
&lt;br /&gt;
We could use some help laying out the wires according to the netlist. [[http://wiki.lvl1.org/File:GadgetLabNetlist.pdf]].&lt;br /&gt;
&lt;br /&gt;
Eagle is popular but the free version limits your board size. We also need power jacks and a couple connectors that are just wires, so that every LED can connect to three neighbors. I put the parts on the board in a small footprint that will meet these needs. &lt;br /&gt;
Here it is without any wiring--you would have to use the netlist to complete the schematic:&lt;br /&gt;
[http://www.lvl1.org/wp-content/uploads/2012/04/GadgetLabEagleProjectUnwired.zip]&lt;br /&gt;
Here it is with the schematic wired up but without any wires drawn on the board yet: &lt;br /&gt;
[http://www.lvl1.org/wp-content/uploads/2012/04/GadgetLabEagleProjectWithAirwires.zip]&lt;br /&gt;
Can you route the wires without moving any of the parts? You can add vias--holes through the board--that let you do crossovers. It&#039;s a 2-layer board. &lt;br /&gt;
&lt;br /&gt;
Other design considerations: What happens if one board gets plugged in backwards; will it fry the whole thing? (The purpose of three of the resistors is to protect the microcontroller in case this happens). Can you label it so it&#039;s really hard to plug things in upside down or backwards? We can also get special connectors that won&#039;t plug in the wrong way. Connectors are the most expensive part of this kit.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;*&amp;lt;/pre&amp;gt;It&#039;s really a clockless 4-state Greenberg-Hastings cellular automaton but that&#039;s not important right now.&lt;br /&gt;
&amp;lt;pre&amp;gt;**&amp;lt;/pre&amp;gt;The microcontroller is a PIC10F322, one of the tiniest available microcontrollers. It takes turns listening on each of three input pins--one for each neighbor. It discovers the brightness of the three neighbors&#039; LEDs, then adjusts its own LED accordingly. An onboard temperature sensor can be used for randomizing the startup state.&lt;br /&gt;
&amp;lt;pre&amp;gt;***&amp;lt;/pre&amp;gt;It&#039;s a regular LED. We control the brightness using pulse width modulation. There are four LED settings: dim, bright, brighter, brightest.&lt;/div&gt;</summary>
		<author><name>Ckharnett</name></author>
	</entry>
	<entry>
		<id>http://wiki.lvl1.org/index.php?title=GadgetLab_Trilife_Blinker&amp;diff=3915</id>
		<title>GadgetLab Trilife Blinker</title>
		<link rel="alternate" type="text/html" href="http://wiki.lvl1.org/index.php?title=GadgetLab_Trilife_Blinker&amp;diff=3915"/>
		<updated>2012-04-05T17:26:50Z</updated>

		<summary type="html">&lt;p&gt;Ckharnett: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The TriLife circuit lights a LED depending on what three neighboring TriLife circuits are doing. It&#039;s like the Game of Life on a triangular grid.*&lt;br /&gt;
&lt;br /&gt;
It&#039;s working on a breadboard--there&#039;s one microcontroller**, one LED***, a few resistors and a capacitor. Let&#039;s get boards made so 10, 20, or 400 people can solder one board each, then assemble all into a giant display! We&#039;ll need to add lots of connectors (three per board plus an optional programming connector). &lt;br /&gt;
&lt;br /&gt;
We could use some help laying out the wires according to the netlist. [[http://wiki.lvl1.org/File:GadgetLabNetlist.pdf]].&lt;br /&gt;
&lt;br /&gt;
Eagle is popular but the free version limits your board size. We also need power jacks and a couple connectors that are just wires, so that every LED can connect to three neighbors. I put the parts on the board in a small footprint that will meet these needs. &lt;br /&gt;
Here it is without any wiring--you would have to use the netlist to complete the schematic:&lt;br /&gt;
[http://www.lvl1.org/wp-admin/media.php?attachment_id=674&amp;amp;action=edit]&lt;br /&gt;
Here it is with the schematic wired up but without any wires drawn on the board yet: &lt;br /&gt;
[http://www.lvl1.org/wp-admin/media.php?attachment_id=675&amp;amp;action=edit]&lt;br /&gt;
Can you route the wires without moving any of the parts? You can add vias--holes through the board--that let you do crossovers. It&#039;s a 2-layer board. &lt;br /&gt;
&lt;br /&gt;
Other design considerations: What happens if one board gets plugged in backwards; will it fry the whole thing? (The purpose of three of the resistors is to protect the microcontroller in case this happens). Can you label it so it&#039;s really hard to plug things in upside down or backwards? We can also get special connectors that won&#039;t plug in the wrong way. Connectors are the most expensive part of this kit.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;*&amp;lt;/pre&amp;gt;It&#039;s really a clockless 4-state Greenberg-Hastings cellular automaton but that&#039;s not important right now.&lt;br /&gt;
&amp;lt;pre&amp;gt;**&amp;lt;/pre&amp;gt;The microcontroller is a PIC10F322, one of the tiniest available microcontrollers. It takes turns listening on each of three input pins--one for each neighbor. It discovers the brightness of the three neighbors&#039; LEDs, then adjusts its own LED accordingly. An onboard temperature sensor can be used for randomizing the startup state.&lt;br /&gt;
&amp;lt;pre&amp;gt;***&amp;lt;/pre&amp;gt;It&#039;s a regular LED. We control the brightness using pulse width modulation. There are four LED settings: dim, bright, brighter, brightest.&lt;/div&gt;</summary>
		<author><name>Ckharnett</name></author>
	</entry>
	<entry>
		<id>http://wiki.lvl1.org/index.php?title=GadgetLab_Trilife_Blinker&amp;diff=3914</id>
		<title>GadgetLab Trilife Blinker</title>
		<link rel="alternate" type="text/html" href="http://wiki.lvl1.org/index.php?title=GadgetLab_Trilife_Blinker&amp;diff=3914"/>
		<updated>2012-04-05T09:00:23Z</updated>

		<summary type="html">&lt;p&gt;Ckharnett: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The TriLife circuit lights a LED depending on what three neighboring TriLife circuits are doing. It&#039;s like the Game of Life on a triangular grid.*&lt;br /&gt;
&lt;br /&gt;
It&#039;s working on a breadboard--there&#039;s one microcontroller**, one LED***, a few resistors and a capacitor. Let&#039;s get boards made so 10, 20, or 400 people can solder one board each, then assemble all into a giant display! We&#039;ll need to add lots of connectors (three per board plus an optional programming connector). &lt;br /&gt;
&lt;br /&gt;
We could use some help laying out the wires according to the netlist. [[http://wiki.lvl1.org/File:GadgetLabNetlist.pdf]].&lt;br /&gt;
&lt;br /&gt;
Eagle is popular but the free version limits your board size. We also need power jacks and a couple connectors that are just wires, so that every LED can connect to three neighbors. I put the parts on the board in a small footprint that will meet these needs. Can you route the wires without moving any of the parts? You can add vias--holes through the board--that let you do crossovers. It&#039;s a 2-layer board. &lt;br /&gt;
&lt;br /&gt;
Other design considerations: What happens if one board gets plugged in backwards; will it fry the whole thing? (The purpose of three of the resistors is to protect the microcontroller in case this happens). Can you label it so it&#039;s really hard to plug things in upside down or backwards? We can also get special connectors that won&#039;t plug in the wrong way. Connectors are the most expensive part of this kit.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;*&amp;lt;/pre&amp;gt;It&#039;s really a clockless 4-state Greenberg-Hastings cellular automaton but that&#039;s not important right now.&lt;br /&gt;
&amp;lt;pre&amp;gt;**&amp;lt;/pre&amp;gt;The microcontroller is a PIC10F322, one of the tiniest available microcontrollers. It takes turns listening on each of three input pins--one for each neighbor. It discovers the brightness of the three neighbors&#039; LEDs, then adjusts its own LED accordingly. An onboard temperature sensor can be used for randomizing the startup state.&lt;br /&gt;
&amp;lt;pre&amp;gt;***&amp;lt;/pre&amp;gt;It&#039;s a regular LED. We control the brightness using pulse width modulation. There are four LED settings: dim, bright, brighter, brightest.&lt;/div&gt;</summary>
		<author><name>Ckharnett</name></author>
	</entry>
	<entry>
		<id>http://wiki.lvl1.org/index.php?title=File:GadgetLabNetlist.pdf&amp;diff=3913</id>
		<title>File:GadgetLabNetlist.pdf</title>
		<link rel="alternate" type="text/html" href="http://wiki.lvl1.org/index.php?title=File:GadgetLabNetlist.pdf&amp;diff=3913"/>
		<updated>2012-04-05T08:57:39Z</updated>

		<summary type="html">&lt;p&gt;Ckharnett: Trilife netlist and comments&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Trilife netlist and comments&lt;/div&gt;</summary>
		<author><name>Ckharnett</name></author>
	</entry>
	<entry>
		<id>http://wiki.lvl1.org/index.php?title=Workshops&amp;diff=3912</id>
		<title>Workshops</title>
		<link rel="alternate" type="text/html" href="http://wiki.lvl1.org/index.php?title=Workshops&amp;diff=3912"/>
		<updated>2012-04-05T08:45:28Z</updated>

		<summary type="html">&lt;p&gt;Ckharnett: /* GadgetLab TriLife blinker files */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page is a free resource for all learning materials used in LVL1 workshops. Check our [[Calendar]] to see what LVL1 workshops are on the horizon! Enjoy!&lt;br /&gt;
&lt;br /&gt;
== How to Solder ==&lt;br /&gt;
* [[media:soldercomic.pdf|Soldering is Easy Comic]]&lt;br /&gt;
&lt;br /&gt;
== Solder Your Own Freeduino ==&lt;br /&gt;
*[http://www.arduino.cc/en/Main/Software Download Arduino Software] the Arduino software and install.&lt;br /&gt;
*[http://arduino.cc/en/Tutorial/HomePage Arduino Tutorials] Arduino Tutorials&lt;br /&gt;
*[[Media:Solder_your_own_freeduino_handout.pdf|Solder Your Own Freeduino Instructions PDF]]&lt;br /&gt;
*[[Media:Solder_your_own_freeduino_handout.odp|Solder Your Own Freeduino Instructions Open Office Presentation]]&lt;br /&gt;
*[[Media:ResistorQV.pdf|Resistor Color Code PDF]]&lt;br /&gt;
*[[Media:Arduino_cheat_sheet_v02c.pdf|Arduino Cheatsheet PDF]]&lt;br /&gt;
&lt;br /&gt;
== Freeduino Spring Training ==&lt;br /&gt;
&lt;br /&gt;
http://wiki.lvl1.org/Freediuino_Spring_Training&lt;br /&gt;
&lt;br /&gt;
Below are the lessons for the Freeduino Spring Training.  They are Creative Commons licensed, so share and use.  Pass them along.  If there are issues (bugs) with the instruction, code or circuits, then email me brian_at_lvl1.org.  The breadboard and schematic pictures are drawn using the [http://www.fritzing.org Fritzing] Program.  Try Fritzing out - it is really cool! &lt;br /&gt;
&lt;br /&gt;
*[[1st Inning]] - Arduino and Breadboard setup, Power&lt;br /&gt;
*[[2nd Inning]] - Blinking LED&lt;br /&gt;
*[[3rd Inning]] - Tri-Color LED fading&lt;br /&gt;
*[[4th Inning]] - LCD display&lt;br /&gt;
*[[5th Inning]] - Pushbutton switches&lt;br /&gt;
*[[6th Inning]] - Potentiometers and voltage dividers&lt;br /&gt;
*[[7th Inning]] - Photocell, Thermistor&lt;br /&gt;
*[[8th Inning]] - Spin a motor, transistors and diodes&lt;br /&gt;
*[[9th Inning]] - Sounds and speakers&lt;br /&gt;
&lt;br /&gt;
== February Freeduino Frenzy ==&lt;br /&gt;
[[February Freeduino Frenzy]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Learn To Solder with Mitch Altman and Jimmie Rodgers ==&lt;br /&gt;
*[[Media:LearnToSolderWithMitch.odt|Flyer for the workshop in OOO Writer format.]]&lt;br /&gt;
*[[Media:LearnToSolderWithMitch.pdf|Flyer for the workshop in PDF format.]]&lt;br /&gt;
&lt;br /&gt;
== Intermediate Microcontroller Workshop, &amp;quot;Beyond Arduino&amp;quot; == &lt;br /&gt;
*[http://drop.io/kt3wfh7 Presentation] - The Powerpoint Presentation used in the workshop, with notes.&lt;br /&gt;
*[[Resources and Code]] - The files used during the course of this workshop.&lt;br /&gt;
*[[Parts]] - Parts used in this workshop&lt;br /&gt;
*[[Media:Lvl1_avr_workshop.svg|Flyer for the workshop in SVG Format.]]&lt;br /&gt;
*[[Media:Lvl1_avr_workshop.pdf|Flyer for the workshop in PDF Format.]]&lt;br /&gt;
&lt;br /&gt;
== TV-B-Gone Workshop ==&lt;br /&gt;
*[[Media:Tv-b-gone.odp|TV-B-Gone instructions Open Office Presentation]]&lt;br /&gt;
*[[Media:Tv-b-gone.pdf|TV-B-Gone instructions PDF]]&lt;br /&gt;
&lt;br /&gt;
== Minti Boost Workshop ==&lt;br /&gt;
[[MintiBoost]] Workshop Information for 12/6/10 and 12/18/10&lt;br /&gt;
&lt;br /&gt;
== Android Game Workshop ==&lt;br /&gt;
*[https://docs.google.com/viewer?a=v&amp;amp;pid=explorer&amp;amp;chrome=true&amp;amp;srcid=0B4p7lji7MVk7NGU3Zjk1NDUtMTliMS00NzFhLTg4YTMtNjMzMjQ1ZWIxMzVm&amp;amp;hl=en&amp;amp;authkey=CLqd-usM] Android Slides PDF&lt;br /&gt;
*[https://docs.google.com/leaf?id=0B4p7lji7MVk7YjBlN2Q1OTYtNjIyZS00MmZiLWIzMGMtYzMxMmNmZTQ0MGRm&amp;amp;hl=en&amp;amp;authkey=CMHRx3E] Android Sample App&lt;br /&gt;
&lt;br /&gt;
== Ruby on Rails Workshop ==&lt;br /&gt;
==== Source Code &amp;amp; Notes ====&lt;br /&gt;
*[https://docs.google.com/leaf?id=0Bzy184pfAcrUMThkNGVjMmItMWVmNS00OTM2LTg3ZTctOWY5MDk1MDdjY2Mx&amp;amp;hl=en&amp;amp;authkey=CP_Qo5kI] blog.zip&lt;br /&gt;
==== References ====&lt;br /&gt;
*[http://www.amazon.com/Design-Patterns-Ruby-Russ-Olsen/dp/0321490452/ref=sr_1_1?ie=UTF8&amp;amp;qid=1305291175&amp;amp;sr=8-1|Design Patterns in Ruby, by Russ Olsen]&lt;br /&gt;
This book is both very readable (a rarity in tech books) and a fantastic introduction to Ruby for someone familiar with the GoF design pattern implementations in other languages. It has a quick Ruby syntax primer in the beginning, then jumps straight into the patterns.&lt;br /&gt;
&lt;br /&gt;
*[http://www.amazon.com/Programming-Ruby-1-9-Pragmatic-Programmers/dp/1934356085/ref=sr_1_1?s=books&amp;amp;ie=UTF8&amp;amp;qid=1305291335&amp;amp;sr=1-1|Programming Ruby 1.9, by Dave Thomas, Chad Fowler, and Andy Hunt]&lt;br /&gt;
This is the latest edition of the book commonly known as &amp;quot;The Pickaxe&amp;quot; in the Ruby community -- in its first edition, it was the first comprehensive English-language reference for Ruby, and was therefore indispensable to someone just getting started with the language. The latest edition is still a great reference book to have around.&lt;br /&gt;
&lt;br /&gt;
*[http://www.amazon.com/Agile-Development-Rails-Pragmatic-Programmers/dp/1934356549/ref=sr_1_1?ie=UTF8&amp;amp;qid=1305291555&amp;amp;sr=8-1|Agile Web Development with Rails, 4th Edition, by Sam Ruby, Dave Thomas, and David Heinemeier Hansson]&lt;br /&gt;
Agile Web Development was co-authored by David Heinemeier Hansson, the creator of Rails, and was the closest thing that the Rails community had to &amp;quot;The Pickaxe&amp;quot; for Ruby, in its first edition. The authors have done a great job of cleaning it up and keeping it relevant, and the latest version covers Rails 3.&lt;br /&gt;
&lt;br /&gt;
*[http://www.amazon.com/Rails-Way-Addison-Wesley-Professional-Ruby/dp/0321601661/ref=sr_1_1?s=books&amp;amp;ie=UTF8&amp;amp;qid=1305291830&amp;amp;sr=1-1|The Rails 3 Way, 2nd Edition, by Obie Fernandez]&lt;br /&gt;
Obie heads up the Florida-based Rails consultancy, Hashrocket, and was an early adopter of Rails, coming over from the Java camp. He&#039;s been a vocal advocate of best practices in Rails for just about as long as Rails has existed, and his book helps to explain not just how to do things in Rails, but why.&lt;br /&gt;
&lt;br /&gt;
== Pimping your Home Network with DDWRT ==&lt;br /&gt;
&lt;br /&gt;
*[http://www.dd-wrt.com/site/support/router-database DDWRT Database Search]&lt;br /&gt;
*[http://www.dd-wrt.com/wiki/index.php/Repeater_Bridge Creating a wireless bridge]&lt;br /&gt;
*[http://www.pennock.nl/dd-wrt/Multiple_BSSIDs.html Guest Wifi]&lt;br /&gt;
*[https://docs.google.com/leaf?id=1w1FSYX70ejcjo5jaXnvqVe3HGLekPd3I0CW5LnRBrs6RnAOcU8jWBn4ES-Lb&amp;amp;hl=en_US&amp;amp;authkey=CKC21ZMF DDWRT Power Point]&lt;br /&gt;
&lt;br /&gt;
===Parts for a custom home router===&lt;br /&gt;
*[http://www.newegg.com/Product/Product.aspx?Item=N82E16813153154 Motherboard]&lt;br /&gt;
*[http://www.newegg.com/Product/Product.aspx?Item=N82E16820144151 RAM]&lt;br /&gt;
*[http://www.newegg.com/Product/Product.aspx?Item=N82E16822136771 Hard Drive]&lt;br /&gt;
*[http://www.newegg.com/Product/Product.aspx?Item=N82E16811108196 Case]&lt;br /&gt;
&lt;br /&gt;
== LVL1 Summer Camp ==&lt;br /&gt;
&lt;br /&gt;
LVL1 Summer Camp was a workshop that is occurring during the month of June, 2011, taking up every Saturday in June, from 1pm to 5pm.&lt;br /&gt;
&lt;br /&gt;
=== Eagle Workshop ===&lt;br /&gt;
&lt;br /&gt;
==== Links ====&lt;br /&gt;
&lt;br /&gt;
Eagle itself: [http://www.cadsoft.de/download.htm Eagle Download]&lt;br /&gt;
&lt;br /&gt;
Sparkfun parts library used for this workshop: [https://github.com/sparkfun/SparkFun-Eagle-Library/raw/master/SparkFun.lbr Sparkfun Library]&lt;br /&gt;
&lt;br /&gt;
Dangerous Prototypes Parts Library: [http://dangerous-prototypes-open-hardware.googlecode.com/svn/trunk/Eagle_Part_Library/dp_devices.lbr DP Parts Library]&lt;br /&gt;
&lt;br /&gt;
Sparkfun Keyboard Shortcuts, Appropriate for most layouts: [http://www.sparkfun.com/tutorial/BeginningEmbedded/8-EagleSchematics/sfe_eagle_shortcuts.zip Keyboard Shortcuts]&lt;br /&gt;
&lt;br /&gt;
CAM file: [http://www.sparkfun.com/tutorial/BeginningEmbedded/9-EaglePCBs/sfe-gerb274x.cam Sparkfun CAM, appropriate for GoldPhoenix]&lt;br /&gt;
&lt;br /&gt;
==== Board files we created ====&lt;br /&gt;
&lt;br /&gt;
[http://dl.dropbox.com/u/13484341/capsLocker.brd Caps Locker Board File]&lt;br /&gt;
&lt;br /&gt;
[http://dl.dropbox.com/u/13484341/tinyBreakout.brd Caps Locker Schematic File]&lt;br /&gt;
&lt;br /&gt;
[http://dl.dropbox.com/u/13484341/vusbtiny.brd V-USB Tiny Board File]&lt;br /&gt;
&lt;br /&gt;
[http://dl.dropbox.com/u/13484341/vusbtiny.sch V-USB Tiny Schematic File]&lt;br /&gt;
&lt;br /&gt;
==== GadgetLab TriLife blinker files ====&lt;br /&gt;
[[GadgetLab_Trilife_Blinker]] is an Eagle layout project to route a board that contains about 10 parts and fits in a small footprint. The board controls the brightness of a LED depending on what neighboring boards&#039; LEDs are doing. From the University of Louisville GadgetLab class.&lt;br /&gt;
&lt;br /&gt;
=== Etching Workshop ===&lt;br /&gt;
&lt;br /&gt;
Please See: [http://www.meatandnetworking.com/?p=47 Toner Transfer and Muriatic Acid Etchant: Making PCBs at LVL1]&lt;br /&gt;
&lt;br /&gt;
=== Soldering Workshop ===&lt;br /&gt;
&lt;br /&gt;
[http://wiki.lvl1.org/File:Surface_Mount_Soldering.pdf Summer Camp Soldering Presentation]&lt;br /&gt;
&lt;br /&gt;
If you&#039;d like to create your own, you&#039;ll need these parts:&lt;br /&gt;
&lt;br /&gt;
== V-USB Programmer ==&lt;br /&gt;
&lt;br /&gt;
* 1x AtTiny45, .3&amp;quot; SOIC package&lt;br /&gt;
* 1x Mini-USB B Port (surface mount)&lt;br /&gt;
* 1x Surface Mount Slide Switch (See Sparkfun)&lt;br /&gt;
* 2x 1.5k Ohm, 0805 Resistors&lt;br /&gt;
* 2x 68 Ohm, 0805 Resistors&lt;br /&gt;
* 1x Decoupling Cap&lt;br /&gt;
* 2x 3.3v Zener Diodes, SMB Package (Note: MUST Clamp Voltage to 3.3v)&lt;br /&gt;
* 1x Surface Mount, 6 pin, 2 row terminal block&lt;br /&gt;
&lt;br /&gt;
== Caps Locker ==&lt;br /&gt;
&lt;br /&gt;
* 1x AtTiny45, .3&amp;quot; SOIC package&lt;br /&gt;
* 2x 68 Ohm 0805 Resistors&lt;br /&gt;
* 1x 1.5k Ohm 0805 Resistors&lt;br /&gt;
* 1x Surface Mount, 6 pin, 2 row terminal block&lt;br /&gt;
&lt;br /&gt;
=== Programming Workshop === &lt;br /&gt;
&lt;br /&gt;
[http://wiki.lvl1.org/File:Presentationn.pdf Presentation with Notes]&lt;br /&gt;
&lt;br /&gt;
For Code, see [[Resources and Code]]&lt;br /&gt;
&lt;br /&gt;
== Tinkering to Commercialization Workshop ==&lt;br /&gt;
[[Media:Tinkering_To_Commercialization_-_August_2011.pdf|Tinkering to Commercialization Presentation]]&lt;br /&gt;
&lt;br /&gt;
== KiCad Workshop (1/21/12) ==&lt;br /&gt;
&lt;br /&gt;
[http://wiki.lvl1.org/File:KiCad.pdf Kicad Presentation]&lt;br /&gt;
[meatandnetworking.com/w/Kicad_Resources More KiCad links and resources]&lt;br /&gt;
&lt;br /&gt;
== Freeduino Games (Gadget Lab at U of Louisville) ==&lt;br /&gt;
Add some games to the Freeduino Frenzy/Spring Training workshops!&lt;br /&gt;
*[[Freeduino Games]]&lt;/div&gt;</summary>
		<author><name>Ckharnett</name></author>
	</entry>
	<entry>
		<id>http://wiki.lvl1.org/index.php?title=GadgetLab_Trilife_Blinker&amp;diff=3911</id>
		<title>GadgetLab Trilife Blinker</title>
		<link rel="alternate" type="text/html" href="http://wiki.lvl1.org/index.php?title=GadgetLab_Trilife_Blinker&amp;diff=3911"/>
		<updated>2012-04-05T08:36:05Z</updated>

		<summary type="html">&lt;p&gt;Ckharnett: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The TriLife circuit lights a LED depending on what three neighboring TriLife circuits are doing. It&#039;s like the Game of Life on a triangular grid.*&lt;br /&gt;
&lt;br /&gt;
It&#039;s working on a breadboard--there&#039;s one microcontroller**, one LED***, a few resistors and a capacitor. Let&#039;s get boards made so 10, 20, or 400 people can solder one board each, then assemble all into a giant display! We&#039;ll need to add lots of connectors (three per board plus an optional programming connector). &lt;br /&gt;
&lt;br /&gt;
We could use some help laying out the wires according to the netlist here.&lt;br /&gt;
&lt;br /&gt;
Eagle is popular but the free version limits your board size. We also need power jacks and a couple connectors that are just wires, so that every LED can connect to three neighbors. I put the parts on the board in a small footprint that will meet these needs. Can you route the wires without moving any of the parts? You can add vias--holes through the board--that let you do crossovers. It&#039;s a 2-layer board. &lt;br /&gt;
&lt;br /&gt;
Other design considerations: What happens if one board gets plugged in backwards; will it fry the whole thing? (The purpose of three of the resistors is to protect the microcontroller in case this happens). Can you label it so it&#039;s really hard to plug things in upside down or backwards? We can also get special connectors that won&#039;t plug in the wrong way. Connectors are the most expensive part of this kit.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;*&amp;lt;/pre&amp;gt;It&#039;s really a clockless 4-state Greenberg-Hastings cellular automaton but that&#039;s not important right now.&lt;br /&gt;
&amp;lt;pre&amp;gt;**&amp;lt;/pre&amp;gt;The microcontroller is a PIC10F322, one of the tiniest available microcontrollers. It takes turns listening on each of three input pins--one for each neighbor. It discovers the brightness of the three neighbors&#039; LEDs, then adjusts its own LED accordingly. An onboard temperature sensor can be used for randomizing the startup state.&lt;br /&gt;
&amp;lt;pre&amp;gt;***&amp;lt;/pre&amp;gt;It&#039;s a regular LED. We control the brightness using pulse width modulation. There are four LED settings: dim, bright, brighter, brightest.&lt;/div&gt;</summary>
		<author><name>Ckharnett</name></author>
	</entry>
	<entry>
		<id>http://wiki.lvl1.org/index.php?title=GadgetLab_Trilife_Blinker&amp;diff=3910</id>
		<title>GadgetLab Trilife Blinker</title>
		<link rel="alternate" type="text/html" href="http://wiki.lvl1.org/index.php?title=GadgetLab_Trilife_Blinker&amp;diff=3910"/>
		<updated>2012-04-05T08:34:06Z</updated>

		<summary type="html">&lt;p&gt;Ckharnett: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The TriLife circuit lights a LED depending on what three neighboring TriLife circuits are doing. It&#039;s like the Game of Life on a triangular grid.*&lt;br /&gt;
&lt;br /&gt;
It&#039;s working on a breadboard--there&#039;s one microcontroller**, one LED***, a few resistors and a capacitor. Let&#039;s get boards made so 10, 20, or 400 people can solder one board each, then assemble all into a giant display! We&#039;ll need to add lots of connectors (three per board plus an optional programming connector). &lt;br /&gt;
&lt;br /&gt;
We could use some help laying out the wires according to the netlist here.&lt;br /&gt;
&lt;br /&gt;
Eagle is popular but the free version limits your board size. We also need power jacks and a couple connectors that are just wires, so that every LED can connect to three neighbors. I put the parts on the board in a small footprint that will meet these needs. Can you route the wires without moving any of the parts? You can add vias--holes through the board--that let you do crossovers. It&#039;s a 2-layer board. &lt;br /&gt;
&lt;br /&gt;
Other design considerations: What happens if one board gets plugged in backwards; will it fry the whole thing? (The purpose of three of the resistors is to protect the microcontroller in case this happens). Can you label it so it&#039;s really hard to plug things in upside down or backwards? We can also get special connectors that won&#039;t plug in the wrong way. Connectors are the most expensive part of this kit.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
*It&#039;s really a clockless 4-state Greenberg-Hastings cellular automaton but that&#039;s not important right now.&lt;br /&gt;
**The microcontroller is a PIC10F320, one of the tiniest available microcontrollers. It takes turns listening on each of three input pins--one for each neighbor. It discovers the brightness of the three neighbors&#039; LEDs, then adjusts its own LED accordingly. An onboard temperature sensor can be used for randomizing the startup state, that&#039;s good because there are no spare pins.&lt;br /&gt;
***It&#039;s a regular LED. We control the brightness using pulse width modulation. There are four LED settings: dim, bright, brighter, brightest.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Ckharnett</name></author>
	</entry>
	<entry>
		<id>http://wiki.lvl1.org/index.php?title=GadgetLab_Trilife_Blinker&amp;diff=3909</id>
		<title>GadgetLab Trilife Blinker</title>
		<link rel="alternate" type="text/html" href="http://wiki.lvl1.org/index.php?title=GadgetLab_Trilife_Blinker&amp;diff=3909"/>
		<updated>2012-04-05T08:31:18Z</updated>

		<summary type="html">&lt;p&gt;Ckharnett: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The TriLife circuit lights a LED depending on what three neighboring TriLife circuits are doing. It&#039;s like the Game of Life on a triangular grid.*&lt;br /&gt;
&lt;br /&gt;
It&#039;s working on a breadboard--there&#039;s one microcontroller**, one LED***, a few resistors and a capacitor. Let&#039;s get boards made so 10, 20, or 400 people can solder one board each, then assemble all into a giant display! We&#039;ll need to add lots of connectors (three per board plus an optional programming connector). &lt;br /&gt;
&lt;br /&gt;
We could use some help laying out the wires according to the netlist:&lt;br /&gt;
&lt;br /&gt;
Eagle is popular but the free version limits your board size. We also need power jacks and a couple connectors that are just wires, so that every LED can connect to three neighbors. I put the parts on the board in a small footprint that will meet these needs. Can you route the wires without moving any of the parts? You can add vias--holes through the board--that let you do crossovers. It&#039;s a 2-layer board. &lt;br /&gt;
&lt;br /&gt;
Other design considerations: What happens if one board gets plugged in backwards; will it fry the whole thing? (The purpose of three of the resistors is to protect the microcontroller in case this happens). Can you label it so it&#039;s really hard to plug things in upside down or backwards? We can also get special connectors that won&#039;t plug in the wrong way. Connectors are the most expensive part of this kit.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
*It&#039;s really a clockless 4-state Greenberg-Hastings cellular automaton but that&#039;s not important right now.&lt;br /&gt;
**The microcontroller is a PIC10F320, one of the tiniest available microcontrollers. It takes turns listening on each of three input pins--one for each neighbor. It discovers the brightness of the three neighbors&#039; LEDs, then adjusts its own LED accordingly. An onboard temperature sensor can be used for randomizing the startup state, that&#039;s good because there are no spare pins.&lt;br /&gt;
***It&#039;s a regular LED. We control the brightness using pulse width modulation. There are four LED settings: dim, bright, brighter, brightest.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Ckharnett</name></author>
	</entry>
	<entry>
		<id>http://wiki.lvl1.org/index.php?title=GadgetLab_Trilife_Blinker&amp;diff=3908</id>
		<title>GadgetLab Trilife Blinker</title>
		<link rel="alternate" type="text/html" href="http://wiki.lvl1.org/index.php?title=GadgetLab_Trilife_Blinker&amp;diff=3908"/>
		<updated>2012-04-05T08:30:19Z</updated>

		<summary type="html">&lt;p&gt;Ckharnett: Trilife Board Layout Project&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The TriLife circuit lights a LED depending on what three neighboring TriLife circuits are doing. It&#039;s like the Game of Life on a triangular grid.*&lt;br /&gt;
&lt;br /&gt;
It&#039;s working on a breadboard--there&#039;s one microcontroller**, one LED***, a few resistors and a capacitor. Let&#039;s get boards made so 10, 20, or 400 people can solder one board each, then assemble all into a giant display! We&#039;ll need to add lots of connectors (three per board plus an optional programming connector). &lt;br /&gt;
&lt;br /&gt;
We could use some help laying out the wires according to the netlist:&lt;br /&gt;
&lt;br /&gt;
Eagle is popular but the free version limits your board size. We also need power jacks and a couple connectors that are just wires, so that every LED can connect to three neighbors. I put the parts on the board in a small footprint that will meet these needs. Can you route the wires without moving any of the parts? You can add vias--holes through the board--that let you do crossovers. It&#039;s a 2-layer board. &lt;br /&gt;
&lt;br /&gt;
Other design considerations: What happens if one board gets plugged in backwards; will it fry the whole thing? (The purpose of three of the resistors is to protect the microcontroller in case this happens). Can you label it so it&#039;s really hard to plug things in upside down or backwards? We can also get special connectors that won&#039;t plug in the wrong way. Connectors are actually the most expensive part of this kit.&lt;br /&gt;
&lt;br /&gt;
*It&#039;s really a clockless 4-state Greenberg-Hastings cellular automaton but that&#039;s not important right now.&lt;br /&gt;
**The microcontroller is a PIC10F320, one of the tiniest available microcontrollers. It takes turns listening on each of three input pins--one for each neighbor. It discovers the brightness of the three neighbors&#039; LEDs, then adjusts its own LED accordingly. An onboard temperature sensor can be used for randomizing the startup state, that&#039;s good because there are no spare pins.&lt;br /&gt;
***It&#039;s a regular LED. We control the brightness using pulse width modulation. There are four LED settings: dim, bright, brighter, brightest.&lt;/div&gt;</summary>
		<author><name>Ckharnett</name></author>
	</entry>
	<entry>
		<id>http://wiki.lvl1.org/index.php?title=Workshops&amp;diff=3907</id>
		<title>Workshops</title>
		<link rel="alternate" type="text/html" href="http://wiki.lvl1.org/index.php?title=Workshops&amp;diff=3907"/>
		<updated>2012-04-05T08:00:55Z</updated>

		<summary type="html">&lt;p&gt;Ckharnett: /* Board files we created */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page is a free resource for all learning materials used in LVL1 workshops. Check our [[Calendar]] to see what LVL1 workshops are on the horizon! Enjoy!&lt;br /&gt;
&lt;br /&gt;
== How to Solder ==&lt;br /&gt;
* [[media:soldercomic.pdf|Soldering is Easy Comic]]&lt;br /&gt;
&lt;br /&gt;
== Solder Your Own Freeduino ==&lt;br /&gt;
*[http://www.arduino.cc/en/Main/Software Download Arduino Software] the Arduino software and install.&lt;br /&gt;
*[http://arduino.cc/en/Tutorial/HomePage Arduino Tutorials] Arduino Tutorials&lt;br /&gt;
*[[Media:Solder_your_own_freeduino_handout.pdf|Solder Your Own Freeduino Instructions PDF]]&lt;br /&gt;
*[[Media:Solder_your_own_freeduino_handout.odp|Solder Your Own Freeduino Instructions Open Office Presentation]]&lt;br /&gt;
*[[Media:ResistorQV.pdf|Resistor Color Code PDF]]&lt;br /&gt;
*[[Media:Arduino_cheat_sheet_v02c.pdf|Arduino Cheatsheet PDF]]&lt;br /&gt;
&lt;br /&gt;
== Freeduino Spring Training ==&lt;br /&gt;
&lt;br /&gt;
http://wiki.lvl1.org/Freediuino_Spring_Training&lt;br /&gt;
&lt;br /&gt;
Below are the lessons for the Freeduino Spring Training.  They are Creative Commons licensed, so share and use.  Pass them along.  If there are issues (bugs) with the instruction, code or circuits, then email me brian_at_lvl1.org.  The breadboard and schematic pictures are drawn using the [http://www.fritzing.org Fritzing] Program.  Try Fritzing out - it is really cool! &lt;br /&gt;
&lt;br /&gt;
*[[1st Inning]] - Arduino and Breadboard setup, Power&lt;br /&gt;
*[[2nd Inning]] - Blinking LED&lt;br /&gt;
*[[3rd Inning]] - Tri-Color LED fading&lt;br /&gt;
*[[4th Inning]] - LCD display&lt;br /&gt;
*[[5th Inning]] - Pushbutton switches&lt;br /&gt;
*[[6th Inning]] - Potentiometers and voltage dividers&lt;br /&gt;
*[[7th Inning]] - Photocell, Thermistor&lt;br /&gt;
*[[8th Inning]] - Spin a motor, transistors and diodes&lt;br /&gt;
*[[9th Inning]] - Sounds and speakers&lt;br /&gt;
&lt;br /&gt;
== February Freeduino Frenzy ==&lt;br /&gt;
[[February Freeduino Frenzy]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Learn To Solder with Mitch Altman and Jimmie Rodgers ==&lt;br /&gt;
*[[Media:LearnToSolderWithMitch.odt|Flyer for the workshop in OOO Writer format.]]&lt;br /&gt;
*[[Media:LearnToSolderWithMitch.pdf|Flyer for the workshop in PDF format.]]&lt;br /&gt;
&lt;br /&gt;
== Intermediate Microcontroller Workshop, &amp;quot;Beyond Arduino&amp;quot; == &lt;br /&gt;
*[http://drop.io/kt3wfh7 Presentation] - The Powerpoint Presentation used in the workshop, with notes.&lt;br /&gt;
*[[Resources and Code]] - The files used during the course of this workshop.&lt;br /&gt;
*[[Parts]] - Parts used in this workshop&lt;br /&gt;
*[[Media:Lvl1_avr_workshop.svg|Flyer for the workshop in SVG Format.]]&lt;br /&gt;
*[[Media:Lvl1_avr_workshop.pdf|Flyer for the workshop in PDF Format.]]&lt;br /&gt;
&lt;br /&gt;
== TV-B-Gone Workshop ==&lt;br /&gt;
*[[Media:Tv-b-gone.odp|TV-B-Gone instructions Open Office Presentation]]&lt;br /&gt;
*[[Media:Tv-b-gone.pdf|TV-B-Gone instructions PDF]]&lt;br /&gt;
&lt;br /&gt;
== Minti Boost Workshop ==&lt;br /&gt;
[[MintiBoost]] Workshop Information for 12/6/10 and 12/18/10&lt;br /&gt;
&lt;br /&gt;
== Android Game Workshop ==&lt;br /&gt;
*[https://docs.google.com/viewer?a=v&amp;amp;pid=explorer&amp;amp;chrome=true&amp;amp;srcid=0B4p7lji7MVk7NGU3Zjk1NDUtMTliMS00NzFhLTg4YTMtNjMzMjQ1ZWIxMzVm&amp;amp;hl=en&amp;amp;authkey=CLqd-usM] Android Slides PDF&lt;br /&gt;
*[https://docs.google.com/leaf?id=0B4p7lji7MVk7YjBlN2Q1OTYtNjIyZS00MmZiLWIzMGMtYzMxMmNmZTQ0MGRm&amp;amp;hl=en&amp;amp;authkey=CMHRx3E] Android Sample App&lt;br /&gt;
&lt;br /&gt;
== Ruby on Rails Workshop ==&lt;br /&gt;
==== Source Code &amp;amp; Notes ====&lt;br /&gt;
*[https://docs.google.com/leaf?id=0Bzy184pfAcrUMThkNGVjMmItMWVmNS00OTM2LTg3ZTctOWY5MDk1MDdjY2Mx&amp;amp;hl=en&amp;amp;authkey=CP_Qo5kI] blog.zip&lt;br /&gt;
==== References ====&lt;br /&gt;
*[http://www.amazon.com/Design-Patterns-Ruby-Russ-Olsen/dp/0321490452/ref=sr_1_1?ie=UTF8&amp;amp;qid=1305291175&amp;amp;sr=8-1|Design Patterns in Ruby, by Russ Olsen]&lt;br /&gt;
This book is both very readable (a rarity in tech books) and a fantastic introduction to Ruby for someone familiar with the GoF design pattern implementations in other languages. It has a quick Ruby syntax primer in the beginning, then jumps straight into the patterns.&lt;br /&gt;
&lt;br /&gt;
*[http://www.amazon.com/Programming-Ruby-1-9-Pragmatic-Programmers/dp/1934356085/ref=sr_1_1?s=books&amp;amp;ie=UTF8&amp;amp;qid=1305291335&amp;amp;sr=1-1|Programming Ruby 1.9, by Dave Thomas, Chad Fowler, and Andy Hunt]&lt;br /&gt;
This is the latest edition of the book commonly known as &amp;quot;The Pickaxe&amp;quot; in the Ruby community -- in its first edition, it was the first comprehensive English-language reference for Ruby, and was therefore indispensable to someone just getting started with the language. The latest edition is still a great reference book to have around.&lt;br /&gt;
&lt;br /&gt;
*[http://www.amazon.com/Agile-Development-Rails-Pragmatic-Programmers/dp/1934356549/ref=sr_1_1?ie=UTF8&amp;amp;qid=1305291555&amp;amp;sr=8-1|Agile Web Development with Rails, 4th Edition, by Sam Ruby, Dave Thomas, and David Heinemeier Hansson]&lt;br /&gt;
Agile Web Development was co-authored by David Heinemeier Hansson, the creator of Rails, and was the closest thing that the Rails community had to &amp;quot;The Pickaxe&amp;quot; for Ruby, in its first edition. The authors have done a great job of cleaning it up and keeping it relevant, and the latest version covers Rails 3.&lt;br /&gt;
&lt;br /&gt;
*[http://www.amazon.com/Rails-Way-Addison-Wesley-Professional-Ruby/dp/0321601661/ref=sr_1_1?s=books&amp;amp;ie=UTF8&amp;amp;qid=1305291830&amp;amp;sr=1-1|The Rails 3 Way, 2nd Edition, by Obie Fernandez]&lt;br /&gt;
Obie heads up the Florida-based Rails consultancy, Hashrocket, and was an early adopter of Rails, coming over from the Java camp. He&#039;s been a vocal advocate of best practices in Rails for just about as long as Rails has existed, and his book helps to explain not just how to do things in Rails, but why.&lt;br /&gt;
&lt;br /&gt;
== Pimping your Home Network with DDWRT ==&lt;br /&gt;
&lt;br /&gt;
*[http://www.dd-wrt.com/site/support/router-database DDWRT Database Search]&lt;br /&gt;
*[http://www.dd-wrt.com/wiki/index.php/Repeater_Bridge Creating a wireless bridge]&lt;br /&gt;
*[http://www.pennock.nl/dd-wrt/Multiple_BSSIDs.html Guest Wifi]&lt;br /&gt;
*[https://docs.google.com/leaf?id=1w1FSYX70ejcjo5jaXnvqVe3HGLekPd3I0CW5LnRBrs6RnAOcU8jWBn4ES-Lb&amp;amp;hl=en_US&amp;amp;authkey=CKC21ZMF DDWRT Power Point]&lt;br /&gt;
&lt;br /&gt;
===Parts for a custom home router===&lt;br /&gt;
*[http://www.newegg.com/Product/Product.aspx?Item=N82E16813153154 Motherboard]&lt;br /&gt;
*[http://www.newegg.com/Product/Product.aspx?Item=N82E16820144151 RAM]&lt;br /&gt;
*[http://www.newegg.com/Product/Product.aspx?Item=N82E16822136771 Hard Drive]&lt;br /&gt;
*[http://www.newegg.com/Product/Product.aspx?Item=N82E16811108196 Case]&lt;br /&gt;
&lt;br /&gt;
== LVL1 Summer Camp ==&lt;br /&gt;
&lt;br /&gt;
LVL1 Summer Camp was a workshop that is occurring during the month of June, 2011, taking up every Saturday in June, from 1pm to 5pm.&lt;br /&gt;
&lt;br /&gt;
=== Eagle Workshop ===&lt;br /&gt;
&lt;br /&gt;
==== Links ====&lt;br /&gt;
&lt;br /&gt;
Eagle itself: [http://www.cadsoft.de/download.htm Eagle Download]&lt;br /&gt;
&lt;br /&gt;
Sparkfun parts library used for this workshop: [https://github.com/sparkfun/SparkFun-Eagle-Library/raw/master/SparkFun.lbr Sparkfun Library]&lt;br /&gt;
&lt;br /&gt;
Dangerous Prototypes Parts Library: [http://dangerous-prototypes-open-hardware.googlecode.com/svn/trunk/Eagle_Part_Library/dp_devices.lbr DP Parts Library]&lt;br /&gt;
&lt;br /&gt;
Sparkfun Keyboard Shortcuts, Appropriate for most layouts: [http://www.sparkfun.com/tutorial/BeginningEmbedded/8-EagleSchematics/sfe_eagle_shortcuts.zip Keyboard Shortcuts]&lt;br /&gt;
&lt;br /&gt;
CAM file: [http://www.sparkfun.com/tutorial/BeginningEmbedded/9-EaglePCBs/sfe-gerb274x.cam Sparkfun CAM, appropriate for GoldPhoenix]&lt;br /&gt;
&lt;br /&gt;
==== Board files we created ====&lt;br /&gt;
&lt;br /&gt;
[http://dl.dropbox.com/u/13484341/capsLocker.brd Caps Locker Board File]&lt;br /&gt;
&lt;br /&gt;
[http://dl.dropbox.com/u/13484341/tinyBreakout.brd Caps Locker Schematic File]&lt;br /&gt;
&lt;br /&gt;
[http://dl.dropbox.com/u/13484341/vusbtiny.brd V-USB Tiny Board File]&lt;br /&gt;
&lt;br /&gt;
[http://dl.dropbox.com/u/13484341/vusbtiny.sch V-USB Tiny Schematic File]&lt;br /&gt;
&lt;br /&gt;
==== GadgetLab TriLife blinker files ====&lt;br /&gt;
&lt;br /&gt;
=== Etching Workshop ===&lt;br /&gt;
&lt;br /&gt;
Please See: [http://www.meatandnetworking.com/?p=47 Toner Transfer and Muriatic Acid Etchant: Making PCBs at LVL1]&lt;br /&gt;
&lt;br /&gt;
=== Soldering Workshop ===&lt;br /&gt;
&lt;br /&gt;
[http://wiki.lvl1.org/File:Surface_Mount_Soldering.pdf Summer Camp Soldering Presentation]&lt;br /&gt;
&lt;br /&gt;
If you&#039;d like to create your own, you&#039;ll need these parts:&lt;br /&gt;
&lt;br /&gt;
== V-USB Programmer ==&lt;br /&gt;
&lt;br /&gt;
* 1x AtTiny45, .3&amp;quot; SOIC package&lt;br /&gt;
* 1x Mini-USB B Port (surface mount)&lt;br /&gt;
* 1x Surface Mount Slide Switch (See Sparkfun)&lt;br /&gt;
* 2x 1.5k Ohm, 0805 Resistors&lt;br /&gt;
* 2x 68 Ohm, 0805 Resistors&lt;br /&gt;
* 1x Decoupling Cap&lt;br /&gt;
* 2x 3.3v Zener Diodes, SMB Package (Note: MUST Clamp Voltage to 3.3v)&lt;br /&gt;
* 1x Surface Mount, 6 pin, 2 row terminal block&lt;br /&gt;
&lt;br /&gt;
== Caps Locker ==&lt;br /&gt;
&lt;br /&gt;
* 1x AtTiny45, .3&amp;quot; SOIC package&lt;br /&gt;
* 2x 68 Ohm 0805 Resistors&lt;br /&gt;
* 1x 1.5k Ohm 0805 Resistors&lt;br /&gt;
* 1x Surface Mount, 6 pin, 2 row terminal block&lt;br /&gt;
&lt;br /&gt;
=== Programming Workshop === &lt;br /&gt;
&lt;br /&gt;
[http://wiki.lvl1.org/File:Presentationn.pdf Presentation with Notes]&lt;br /&gt;
&lt;br /&gt;
For Code, see [[Resources and Code]]&lt;br /&gt;
&lt;br /&gt;
== Tinkering to Commercialization Workshop ==&lt;br /&gt;
[[Media:Tinkering_To_Commercialization_-_August_2011.pdf|Tinkering to Commercialization Presentation]]&lt;br /&gt;
&lt;br /&gt;
== KiCad Workshop (1/21/12) ==&lt;br /&gt;
&lt;br /&gt;
[http://wiki.lvl1.org/File:KiCad.pdf Kicad Presentation]&lt;br /&gt;
[meatandnetworking.com/w/Kicad_Resources More KiCad links and resources]&lt;br /&gt;
&lt;br /&gt;
== Freeduino Games (Gadget Lab at U of Louisville) ==&lt;br /&gt;
Add some games to the Freeduino Frenzy/Spring Training workshops!&lt;br /&gt;
*[[Freeduino Games]]&lt;/div&gt;</summary>
		<author><name>Ckharnett</name></author>
	</entry>
	<entry>
		<id>http://wiki.lvl1.org/index.php?title=Freeduino_Games&amp;diff=3883</id>
		<title>Freeduino Games</title>
		<link rel="alternate" type="text/html" href="http://wiki.lvl1.org/index.php?title=Freeduino_Games&amp;diff=3883"/>
		<updated>2012-03-22T20:05:49Z</updated>

		<summary type="html">&lt;p&gt;Ckharnett: /* Freeduino Whack-A-Mole */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Freeduino Truck Lane==&lt;br /&gt;
Go from the Freeduino Spring Training LCD activity to a game!&lt;br /&gt;
&lt;br /&gt;
Need a Freeduino, a 10K pot, and a 16x2 LCD and a solderless breadboard.&lt;br /&gt;
Follow all steps in [[4th Inning]].&lt;br /&gt;
Now, pull the middle pot pin out of the LCD. Just connect that LCD pin to ground. (It&#039;s the third pin from the end of the LCD) This should give you a high contrast display. We need to use the pot for steering!&lt;br /&gt;
Connect the middle pot pin instead to Analog Input pin 1 of your Freeduino.&lt;br /&gt;
We didn&#039;t add a speaker, just used pin 13 to light up the onboard green LED if you &amp;quot;crash&amp;quot; in the game. If you want to use a speaker, connect it to a PWM pin like digital 3, 5 or 6 and adjust the code accordingly.&lt;br /&gt;
&lt;br /&gt;
Here&#039;s the code, cut and paste this into Arduino and install it to your board. Play away. To play again, press the Freeduino&#039;s reset button.&lt;br /&gt;
&lt;br /&gt;
Much more including videos at the game&#039;s original site [http://www.instructables.com/id/Truck-Lane-a-16x2-LCD-Arduino-game/].&lt;br /&gt;
We&#039;ve changed the pinouts in the code to match what we did in the Freeduino Spring Training LCD activity.&lt;br /&gt;
&lt;br /&gt;
Can you modify the code to make a game that rewards crashing? For example, scoot around catching falling &amp;quot;coins,&amp;quot; and see how many you can collect within a certain time. Then, make them fall faster and faster! This would be a fun way to learn more about what the code is doing.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;/* Simple Car game for a 16x2 LCD display &lt;br /&gt;
   You can use any Hitachi HD44780 compatible LCD.&lt;br /&gt;
   Modified for LVL1 Spring Training LCD Activity,&lt;br /&gt;
    Originally from &lt;br /&gt;
    @TheRealDod, Nov 25, 2010&lt;br /&gt;
   There&#039;s a &amp;quot;steering wheel&amp;quot; potentiometer on analog input 1,&lt;br /&gt;
   and a led on pin 13&lt;br /&gt;
   &lt;br /&gt;
   Enjoy,&lt;br /&gt;
&lt;br /&gt;
*/&lt;br /&gt;
#include &amp;lt;LiquidCrystal.h&amp;gt;&lt;br /&gt;
// LiquidCrystal display&lt;br /&gt;
// You can use any Hitachi HD44780 compatible. Wiring explained at&lt;br /&gt;
// http://www.arduino.cc/en/Tutorial/LiquidCrystal&lt;br /&gt;
LiquidCrystal lcd(7, 8, 9, 10, 11, 12);&lt;br /&gt;
&lt;br /&gt;
// Steering wheel potentiometer&lt;br /&gt;
const int POTPIN = 1;&lt;br /&gt;
const int MAXPOT = 800; // no need to turn the wheel all the way to 1023 :)&lt;br /&gt;
&lt;br /&gt;
// Piezo speaker&lt;br /&gt;
const int SPEAKERPIN = 13;//you can see the led flash when u crash&lt;br /&gt;
&lt;br /&gt;
const int RANDSEEDPIN = 0; // an analog pin that isn&#039;t connected to anything&lt;br /&gt;
&lt;br /&gt;
const int MAXSTEPDURATION = 300; // Start slowly, each step is 1 millisec shorter.&lt;br /&gt;
const int MINSTEPDURATION = 150; // This is as fast as it gets&lt;br /&gt;
&lt;br /&gt;
const int NGLYPHS = 6;&lt;br /&gt;
// the glyphs will be defined starting from 1 (not 0),&lt;br /&gt;
// to enable lcd.print() of null-terminated strings&lt;br /&gt;
byte glyphs[NGLYPHS][8] = {&lt;br /&gt;
  // 1: car up&lt;br /&gt;
  { B00000,&lt;br /&gt;
    B01110,&lt;br /&gt;
    B11111,&lt;br /&gt;
    B01010,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B00000}&lt;br /&gt;
  // 2: car down&lt;br /&gt;
  ,{B00000,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B01110,&lt;br /&gt;
    B11111,&lt;br /&gt;
    B01010,&lt;br /&gt;
    B00000}&lt;br /&gt;
  // 3: truck up&lt;br /&gt;
  ,{B00000,&lt;br /&gt;
    B11110,&lt;br /&gt;
    B11111,&lt;br /&gt;
    B01010,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B00000}&lt;br /&gt;
  // 4: truck down&lt;br /&gt;
  ,{B00000,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B11110,&lt;br /&gt;
    B11111,&lt;br /&gt;
    B01010,&lt;br /&gt;
    B00000}&lt;br /&gt;
  // 5: crash up&lt;br /&gt;
  ,{B10101,&lt;br /&gt;
    B01110,&lt;br /&gt;
    B01110,&lt;br /&gt;
    B10101,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B00000}&lt;br /&gt;
  // 6: crash down&lt;br /&gt;
  ,{B00000,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B10101,&lt;br /&gt;
    B01110,&lt;br /&gt;
    B01110,&lt;br /&gt;
    B10101,&lt;br /&gt;
    B00000}&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
const int NCARPOSITIONS = 4;&lt;br /&gt;
&lt;br /&gt;
// Each position is mapped to a column of 2 glyphs&lt;br /&gt;
// Used to make sense when I had a 5th position&lt;br /&gt;
// where car or crash was drawn as 2 glyphs&lt;br /&gt;
// (can&#039;t do that since 0 terminates strings),&lt;br /&gt;
// so it&#039;s kinda silly now, but it ain&#039;t broke :)&lt;br /&gt;
const char BLANK=32;&lt;br /&gt;
char car2glyphs[NCARPOSITIONS][2] = {&lt;br /&gt;
  {1,BLANK},{2,BLANK},{BLANK,1},{BLANK,2}&lt;br /&gt;
};&lt;br /&gt;
char truck2glyphs[NCARPOSITIONS][2] = {&lt;br /&gt;
  {3,BLANK},{4,BLANK},{BLANK,3},{BLANK,4}&lt;br /&gt;
};&lt;br /&gt;
char crash2glyphs[NCARPOSITIONS][2] = {&lt;br /&gt;
  {5,BLANK},{6,BLANK},{BLANK,5},{BLANK,6}&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
const int ROADLEN = 15; // LCD width (not counting our car)&lt;br /&gt;
int road[ROADLEN]; // positions of other cars&lt;br /&gt;
char line_buff[2+ROADLEN]; // aux string for drawRoad()&lt;br /&gt;
int road_index;&lt;br /&gt;
int car_pos;&lt;br /&gt;
// Off-the-grid position means empty column, so MAXROADPOS&lt;br /&gt;
// determines the probability of a car in a column&lt;br /&gt;
// e.g. 3*NCARPOSITIONS gives p=1/3&lt;br /&gt;
const int MAXROADPOS = 3*NCARPOSITIONS;&lt;br /&gt;
int step_duration;&lt;br /&gt;
&lt;br /&gt;
int crash; // true if crashed&lt;br /&gt;
unsigned int crashtime; // millis() when crashed&lt;br /&gt;
const int CRASHSOUNDDURATION = 250;&lt;br /&gt;
&lt;br /&gt;
const char *INTRO1=&amp;quot;Trucks ahead,&amp;quot;;&lt;br /&gt;
const char *INTRO2=&amp;quot;Drive carefully&amp;quot;;&lt;br /&gt;
const int INTRODELAY = 2000;&lt;br /&gt;
&lt;br /&gt;
void setup()&lt;br /&gt;
{&lt;br /&gt;
  crash = crashtime = road_index = 0;&lt;br /&gt;
  step_duration = MAXSTEPDURATION;&lt;br /&gt;
  line_buff[1+ROADLEN] = &#039;\0&#039;; // null terminate it&lt;br /&gt;
  randomSeed(analogRead(RANDSEEDPIN));&lt;br /&gt;
  for (int i=0; i&amp;lt;NGLYPHS; i++) {&lt;br /&gt;
    lcd.createChar(i+1,glyphs[i]);&lt;br /&gt;
  }&lt;br /&gt;
  for (int i=0; i&amp;lt;ROADLEN; i++) {&lt;br /&gt;
    road[i]=-1;&lt;br /&gt;
  }&lt;br /&gt;
  pinMode(SPEAKERPIN,OUTPUT);&lt;br /&gt;
  analogWrite(SPEAKERPIN,0); // to be on the safe side&lt;br /&gt;
  lcd.begin(16,2);&lt;br /&gt;
  getSteeringWheel();&lt;br /&gt;
  drawRoad();&lt;br /&gt;
  lcd.setCursor(1,0);&lt;br /&gt;
  lcd.print(INTRO1);&lt;br /&gt;
  lcd.setCursor(1,1);&lt;br /&gt;
  lcd.print(INTRO2);&lt;br /&gt;
  delay(INTRODELAY);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void loop() {&lt;br /&gt;
  unsigned long now = millis()-INTRODELAY;&lt;br /&gt;
  if (!crash) {&lt;br /&gt;
    getSteeringWheel();&lt;br /&gt;
    crash = (car_pos==road[road_index]);&lt;br /&gt;
  }&lt;br /&gt;
  if (crash) {&lt;br /&gt;
    if (!crashtime) {&lt;br /&gt;
      crashtime=now;&lt;br /&gt;
      drawRoad();&lt;br /&gt;
      // Game over text&lt;br /&gt;
      // (keep first 2 &amp;quot;crash&amp;quot; columns intact)&lt;br /&gt;
      lcd.setCursor(2,0);&lt;br /&gt;
      lcd.print(&amp;quot;Crashed after&amp;quot;);&lt;br /&gt;
      lcd.setCursor(2,1);&lt;br /&gt;
      lcd.print(now/1000);&lt;br /&gt;
      lcd.print(&amp;quot; seconds.&amp;quot;);&lt;br /&gt;
    }&lt;br /&gt;
    if ((now-crashtime)&amp;lt;CRASHSOUNDDURATION) {&lt;br /&gt;
      analogWrite(SPEAKERPIN,random(255)); // white noise&lt;br /&gt;
    } &lt;br /&gt;
    else {&lt;br /&gt;
      analogWrite(SPEAKERPIN,0); // dramatic post-crush silence :)   &lt;br /&gt;
    }&lt;br /&gt;
    delay(10); // Wait a bit between writes&lt;br /&gt;
  } &lt;br /&gt;
  else {&lt;br /&gt;
&lt;br /&gt;
    int prev_pos = road[(road_index-1)%ROADLEN];&lt;br /&gt;
    int this_pos = random(MAXROADPOS);&lt;br /&gt;
    while (abs(this_pos-prev_pos)&amp;lt;2) { // don&#039;t jam the road&lt;br /&gt;
      this_pos = random(MAXROADPOS);&lt;br /&gt;
    }&lt;br /&gt;
    road[road_index] = this_pos;&lt;br /&gt;
    road_index = (road_index+1)%ROADLEN;&lt;br /&gt;
    drawRoad();&lt;br /&gt;
    delay(step_duration);&lt;br /&gt;
    if (step_duration&amp;gt;MINSTEPDURATION) {&lt;br /&gt;
      step_duration--; // go faster&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
void getSteeringWheel() {&lt;br /&gt;
  car_pos = map(analogRead(POTPIN),0,1024,0,NCARPOSITIONS);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void drawRoad() {&lt;br /&gt;
  for (int i=0; i&amp;lt;2; i++) {&lt;br /&gt;
    if (crash) {&lt;br /&gt;
      line_buff[0]=crash2glyphs[car_pos][i];&lt;br /&gt;
    } &lt;br /&gt;
    else {&lt;br /&gt;
      line_buff[0]=car2glyphs[car_pos][i];&lt;br /&gt;
    }&lt;br /&gt;
    for (int j=0; j&amp;lt;ROADLEN; j++) {&lt;br /&gt;
      int pos = road[(j+road_index)%ROADLEN];&lt;br /&gt;
      line_buff[j+1] = pos&amp;gt;=0 &amp;amp;&amp;amp; pos&amp;lt;NCARPOSITIONS ? truck2glyphs[pos][i] : BLANK;&lt;br /&gt;
    }&lt;br /&gt;
    lcd.setCursor(0,i);&lt;br /&gt;
    lcd.print(line_buff);&lt;br /&gt;
  }&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Freeduino Whack-A-Mole==&lt;br /&gt;
And next, Freeduino Whack-A-Mole![http://www.google.com/url?sa=t&amp;amp;rct=j&amp;amp;q=&amp;amp;esrc=s&amp;amp;source=web&amp;amp;cd=1&amp;amp;cts=1331224454832&amp;amp;ved=0CCkQFjAA&amp;amp;url=http%3A%2F%2Fwww.arduino.cc%2Fcgi-bin%2Fyabb2%2FYaBB.pl%3Fnum%3D1262971548&amp;amp;ei=VeFYT7udG-W30gHRztSsDw&amp;amp;usg=AFQjCNF8jYa_NAlX93ekQY-i1_jE6sCTuQ&amp;amp;sig2=KC_H8S7tHq7lLiaMqooF1g] We need 5-way joysticks for this one. It will introduce the Arduino Serial Monitor.&lt;br /&gt;
We&#039;re getting this 5-way joystick (5 way= up,down,left,right and button press)- it&#039;s a navigation switch from Adafruit.[https://www.adafruit.com/products/504]&lt;br /&gt;
&lt;br /&gt;
Here&#039;s the datasheet for the 5-way switch&amp;quot; [http://www.adafruit.com/datasheets/SKQUCAA010-ALPS.pdf]&lt;br /&gt;
&lt;br /&gt;
Here&#039;s how it&#039;s hooked up:[[File:WhackamoleSwitch.jpg]]&lt;br /&gt;
&lt;br /&gt;
Here&#039;s the code:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/*&lt;br /&gt;
This is a whackamole game. &lt;br /&gt;
 Joystick connected as follows: (Instructions are for Adafruit 5-way switch part 504)&lt;br /&gt;
 Up    Arduino digital pin 3, to switch pin 5&lt;br /&gt;
 Right		 Arduino digital pin 4, to switch pin 3&lt;br /&gt;
 Down		  Arduino digital pin 5, to switch pin 2&lt;br /&gt;
 Left		  Arduino digital pin 6, to switch pin 1&lt;br /&gt;
 Button		Arduino digital pin 7, to switch pin 6&lt;br /&gt;
 &lt;br /&gt;
 If you follow this map it should work--you might have to rotate your breadboard&lt;br /&gt;
 Make sure the switch is well connected to the breadboard.&lt;br /&gt;
 &lt;br /&gt;
 Common: Digital Pin 2 to switch pin 4&lt;br /&gt;
 &lt;br /&gt;
 Press the button to start&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
const char cross = &#039;*&#039;;&lt;br /&gt;
const char mole = &#039;O&#039;;&lt;br /&gt;
const char both = &#039;@&#039;;&lt;br /&gt;
const char miss = &#039;x&#039;;&lt;br /&gt;
const char hit = &#039;#&#039;;&lt;br /&gt;
const char blank = &#039;.&#039;;&lt;br /&gt;
&lt;br /&gt;
int crossCoor;&lt;br /&gt;
int moleCoor;&lt;br /&gt;
long spawn;&lt;br /&gt;
int limit;&lt;br /&gt;
char pic;&lt;br /&gt;
boolean dead;&lt;br /&gt;
int coor;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
void setup()  {&lt;br /&gt;
  for(int i=3; i&amp;lt;=7; i++) {&lt;br /&gt;
    pinMode(i, INPUT);&lt;br /&gt;
    digitalWrite(i, HIGH);&lt;br /&gt;
  }&lt;br /&gt;
  pinMode(2, OUTPUT);&lt;br /&gt;
  digitalWrite(2, LOW);&lt;br /&gt;
  Serial.begin(115200);&lt;br /&gt;
  coor=5;//start out in the middle&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
int crossGet()  {//fixed so it works a little better w 5 way switch now&lt;br /&gt;
&lt;br /&gt;
  int mycoor = coor;&lt;br /&gt;
  if(digitalRead(3) == HIGH)  {//up&lt;br /&gt;
    mycoor += 3;&lt;br /&gt;
  }&lt;br /&gt;
  if(digitalRead(5) == HIGH)  {//down&lt;br /&gt;
    mycoor -= 3;&lt;br /&gt;
  }&lt;br /&gt;
  if(digitalRead(4) == HIGH)  {//right&lt;br /&gt;
    mycoor --;&lt;br /&gt;
  }&lt;br /&gt;
  if(digitalRead(6) == HIGH)  {//left&lt;br /&gt;
    mycoor ++;&lt;br /&gt;
  }&lt;br /&gt;
  if((mycoor&amp;gt;0)&amp;amp;(mycoor&amp;lt;10)){&lt;br /&gt;
     coor=mycoor;&lt;br /&gt;
  }&lt;br /&gt;
   return coor;  &lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
boolean pressed()  {&lt;br /&gt;
  boolean res;&lt;br /&gt;
  if(digitalRead(7)==LOW)  {&lt;br /&gt;
    res=true;&lt;br /&gt;
  }&lt;br /&gt;
  else  {&lt;br /&gt;
    res=false;&lt;br /&gt;
  }&lt;br /&gt;
  return res;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void display(int molePos)  {&lt;br /&gt;
  int one=crossGet();&lt;br /&gt;
  boolean button = pressed();&lt;br /&gt;
  for(int i=1; i&amp;lt;=9; i++)  {&lt;br /&gt;
&lt;br /&gt;
    if(one==i &amp;amp;&amp;amp; molePos==i)  {&lt;br /&gt;
      if(button)  {&lt;br /&gt;
        pic = hit;&lt;br /&gt;
        dead=true;&lt;br /&gt;
      }&lt;br /&gt;
      else  {&lt;br /&gt;
        pic=both;&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
    else if(one == i)  {&lt;br /&gt;
      if(button)  {&lt;br /&gt;
        pic=miss;&lt;br /&gt;
      }&lt;br /&gt;
      else  {&lt;br /&gt;
        pic=cross;&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
    else if(molePos==i)  {&lt;br /&gt;
      pic=mole;&lt;br /&gt;
    }&lt;br /&gt;
    else  {&lt;br /&gt;
      pic=blank;&lt;br /&gt;
    }&lt;br /&gt;
    if(i==3 || i==6 || i==9)  {&lt;br /&gt;
      Serial.println(pic);&lt;br /&gt;
    }&lt;br /&gt;
    else  {&lt;br /&gt;
      Serial.print(pic);&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void makeMole()  {&lt;br /&gt;
  spawn = millis();&lt;br /&gt;
  randomSeed(analogRead(0));&lt;br /&gt;
  moleCoor = random(1, 10);&lt;br /&gt;
  dead=false;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void noMole()  {&lt;br /&gt;
  moleCoor=10;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void loop()  {&lt;br /&gt;
  Serial.println(&amp;quot;Ready to play?&amp;quot;);&lt;br /&gt;
  while(digitalRead(7)==HIGH)  {&lt;br /&gt;
  }&lt;br /&gt;
  Serial.println(&amp;quot;Ready...&amp;quot;);&lt;br /&gt;
  delay(1000);&lt;br /&gt;
  Serial.println(&amp;quot;Set...&amp;quot;);&lt;br /&gt;
  delay(1000);&lt;br /&gt;
  Serial.println(&amp;quot;GO!&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
  boolean lost = false;&lt;br /&gt;
  int score = 0;&lt;br /&gt;
  limit= 5000;&lt;br /&gt;
&lt;br /&gt;
  while(lost==false ) {&lt;br /&gt;
    int time = random(100, 300);&lt;br /&gt;
    for(int i=0; i&amp;lt;=time; i++)  {&lt;br /&gt;
      display(10);&lt;br /&gt;
      Serial.println();&lt;br /&gt;
      delay(50);&lt;br /&gt;
    }&lt;br /&gt;
    makeMole();&lt;br /&gt;
    while(dead==false &amp;amp;&amp;amp; spawn+limit &amp;gt;= millis())  {&lt;br /&gt;
      display(moleCoor);&lt;br /&gt;
      if(pic==&#039;#&#039;)  {&lt;br /&gt;
        dead = true;&lt;br /&gt;
      }&lt;br /&gt;
      Serial.println();&lt;br /&gt;
      delay(50);&lt;br /&gt;
    }&lt;br /&gt;
    if(dead)  {&lt;br /&gt;
&lt;br /&gt;
      score++;&lt;br /&gt;
      if(limit&amp;gt;1000)  {&lt;br /&gt;
        limit -= 50;&lt;br /&gt;
      }&lt;br /&gt;
      delay(100);&lt;br /&gt;
&lt;br /&gt;
    }&lt;br /&gt;
    else  {&lt;br /&gt;
      break;&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
  Serial.println(&amp;quot;You lost&amp;quot;);&lt;br /&gt;
  delay(1000);&lt;br /&gt;
  Serial.print(&amp;quot;Your score was  &amp;quot;);&lt;br /&gt;
  Serial.println(score);&lt;br /&gt;
  Serial.println();&lt;br /&gt;
  delay(1000);&lt;br /&gt;
  while(digitalRead(7)==HIGH)  {&lt;br /&gt;
  }&lt;br /&gt;
  delay(1000);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The code works okay with the Serial Monitor, except it scrolls away so it can be hard to track what&#039;s happening with the little whack-a-mole symbols. Instead--you could have a Processing program turn the symbols into pictures. Download &amp;amp; install Processing from processing.org (very similar to Arduino except is generally for making programs on your laptop), unzip these files [http://www.lvl1.org/wp-content/uploads/2012/03/WhackAMoleScreen2.zip] and put them in your Processing sketch folder, plug in your Arduino running the Whack-a-Mole code and finally launch the Processing Whack-a-Mole screen program. For Windows users, if it doesn&#039;t connect, you might have to adjust the portName string from Serial.list()[0] to Serial.list()[1] or another number that connects with your Arduino. Then you&#039;ll get this:&lt;br /&gt;
[[File:WhackAMoleScreenShot.png]]&lt;br /&gt;
&lt;br /&gt;
==Others==&lt;br /&gt;
What games can you make from a Freeduino, LCD, one pot, one 5-way joystick, some LEDs, a temperature sensor, a light sensor and maybe a piezo speaker? &lt;br /&gt;
&lt;br /&gt;
==Advanced==&lt;br /&gt;
You are also allowed to use the Serial Monitor in combination with Processing or the like, to do stuff on your computer&#039;s display. The Freeduino should be the game engine.&lt;/div&gt;</summary>
		<author><name>Ckharnett</name></author>
	</entry>
	<entry>
		<id>http://wiki.lvl1.org/index.php?title=File:WhackAMoleScreenShot.png&amp;diff=3882</id>
		<title>File:WhackAMoleScreenShot.png</title>
		<link rel="alternate" type="text/html" href="http://wiki.lvl1.org/index.php?title=File:WhackAMoleScreenShot.png&amp;diff=3882"/>
		<updated>2012-03-22T20:04:22Z</updated>

		<summary type="html">&lt;p&gt;Ckharnett: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Ckharnett</name></author>
	</entry>
	<entry>
		<id>http://wiki.lvl1.org/index.php?title=Freeduino_Games&amp;diff=3881</id>
		<title>Freeduino Games</title>
		<link rel="alternate" type="text/html" href="http://wiki.lvl1.org/index.php?title=Freeduino_Games&amp;diff=3881"/>
		<updated>2012-03-22T19:32:56Z</updated>

		<summary type="html">&lt;p&gt;Ckharnett: /* Freeduino Whack-A-Mole */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Freeduino Truck Lane==&lt;br /&gt;
Go from the Freeduino Spring Training LCD activity to a game!&lt;br /&gt;
&lt;br /&gt;
Need a Freeduino, a 10K pot, and a 16x2 LCD and a solderless breadboard.&lt;br /&gt;
Follow all steps in [[4th Inning]].&lt;br /&gt;
Now, pull the middle pot pin out of the LCD. Just connect that LCD pin to ground. (It&#039;s the third pin from the end of the LCD) This should give you a high contrast display. We need to use the pot for steering!&lt;br /&gt;
Connect the middle pot pin instead to Analog Input pin 1 of your Freeduino.&lt;br /&gt;
We didn&#039;t add a speaker, just used pin 13 to light up the onboard green LED if you &amp;quot;crash&amp;quot; in the game. If you want to use a speaker, connect it to a PWM pin like digital 3, 5 or 6 and adjust the code accordingly.&lt;br /&gt;
&lt;br /&gt;
Here&#039;s the code, cut and paste this into Arduino and install it to your board. Play away. To play again, press the Freeduino&#039;s reset button.&lt;br /&gt;
&lt;br /&gt;
Much more including videos at the game&#039;s original site [http://www.instructables.com/id/Truck-Lane-a-16x2-LCD-Arduino-game/].&lt;br /&gt;
We&#039;ve changed the pinouts in the code to match what we did in the Freeduino Spring Training LCD activity.&lt;br /&gt;
&lt;br /&gt;
Can you modify the code to make a game that rewards crashing? For example, scoot around catching falling &amp;quot;coins,&amp;quot; and see how many you can collect within a certain time. Then, make them fall faster and faster! This would be a fun way to learn more about what the code is doing.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;/* Simple Car game for a 16x2 LCD display &lt;br /&gt;
   You can use any Hitachi HD44780 compatible LCD.&lt;br /&gt;
   Modified for LVL1 Spring Training LCD Activity,&lt;br /&gt;
    Originally from &lt;br /&gt;
    @TheRealDod, Nov 25, 2010&lt;br /&gt;
   There&#039;s a &amp;quot;steering wheel&amp;quot; potentiometer on analog input 1,&lt;br /&gt;
   and a led on pin 13&lt;br /&gt;
   &lt;br /&gt;
   Enjoy,&lt;br /&gt;
&lt;br /&gt;
*/&lt;br /&gt;
#include &amp;lt;LiquidCrystal.h&amp;gt;&lt;br /&gt;
// LiquidCrystal display&lt;br /&gt;
// You can use any Hitachi HD44780 compatible. Wiring explained at&lt;br /&gt;
// http://www.arduino.cc/en/Tutorial/LiquidCrystal&lt;br /&gt;
LiquidCrystal lcd(7, 8, 9, 10, 11, 12);&lt;br /&gt;
&lt;br /&gt;
// Steering wheel potentiometer&lt;br /&gt;
const int POTPIN = 1;&lt;br /&gt;
const int MAXPOT = 800; // no need to turn the wheel all the way to 1023 :)&lt;br /&gt;
&lt;br /&gt;
// Piezo speaker&lt;br /&gt;
const int SPEAKERPIN = 13;//you can see the led flash when u crash&lt;br /&gt;
&lt;br /&gt;
const int RANDSEEDPIN = 0; // an analog pin that isn&#039;t connected to anything&lt;br /&gt;
&lt;br /&gt;
const int MAXSTEPDURATION = 300; // Start slowly, each step is 1 millisec shorter.&lt;br /&gt;
const int MINSTEPDURATION = 150; // This is as fast as it gets&lt;br /&gt;
&lt;br /&gt;
const int NGLYPHS = 6;&lt;br /&gt;
// the glyphs will be defined starting from 1 (not 0),&lt;br /&gt;
// to enable lcd.print() of null-terminated strings&lt;br /&gt;
byte glyphs[NGLYPHS][8] = {&lt;br /&gt;
  // 1: car up&lt;br /&gt;
  { B00000,&lt;br /&gt;
    B01110,&lt;br /&gt;
    B11111,&lt;br /&gt;
    B01010,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B00000}&lt;br /&gt;
  // 2: car down&lt;br /&gt;
  ,{B00000,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B01110,&lt;br /&gt;
    B11111,&lt;br /&gt;
    B01010,&lt;br /&gt;
    B00000}&lt;br /&gt;
  // 3: truck up&lt;br /&gt;
  ,{B00000,&lt;br /&gt;
    B11110,&lt;br /&gt;
    B11111,&lt;br /&gt;
    B01010,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B00000}&lt;br /&gt;
  // 4: truck down&lt;br /&gt;
  ,{B00000,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B11110,&lt;br /&gt;
    B11111,&lt;br /&gt;
    B01010,&lt;br /&gt;
    B00000}&lt;br /&gt;
  // 5: crash up&lt;br /&gt;
  ,{B10101,&lt;br /&gt;
    B01110,&lt;br /&gt;
    B01110,&lt;br /&gt;
    B10101,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B00000}&lt;br /&gt;
  // 6: crash down&lt;br /&gt;
  ,{B00000,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B10101,&lt;br /&gt;
    B01110,&lt;br /&gt;
    B01110,&lt;br /&gt;
    B10101,&lt;br /&gt;
    B00000}&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
const int NCARPOSITIONS = 4;&lt;br /&gt;
&lt;br /&gt;
// Each position is mapped to a column of 2 glyphs&lt;br /&gt;
// Used to make sense when I had a 5th position&lt;br /&gt;
// where car or crash was drawn as 2 glyphs&lt;br /&gt;
// (can&#039;t do that since 0 terminates strings),&lt;br /&gt;
// so it&#039;s kinda silly now, but it ain&#039;t broke :)&lt;br /&gt;
const char BLANK=32;&lt;br /&gt;
char car2glyphs[NCARPOSITIONS][2] = {&lt;br /&gt;
  {1,BLANK},{2,BLANK},{BLANK,1},{BLANK,2}&lt;br /&gt;
};&lt;br /&gt;
char truck2glyphs[NCARPOSITIONS][2] = {&lt;br /&gt;
  {3,BLANK},{4,BLANK},{BLANK,3},{BLANK,4}&lt;br /&gt;
};&lt;br /&gt;
char crash2glyphs[NCARPOSITIONS][2] = {&lt;br /&gt;
  {5,BLANK},{6,BLANK},{BLANK,5},{BLANK,6}&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
const int ROADLEN = 15; // LCD width (not counting our car)&lt;br /&gt;
int road[ROADLEN]; // positions of other cars&lt;br /&gt;
char line_buff[2+ROADLEN]; // aux string for drawRoad()&lt;br /&gt;
int road_index;&lt;br /&gt;
int car_pos;&lt;br /&gt;
// Off-the-grid position means empty column, so MAXROADPOS&lt;br /&gt;
// determines the probability of a car in a column&lt;br /&gt;
// e.g. 3*NCARPOSITIONS gives p=1/3&lt;br /&gt;
const int MAXROADPOS = 3*NCARPOSITIONS;&lt;br /&gt;
int step_duration;&lt;br /&gt;
&lt;br /&gt;
int crash; // true if crashed&lt;br /&gt;
unsigned int crashtime; // millis() when crashed&lt;br /&gt;
const int CRASHSOUNDDURATION = 250;&lt;br /&gt;
&lt;br /&gt;
const char *INTRO1=&amp;quot;Trucks ahead,&amp;quot;;&lt;br /&gt;
const char *INTRO2=&amp;quot;Drive carefully&amp;quot;;&lt;br /&gt;
const int INTRODELAY = 2000;&lt;br /&gt;
&lt;br /&gt;
void setup()&lt;br /&gt;
{&lt;br /&gt;
  crash = crashtime = road_index = 0;&lt;br /&gt;
  step_duration = MAXSTEPDURATION;&lt;br /&gt;
  line_buff[1+ROADLEN] = &#039;\0&#039;; // null terminate it&lt;br /&gt;
  randomSeed(analogRead(RANDSEEDPIN));&lt;br /&gt;
  for (int i=0; i&amp;lt;NGLYPHS; i++) {&lt;br /&gt;
    lcd.createChar(i+1,glyphs[i]);&lt;br /&gt;
  }&lt;br /&gt;
  for (int i=0; i&amp;lt;ROADLEN; i++) {&lt;br /&gt;
    road[i]=-1;&lt;br /&gt;
  }&lt;br /&gt;
  pinMode(SPEAKERPIN,OUTPUT);&lt;br /&gt;
  analogWrite(SPEAKERPIN,0); // to be on the safe side&lt;br /&gt;
  lcd.begin(16,2);&lt;br /&gt;
  getSteeringWheel();&lt;br /&gt;
  drawRoad();&lt;br /&gt;
  lcd.setCursor(1,0);&lt;br /&gt;
  lcd.print(INTRO1);&lt;br /&gt;
  lcd.setCursor(1,1);&lt;br /&gt;
  lcd.print(INTRO2);&lt;br /&gt;
  delay(INTRODELAY);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void loop() {&lt;br /&gt;
  unsigned long now = millis()-INTRODELAY;&lt;br /&gt;
  if (!crash) {&lt;br /&gt;
    getSteeringWheel();&lt;br /&gt;
    crash = (car_pos==road[road_index]);&lt;br /&gt;
  }&lt;br /&gt;
  if (crash) {&lt;br /&gt;
    if (!crashtime) {&lt;br /&gt;
      crashtime=now;&lt;br /&gt;
      drawRoad();&lt;br /&gt;
      // Game over text&lt;br /&gt;
      // (keep first 2 &amp;quot;crash&amp;quot; columns intact)&lt;br /&gt;
      lcd.setCursor(2,0);&lt;br /&gt;
      lcd.print(&amp;quot;Crashed after&amp;quot;);&lt;br /&gt;
      lcd.setCursor(2,1);&lt;br /&gt;
      lcd.print(now/1000);&lt;br /&gt;
      lcd.print(&amp;quot; seconds.&amp;quot;);&lt;br /&gt;
    }&lt;br /&gt;
    if ((now-crashtime)&amp;lt;CRASHSOUNDDURATION) {&lt;br /&gt;
      analogWrite(SPEAKERPIN,random(255)); // white noise&lt;br /&gt;
    } &lt;br /&gt;
    else {&lt;br /&gt;
      analogWrite(SPEAKERPIN,0); // dramatic post-crush silence :)   &lt;br /&gt;
    }&lt;br /&gt;
    delay(10); // Wait a bit between writes&lt;br /&gt;
  } &lt;br /&gt;
  else {&lt;br /&gt;
&lt;br /&gt;
    int prev_pos = road[(road_index-1)%ROADLEN];&lt;br /&gt;
    int this_pos = random(MAXROADPOS);&lt;br /&gt;
    while (abs(this_pos-prev_pos)&amp;lt;2) { // don&#039;t jam the road&lt;br /&gt;
      this_pos = random(MAXROADPOS);&lt;br /&gt;
    }&lt;br /&gt;
    road[road_index] = this_pos;&lt;br /&gt;
    road_index = (road_index+1)%ROADLEN;&lt;br /&gt;
    drawRoad();&lt;br /&gt;
    delay(step_duration);&lt;br /&gt;
    if (step_duration&amp;gt;MINSTEPDURATION) {&lt;br /&gt;
      step_duration--; // go faster&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
void getSteeringWheel() {&lt;br /&gt;
  car_pos = map(analogRead(POTPIN),0,1024,0,NCARPOSITIONS);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void drawRoad() {&lt;br /&gt;
  for (int i=0; i&amp;lt;2; i++) {&lt;br /&gt;
    if (crash) {&lt;br /&gt;
      line_buff[0]=crash2glyphs[car_pos][i];&lt;br /&gt;
    } &lt;br /&gt;
    else {&lt;br /&gt;
      line_buff[0]=car2glyphs[car_pos][i];&lt;br /&gt;
    }&lt;br /&gt;
    for (int j=0; j&amp;lt;ROADLEN; j++) {&lt;br /&gt;
      int pos = road[(j+road_index)%ROADLEN];&lt;br /&gt;
      line_buff[j+1] = pos&amp;gt;=0 &amp;amp;&amp;amp; pos&amp;lt;NCARPOSITIONS ? truck2glyphs[pos][i] : BLANK;&lt;br /&gt;
    }&lt;br /&gt;
    lcd.setCursor(0,i);&lt;br /&gt;
    lcd.print(line_buff);&lt;br /&gt;
  }&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Freeduino Whack-A-Mole==&lt;br /&gt;
And next, Freeduino Whack-A-Mole![http://www.google.com/url?sa=t&amp;amp;rct=j&amp;amp;q=&amp;amp;esrc=s&amp;amp;source=web&amp;amp;cd=1&amp;amp;cts=1331224454832&amp;amp;ved=0CCkQFjAA&amp;amp;url=http%3A%2F%2Fwww.arduino.cc%2Fcgi-bin%2Fyabb2%2FYaBB.pl%3Fnum%3D1262971548&amp;amp;ei=VeFYT7udG-W30gHRztSsDw&amp;amp;usg=AFQjCNF8jYa_NAlX93ekQY-i1_jE6sCTuQ&amp;amp;sig2=KC_H8S7tHq7lLiaMqooF1g] We need 5-way joysticks for this one. It will introduce the Arduino Serial Monitor.&lt;br /&gt;
We&#039;re getting this 5-way joystick (5 way= up,down,left,right and button press)- it&#039;s a navigation switch from Adafruit.[https://www.adafruit.com/products/504]&lt;br /&gt;
&lt;br /&gt;
Here&#039;s the datasheet for the 5-way switch&amp;quot; [http://www.adafruit.com/datasheets/SKQUCAA010-ALPS.pdf]&lt;br /&gt;
&lt;br /&gt;
Here&#039;s how it&#039;s hooked up:[[File:WhackamoleSwitch.jpg]]&lt;br /&gt;
&lt;br /&gt;
Here&#039;s the code:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/*&lt;br /&gt;
This is a whackamole game. &lt;br /&gt;
 Joystick connected as follows: (Instructions are for Adafruit 5-way switch part 504)&lt;br /&gt;
 Up    Arduino digital pin 3, to switch pin 5&lt;br /&gt;
 Right		 Arduino digital pin 4, to switch pin 3&lt;br /&gt;
 Down		  Arduino digital pin 5, to switch pin 2&lt;br /&gt;
 Left		  Arduino digital pin 6, to switch pin 1&lt;br /&gt;
 Button		Arduino digital pin 7, to switch pin 6&lt;br /&gt;
 &lt;br /&gt;
 If you follow this map it should work--you might have to rotate your breadboard&lt;br /&gt;
 Make sure the switch is well connected to the breadboard.&lt;br /&gt;
 &lt;br /&gt;
 Common: Digital Pin 2 to switch pin 4&lt;br /&gt;
 &lt;br /&gt;
 Press the button to start&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
const char cross = &#039;*&#039;;&lt;br /&gt;
const char mole = &#039;O&#039;;&lt;br /&gt;
const char both = &#039;@&#039;;&lt;br /&gt;
const char miss = &#039;x&#039;;&lt;br /&gt;
const char hit = &#039;#&#039;;&lt;br /&gt;
const char blank = &#039;.&#039;;&lt;br /&gt;
&lt;br /&gt;
int crossCoor;&lt;br /&gt;
int moleCoor;&lt;br /&gt;
long spawn;&lt;br /&gt;
int limit;&lt;br /&gt;
char pic;&lt;br /&gt;
boolean dead;&lt;br /&gt;
int coor;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
void setup()  {&lt;br /&gt;
  for(int i=3; i&amp;lt;=7; i++) {&lt;br /&gt;
    pinMode(i, INPUT);&lt;br /&gt;
    digitalWrite(i, HIGH);&lt;br /&gt;
  }&lt;br /&gt;
  pinMode(2, OUTPUT);&lt;br /&gt;
  digitalWrite(2, LOW);&lt;br /&gt;
  Serial.begin(115200);&lt;br /&gt;
  coor=5;//start out in the middle&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
int crossGet()  {//fixed so it works a little better w 5 way switch now&lt;br /&gt;
&lt;br /&gt;
  int mycoor = coor;&lt;br /&gt;
  if(digitalRead(3) == HIGH)  {//up&lt;br /&gt;
    mycoor += 3;&lt;br /&gt;
  }&lt;br /&gt;
  if(digitalRead(5) == HIGH)  {//down&lt;br /&gt;
    mycoor -= 3;&lt;br /&gt;
  }&lt;br /&gt;
  if(digitalRead(4) == HIGH)  {//right&lt;br /&gt;
    mycoor --;&lt;br /&gt;
  }&lt;br /&gt;
  if(digitalRead(6) == HIGH)  {//left&lt;br /&gt;
    mycoor ++;&lt;br /&gt;
  }&lt;br /&gt;
  if((mycoor&amp;gt;0)&amp;amp;(mycoor&amp;lt;10)){&lt;br /&gt;
     coor=mycoor;&lt;br /&gt;
  }&lt;br /&gt;
   return coor;  &lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
boolean pressed()  {&lt;br /&gt;
  boolean res;&lt;br /&gt;
  if(digitalRead(7)==LOW)  {&lt;br /&gt;
    res=true;&lt;br /&gt;
  }&lt;br /&gt;
  else  {&lt;br /&gt;
    res=false;&lt;br /&gt;
  }&lt;br /&gt;
  return res;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void display(int molePos)  {&lt;br /&gt;
  int one=crossGet();&lt;br /&gt;
  boolean button = pressed();&lt;br /&gt;
  for(int i=1; i&amp;lt;=9; i++)  {&lt;br /&gt;
&lt;br /&gt;
    if(one==i &amp;amp;&amp;amp; molePos==i)  {&lt;br /&gt;
      if(button)  {&lt;br /&gt;
        pic = hit;&lt;br /&gt;
        dead=true;&lt;br /&gt;
      }&lt;br /&gt;
      else  {&lt;br /&gt;
        pic=both;&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
    else if(one == i)  {&lt;br /&gt;
      if(button)  {&lt;br /&gt;
        pic=miss;&lt;br /&gt;
      }&lt;br /&gt;
      else  {&lt;br /&gt;
        pic=cross;&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
    else if(molePos==i)  {&lt;br /&gt;
      pic=mole;&lt;br /&gt;
    }&lt;br /&gt;
    else  {&lt;br /&gt;
      pic=blank;&lt;br /&gt;
    }&lt;br /&gt;
    if(i==3 || i==6 || i==9)  {&lt;br /&gt;
      Serial.println(pic);&lt;br /&gt;
    }&lt;br /&gt;
    else  {&lt;br /&gt;
      Serial.print(pic);&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void makeMole()  {&lt;br /&gt;
  spawn = millis();&lt;br /&gt;
  randomSeed(analogRead(0));&lt;br /&gt;
  moleCoor = random(1, 10);&lt;br /&gt;
  dead=false;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void noMole()  {&lt;br /&gt;
  moleCoor=10;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void loop()  {&lt;br /&gt;
  Serial.println(&amp;quot;Ready to play?&amp;quot;);&lt;br /&gt;
  while(digitalRead(7)==HIGH)  {&lt;br /&gt;
  }&lt;br /&gt;
  Serial.println(&amp;quot;Ready...&amp;quot;);&lt;br /&gt;
  delay(1000);&lt;br /&gt;
  Serial.println(&amp;quot;Set...&amp;quot;);&lt;br /&gt;
  delay(1000);&lt;br /&gt;
  Serial.println(&amp;quot;GO!&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
  boolean lost = false;&lt;br /&gt;
  int score = 0;&lt;br /&gt;
  limit= 5000;&lt;br /&gt;
&lt;br /&gt;
  while(lost==false ) {&lt;br /&gt;
    int time = random(100, 300);&lt;br /&gt;
    for(int i=0; i&amp;lt;=time; i++)  {&lt;br /&gt;
      display(10);&lt;br /&gt;
      Serial.println();&lt;br /&gt;
      delay(50);&lt;br /&gt;
    }&lt;br /&gt;
    makeMole();&lt;br /&gt;
    while(dead==false &amp;amp;&amp;amp; spawn+limit &amp;gt;= millis())  {&lt;br /&gt;
      display(moleCoor);&lt;br /&gt;
      if(pic==&#039;#&#039;)  {&lt;br /&gt;
        dead = true;&lt;br /&gt;
      }&lt;br /&gt;
      Serial.println();&lt;br /&gt;
      delay(50);&lt;br /&gt;
    }&lt;br /&gt;
    if(dead)  {&lt;br /&gt;
&lt;br /&gt;
      score++;&lt;br /&gt;
      if(limit&amp;gt;1000)  {&lt;br /&gt;
        limit -= 50;&lt;br /&gt;
      }&lt;br /&gt;
      delay(100);&lt;br /&gt;
&lt;br /&gt;
    }&lt;br /&gt;
    else  {&lt;br /&gt;
      break;&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
  Serial.println(&amp;quot;You lost&amp;quot;);&lt;br /&gt;
  delay(1000);&lt;br /&gt;
  Serial.print(&amp;quot;Your score was  &amp;quot;);&lt;br /&gt;
  Serial.println(score);&lt;br /&gt;
  Serial.println();&lt;br /&gt;
  delay(1000);&lt;br /&gt;
  while(digitalRead(7)==HIGH)  {&lt;br /&gt;
  }&lt;br /&gt;
  delay(1000);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The code works okay with the Serial Monitor, except it scrolls away so it can be hard to track what&#039;s happening with the little whack-a-mole symbols. Instead--you could have a Processing program turn the symbols into pictures. Download &amp;amp; install Processing from processing.org (very similar to Arduino except is generally for making programs on your laptop), unzip these files [http://www.lvl1.org/wp-content/uploads/2012/03/WhackAMoleScreen2.zip] and put them in your Processing sketch folder, plug in your Arduino running the Whack-a-Mole code and finally launch the Processing Whack-a-Mole screen program. For Windows users, if it doesn&#039;t connect, you might have to adjust the portName string from Serial.list()[0] to Serial.list()[1] or another number that connects with your Arduino.&lt;br /&gt;
&lt;br /&gt;
==Others==&lt;br /&gt;
What games can you make from a Freeduino, LCD, one pot, one 5-way joystick, some LEDs, a temperature sensor, a light sensor and maybe a piezo speaker? &lt;br /&gt;
&lt;br /&gt;
==Advanced==&lt;br /&gt;
You are also allowed to use the Serial Monitor in combination with Processing or the like, to do stuff on your computer&#039;s display. The Freeduino should be the game engine.&lt;/div&gt;</summary>
		<author><name>Ckharnett</name></author>
	</entry>
	<entry>
		<id>http://wiki.lvl1.org/index.php?title=Freeduino_Games&amp;diff=3880</id>
		<title>Freeduino Games</title>
		<link rel="alternate" type="text/html" href="http://wiki.lvl1.org/index.php?title=Freeduino_Games&amp;diff=3880"/>
		<updated>2012-03-22T14:21:01Z</updated>

		<summary type="html">&lt;p&gt;Ckharnett: /* Freeduino Whack-A-Mole */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Freeduino Truck Lane==&lt;br /&gt;
Go from the Freeduino Spring Training LCD activity to a game!&lt;br /&gt;
&lt;br /&gt;
Need a Freeduino, a 10K pot, and a 16x2 LCD and a solderless breadboard.&lt;br /&gt;
Follow all steps in [[4th Inning]].&lt;br /&gt;
Now, pull the middle pot pin out of the LCD. Just connect that LCD pin to ground. (It&#039;s the third pin from the end of the LCD) This should give you a high contrast display. We need to use the pot for steering!&lt;br /&gt;
Connect the middle pot pin instead to Analog Input pin 1 of your Freeduino.&lt;br /&gt;
We didn&#039;t add a speaker, just used pin 13 to light up the onboard green LED if you &amp;quot;crash&amp;quot; in the game. If you want to use a speaker, connect it to a PWM pin like digital 3, 5 or 6 and adjust the code accordingly.&lt;br /&gt;
&lt;br /&gt;
Here&#039;s the code, cut and paste this into Arduino and install it to your board. Play away. To play again, press the Freeduino&#039;s reset button.&lt;br /&gt;
&lt;br /&gt;
Much more including videos at the game&#039;s original site [http://www.instructables.com/id/Truck-Lane-a-16x2-LCD-Arduino-game/].&lt;br /&gt;
We&#039;ve changed the pinouts in the code to match what we did in the Freeduino Spring Training LCD activity.&lt;br /&gt;
&lt;br /&gt;
Can you modify the code to make a game that rewards crashing? For example, scoot around catching falling &amp;quot;coins,&amp;quot; and see how many you can collect within a certain time. Then, make them fall faster and faster! This would be a fun way to learn more about what the code is doing.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;/* Simple Car game for a 16x2 LCD display &lt;br /&gt;
   You can use any Hitachi HD44780 compatible LCD.&lt;br /&gt;
   Modified for LVL1 Spring Training LCD Activity,&lt;br /&gt;
    Originally from &lt;br /&gt;
    @TheRealDod, Nov 25, 2010&lt;br /&gt;
   There&#039;s a &amp;quot;steering wheel&amp;quot; potentiometer on analog input 1,&lt;br /&gt;
   and a led on pin 13&lt;br /&gt;
   &lt;br /&gt;
   Enjoy,&lt;br /&gt;
&lt;br /&gt;
*/&lt;br /&gt;
#include &amp;lt;LiquidCrystal.h&amp;gt;&lt;br /&gt;
// LiquidCrystal display&lt;br /&gt;
// You can use any Hitachi HD44780 compatible. Wiring explained at&lt;br /&gt;
// http://www.arduino.cc/en/Tutorial/LiquidCrystal&lt;br /&gt;
LiquidCrystal lcd(7, 8, 9, 10, 11, 12);&lt;br /&gt;
&lt;br /&gt;
// Steering wheel potentiometer&lt;br /&gt;
const int POTPIN = 1;&lt;br /&gt;
const int MAXPOT = 800; // no need to turn the wheel all the way to 1023 :)&lt;br /&gt;
&lt;br /&gt;
// Piezo speaker&lt;br /&gt;
const int SPEAKERPIN = 13;//you can see the led flash when u crash&lt;br /&gt;
&lt;br /&gt;
const int RANDSEEDPIN = 0; // an analog pin that isn&#039;t connected to anything&lt;br /&gt;
&lt;br /&gt;
const int MAXSTEPDURATION = 300; // Start slowly, each step is 1 millisec shorter.&lt;br /&gt;
const int MINSTEPDURATION = 150; // This is as fast as it gets&lt;br /&gt;
&lt;br /&gt;
const int NGLYPHS = 6;&lt;br /&gt;
// the glyphs will be defined starting from 1 (not 0),&lt;br /&gt;
// to enable lcd.print() of null-terminated strings&lt;br /&gt;
byte glyphs[NGLYPHS][8] = {&lt;br /&gt;
  // 1: car up&lt;br /&gt;
  { B00000,&lt;br /&gt;
    B01110,&lt;br /&gt;
    B11111,&lt;br /&gt;
    B01010,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B00000}&lt;br /&gt;
  // 2: car down&lt;br /&gt;
  ,{B00000,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B01110,&lt;br /&gt;
    B11111,&lt;br /&gt;
    B01010,&lt;br /&gt;
    B00000}&lt;br /&gt;
  // 3: truck up&lt;br /&gt;
  ,{B00000,&lt;br /&gt;
    B11110,&lt;br /&gt;
    B11111,&lt;br /&gt;
    B01010,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B00000}&lt;br /&gt;
  // 4: truck down&lt;br /&gt;
  ,{B00000,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B11110,&lt;br /&gt;
    B11111,&lt;br /&gt;
    B01010,&lt;br /&gt;
    B00000}&lt;br /&gt;
  // 5: crash up&lt;br /&gt;
  ,{B10101,&lt;br /&gt;
    B01110,&lt;br /&gt;
    B01110,&lt;br /&gt;
    B10101,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B00000}&lt;br /&gt;
  // 6: crash down&lt;br /&gt;
  ,{B00000,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B10101,&lt;br /&gt;
    B01110,&lt;br /&gt;
    B01110,&lt;br /&gt;
    B10101,&lt;br /&gt;
    B00000}&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
const int NCARPOSITIONS = 4;&lt;br /&gt;
&lt;br /&gt;
// Each position is mapped to a column of 2 glyphs&lt;br /&gt;
// Used to make sense when I had a 5th position&lt;br /&gt;
// where car or crash was drawn as 2 glyphs&lt;br /&gt;
// (can&#039;t do that since 0 terminates strings),&lt;br /&gt;
// so it&#039;s kinda silly now, but it ain&#039;t broke :)&lt;br /&gt;
const char BLANK=32;&lt;br /&gt;
char car2glyphs[NCARPOSITIONS][2] = {&lt;br /&gt;
  {1,BLANK},{2,BLANK},{BLANK,1},{BLANK,2}&lt;br /&gt;
};&lt;br /&gt;
char truck2glyphs[NCARPOSITIONS][2] = {&lt;br /&gt;
  {3,BLANK},{4,BLANK},{BLANK,3},{BLANK,4}&lt;br /&gt;
};&lt;br /&gt;
char crash2glyphs[NCARPOSITIONS][2] = {&lt;br /&gt;
  {5,BLANK},{6,BLANK},{BLANK,5},{BLANK,6}&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
const int ROADLEN = 15; // LCD width (not counting our car)&lt;br /&gt;
int road[ROADLEN]; // positions of other cars&lt;br /&gt;
char line_buff[2+ROADLEN]; // aux string for drawRoad()&lt;br /&gt;
int road_index;&lt;br /&gt;
int car_pos;&lt;br /&gt;
// Off-the-grid position means empty column, so MAXROADPOS&lt;br /&gt;
// determines the probability of a car in a column&lt;br /&gt;
// e.g. 3*NCARPOSITIONS gives p=1/3&lt;br /&gt;
const int MAXROADPOS = 3*NCARPOSITIONS;&lt;br /&gt;
int step_duration;&lt;br /&gt;
&lt;br /&gt;
int crash; // true if crashed&lt;br /&gt;
unsigned int crashtime; // millis() when crashed&lt;br /&gt;
const int CRASHSOUNDDURATION = 250;&lt;br /&gt;
&lt;br /&gt;
const char *INTRO1=&amp;quot;Trucks ahead,&amp;quot;;&lt;br /&gt;
const char *INTRO2=&amp;quot;Drive carefully&amp;quot;;&lt;br /&gt;
const int INTRODELAY = 2000;&lt;br /&gt;
&lt;br /&gt;
void setup()&lt;br /&gt;
{&lt;br /&gt;
  crash = crashtime = road_index = 0;&lt;br /&gt;
  step_duration = MAXSTEPDURATION;&lt;br /&gt;
  line_buff[1+ROADLEN] = &#039;\0&#039;; // null terminate it&lt;br /&gt;
  randomSeed(analogRead(RANDSEEDPIN));&lt;br /&gt;
  for (int i=0; i&amp;lt;NGLYPHS; i++) {&lt;br /&gt;
    lcd.createChar(i+1,glyphs[i]);&lt;br /&gt;
  }&lt;br /&gt;
  for (int i=0; i&amp;lt;ROADLEN; i++) {&lt;br /&gt;
    road[i]=-1;&lt;br /&gt;
  }&lt;br /&gt;
  pinMode(SPEAKERPIN,OUTPUT);&lt;br /&gt;
  analogWrite(SPEAKERPIN,0); // to be on the safe side&lt;br /&gt;
  lcd.begin(16,2);&lt;br /&gt;
  getSteeringWheel();&lt;br /&gt;
  drawRoad();&lt;br /&gt;
  lcd.setCursor(1,0);&lt;br /&gt;
  lcd.print(INTRO1);&lt;br /&gt;
  lcd.setCursor(1,1);&lt;br /&gt;
  lcd.print(INTRO2);&lt;br /&gt;
  delay(INTRODELAY);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void loop() {&lt;br /&gt;
  unsigned long now = millis()-INTRODELAY;&lt;br /&gt;
  if (!crash) {&lt;br /&gt;
    getSteeringWheel();&lt;br /&gt;
    crash = (car_pos==road[road_index]);&lt;br /&gt;
  }&lt;br /&gt;
  if (crash) {&lt;br /&gt;
    if (!crashtime) {&lt;br /&gt;
      crashtime=now;&lt;br /&gt;
      drawRoad();&lt;br /&gt;
      // Game over text&lt;br /&gt;
      // (keep first 2 &amp;quot;crash&amp;quot; columns intact)&lt;br /&gt;
      lcd.setCursor(2,0);&lt;br /&gt;
      lcd.print(&amp;quot;Crashed after&amp;quot;);&lt;br /&gt;
      lcd.setCursor(2,1);&lt;br /&gt;
      lcd.print(now/1000);&lt;br /&gt;
      lcd.print(&amp;quot; seconds.&amp;quot;);&lt;br /&gt;
    }&lt;br /&gt;
    if ((now-crashtime)&amp;lt;CRASHSOUNDDURATION) {&lt;br /&gt;
      analogWrite(SPEAKERPIN,random(255)); // white noise&lt;br /&gt;
    } &lt;br /&gt;
    else {&lt;br /&gt;
      analogWrite(SPEAKERPIN,0); // dramatic post-crush silence :)   &lt;br /&gt;
    }&lt;br /&gt;
    delay(10); // Wait a bit between writes&lt;br /&gt;
  } &lt;br /&gt;
  else {&lt;br /&gt;
&lt;br /&gt;
    int prev_pos = road[(road_index-1)%ROADLEN];&lt;br /&gt;
    int this_pos = random(MAXROADPOS);&lt;br /&gt;
    while (abs(this_pos-prev_pos)&amp;lt;2) { // don&#039;t jam the road&lt;br /&gt;
      this_pos = random(MAXROADPOS);&lt;br /&gt;
    }&lt;br /&gt;
    road[road_index] = this_pos;&lt;br /&gt;
    road_index = (road_index+1)%ROADLEN;&lt;br /&gt;
    drawRoad();&lt;br /&gt;
    delay(step_duration);&lt;br /&gt;
    if (step_duration&amp;gt;MINSTEPDURATION) {&lt;br /&gt;
      step_duration--; // go faster&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
void getSteeringWheel() {&lt;br /&gt;
  car_pos = map(analogRead(POTPIN),0,1024,0,NCARPOSITIONS);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void drawRoad() {&lt;br /&gt;
  for (int i=0; i&amp;lt;2; i++) {&lt;br /&gt;
    if (crash) {&lt;br /&gt;
      line_buff[0]=crash2glyphs[car_pos][i];&lt;br /&gt;
    } &lt;br /&gt;
    else {&lt;br /&gt;
      line_buff[0]=car2glyphs[car_pos][i];&lt;br /&gt;
    }&lt;br /&gt;
    for (int j=0; j&amp;lt;ROADLEN; j++) {&lt;br /&gt;
      int pos = road[(j+road_index)%ROADLEN];&lt;br /&gt;
      line_buff[j+1] = pos&amp;gt;=0 &amp;amp;&amp;amp; pos&amp;lt;NCARPOSITIONS ? truck2glyphs[pos][i] : BLANK;&lt;br /&gt;
    }&lt;br /&gt;
    lcd.setCursor(0,i);&lt;br /&gt;
    lcd.print(line_buff);&lt;br /&gt;
  }&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Freeduino Whack-A-Mole==&lt;br /&gt;
And next, Freeduino Whack-A-Mole![http://www.google.com/url?sa=t&amp;amp;rct=j&amp;amp;q=&amp;amp;esrc=s&amp;amp;source=web&amp;amp;cd=1&amp;amp;cts=1331224454832&amp;amp;ved=0CCkQFjAA&amp;amp;url=http%3A%2F%2Fwww.arduino.cc%2Fcgi-bin%2Fyabb2%2FYaBB.pl%3Fnum%3D1262971548&amp;amp;ei=VeFYT7udG-W30gHRztSsDw&amp;amp;usg=AFQjCNF8jYa_NAlX93ekQY-i1_jE6sCTuQ&amp;amp;sig2=KC_H8S7tHq7lLiaMqooF1g] We need 5-way joysticks for this one. It will introduce the Arduino Serial Monitor.&lt;br /&gt;
We&#039;re getting this 5-way joystick (5 way= up,down,left,right and button press)- it&#039;s a navigation switch from Adafruit.[https://www.adafruit.com/products/504]&lt;br /&gt;
&lt;br /&gt;
Here&#039;s the datasheet for the 5-way switch&amp;quot; [http://www.adafruit.com/datasheets/SKQUCAA010-ALPS.pdf]&lt;br /&gt;
&lt;br /&gt;
Here&#039;s how it&#039;s hooked up:[[File:WhackamoleSwitch.jpg]]&lt;br /&gt;
&lt;br /&gt;
Here&#039;s the code:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/*&lt;br /&gt;
This is a whackamole game. &lt;br /&gt;
 Joystick connected as follows: (Instructions are for Adafruit 5-way switch part 504)&lt;br /&gt;
 Up    Arduino digital pin 3, to switch pin 5&lt;br /&gt;
 Right		 Arduino digital pin 4, to switch pin 3&lt;br /&gt;
 Down		  Arduino digital pin 5, to switch pin 2&lt;br /&gt;
 Left		  Arduino digital pin 6, to switch pin 1&lt;br /&gt;
 Button		Arduino digital pin 7, to switch pin 6&lt;br /&gt;
 &lt;br /&gt;
 If you follow this map it should work--you might have to rotate your breadboard&lt;br /&gt;
 Make sure the switch is well connected to the breadboard.&lt;br /&gt;
 &lt;br /&gt;
 Common: Digital Pin 2 to switch pin 4&lt;br /&gt;
 &lt;br /&gt;
 Press the button to start&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
const char cross = &#039;*&#039;;&lt;br /&gt;
const char mole = &#039;O&#039;;&lt;br /&gt;
const char both = &#039;@&#039;;&lt;br /&gt;
const char miss = &#039;x&#039;;&lt;br /&gt;
const char hit = &#039;#&#039;;&lt;br /&gt;
const char blank = &#039;.&#039;;&lt;br /&gt;
&lt;br /&gt;
int crossCoor;&lt;br /&gt;
int moleCoor;&lt;br /&gt;
long spawn;&lt;br /&gt;
int limit;&lt;br /&gt;
char pic;&lt;br /&gt;
boolean dead;&lt;br /&gt;
int coor;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
void setup()  {&lt;br /&gt;
  for(int i=3; i&amp;lt;=7; i++) {&lt;br /&gt;
    pinMode(i, INPUT);&lt;br /&gt;
    digitalWrite(i, HIGH);&lt;br /&gt;
  }&lt;br /&gt;
  pinMode(2, OUTPUT);&lt;br /&gt;
  digitalWrite(2, LOW);&lt;br /&gt;
  Serial.begin(115200);&lt;br /&gt;
  coor=5;//start out in the middle&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
int crossGet()  {//fixed so it works a little better w 5 way switch now&lt;br /&gt;
&lt;br /&gt;
  int mycoor = coor;&lt;br /&gt;
  if(digitalRead(3) == HIGH)  {//up&lt;br /&gt;
    mycoor += 3;&lt;br /&gt;
  }&lt;br /&gt;
  if(digitalRead(5) == HIGH)  {//down&lt;br /&gt;
    mycoor -= 3;&lt;br /&gt;
  }&lt;br /&gt;
  if(digitalRead(4) == HIGH)  {//right&lt;br /&gt;
    mycoor --;&lt;br /&gt;
  }&lt;br /&gt;
  if(digitalRead(6) == HIGH)  {//left&lt;br /&gt;
    mycoor ++;&lt;br /&gt;
  }&lt;br /&gt;
  if((mycoor&amp;gt;0)&amp;amp;(mycoor&amp;lt;10)){&lt;br /&gt;
     coor=mycoor;&lt;br /&gt;
  }&lt;br /&gt;
   return coor;  &lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
boolean pressed()  {&lt;br /&gt;
  boolean res;&lt;br /&gt;
  if(digitalRead(7)==LOW)  {&lt;br /&gt;
    res=true;&lt;br /&gt;
  }&lt;br /&gt;
  else  {&lt;br /&gt;
    res=false;&lt;br /&gt;
  }&lt;br /&gt;
  return res;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void display(int molePos)  {&lt;br /&gt;
  int one=crossGet();&lt;br /&gt;
  boolean button = pressed();&lt;br /&gt;
  for(int i=1; i&amp;lt;=9; i++)  {&lt;br /&gt;
&lt;br /&gt;
    if(one==i &amp;amp;&amp;amp; molePos==i)  {&lt;br /&gt;
      if(button)  {&lt;br /&gt;
        pic = hit;&lt;br /&gt;
        dead=true;&lt;br /&gt;
      }&lt;br /&gt;
      else  {&lt;br /&gt;
        pic=both;&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
    else if(one == i)  {&lt;br /&gt;
      if(button)  {&lt;br /&gt;
        pic=miss;&lt;br /&gt;
      }&lt;br /&gt;
      else  {&lt;br /&gt;
        pic=cross;&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
    else if(molePos==i)  {&lt;br /&gt;
      pic=mole;&lt;br /&gt;
    }&lt;br /&gt;
    else  {&lt;br /&gt;
      pic=blank;&lt;br /&gt;
    }&lt;br /&gt;
    if(i==3 || i==6 || i==9)  {&lt;br /&gt;
      Serial.println(pic);&lt;br /&gt;
    }&lt;br /&gt;
    else  {&lt;br /&gt;
      Serial.print(pic);&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void makeMole()  {&lt;br /&gt;
  spawn = millis();&lt;br /&gt;
  randomSeed(analogRead(0));&lt;br /&gt;
  moleCoor = random(1, 10);&lt;br /&gt;
  dead=false;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void noMole()  {&lt;br /&gt;
  moleCoor=10;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void loop()  {&lt;br /&gt;
  Serial.println(&amp;quot;Ready to play?&amp;quot;);&lt;br /&gt;
  while(digitalRead(7)==HIGH)  {&lt;br /&gt;
  }&lt;br /&gt;
  Serial.println(&amp;quot;Ready...&amp;quot;);&lt;br /&gt;
  delay(1000);&lt;br /&gt;
  Serial.println(&amp;quot;Set...&amp;quot;);&lt;br /&gt;
  delay(1000);&lt;br /&gt;
  Serial.println(&amp;quot;GO!&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
  boolean lost = false;&lt;br /&gt;
  int score = 0;&lt;br /&gt;
  limit= 5000;&lt;br /&gt;
&lt;br /&gt;
  while(lost==false ) {&lt;br /&gt;
    int time = random(100, 300);&lt;br /&gt;
    for(int i=0; i&amp;lt;=time; i++)  {&lt;br /&gt;
      display(10);&lt;br /&gt;
      Serial.println();&lt;br /&gt;
      delay(50);&lt;br /&gt;
    }&lt;br /&gt;
    makeMole();&lt;br /&gt;
    while(dead==false &amp;amp;&amp;amp; spawn+limit &amp;gt;= millis())  {&lt;br /&gt;
      display(moleCoor);&lt;br /&gt;
      if(pic==&#039;#&#039;)  {&lt;br /&gt;
        dead = true;&lt;br /&gt;
      }&lt;br /&gt;
      Serial.println();&lt;br /&gt;
      delay(50);&lt;br /&gt;
    }&lt;br /&gt;
    if(dead)  {&lt;br /&gt;
&lt;br /&gt;
      score++;&lt;br /&gt;
      if(limit&amp;gt;1000)  {&lt;br /&gt;
        limit -= 50;&lt;br /&gt;
      }&lt;br /&gt;
      delay(100);&lt;br /&gt;
&lt;br /&gt;
    }&lt;br /&gt;
    else  {&lt;br /&gt;
      break;&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
  Serial.println(&amp;quot;You lost&amp;quot;);&lt;br /&gt;
  delay(1000);&lt;br /&gt;
  Serial.print(&amp;quot;Your score was  &amp;quot;);&lt;br /&gt;
  Serial.println(score);&lt;br /&gt;
  Serial.println();&lt;br /&gt;
  delay(1000);&lt;br /&gt;
  while(digitalRead(7)==HIGH)  {&lt;br /&gt;
  }&lt;br /&gt;
  delay(1000);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The code works okay with the Serial Monitor, except it scrolls away so it can be hard to track what&#039;s happening with the little whack-a-mole symbols. Instead--you could have a Processing program turn the symbols into pictures. Download &amp;amp; install Processing (very similar to Arduino except is generally for making programs on your laptop), unzip these files [http://www.lvl1.org/wp-content/uploads/2012/03/WhackAMoleScreen2.zip] and put them in your Processing sketch folder, plug in your Arduino running the Whack-a-Mole code and finally launch the Processing Whack-a-Mole screen program.&lt;br /&gt;
&lt;br /&gt;
==Others==&lt;br /&gt;
What games can you make from a Freeduino, LCD, one pot, one 5-way joystick, some LEDs, a temperature sensor, a light sensor and maybe a piezo speaker? &lt;br /&gt;
&lt;br /&gt;
==Advanced==&lt;br /&gt;
You are also allowed to use the Serial Monitor in combination with Processing or the like, to do stuff on your computer&#039;s display. The Freeduino should be the game engine.&lt;/div&gt;</summary>
		<author><name>Ckharnett</name></author>
	</entry>
	<entry>
		<id>http://wiki.lvl1.org/index.php?title=File:WhackamoleSwitch.jpg&amp;diff=3879</id>
		<title>File:WhackamoleSwitch.jpg</title>
		<link rel="alternate" type="text/html" href="http://wiki.lvl1.org/index.php?title=File:WhackamoleSwitch.jpg&amp;diff=3879"/>
		<updated>2012-03-22T14:20:12Z</updated>

		<summary type="html">&lt;p&gt;Ckharnett: Whack-A-Mole Switch&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Whack-A-Mole Switch&lt;/div&gt;</summary>
		<author><name>Ckharnett</name></author>
	</entry>
	<entry>
		<id>http://wiki.lvl1.org/index.php?title=Freeduino_Games&amp;diff=3841</id>
		<title>Freeduino Games</title>
		<link rel="alternate" type="text/html" href="http://wiki.lvl1.org/index.php?title=Freeduino_Games&amp;diff=3841"/>
		<updated>2012-03-18T04:31:45Z</updated>

		<summary type="html">&lt;p&gt;Ckharnett: /* Freeduino Whack-A-Mole */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Freeduino Truck Lane==&lt;br /&gt;
Go from the Freeduino Spring Training LCD activity to a game!&lt;br /&gt;
&lt;br /&gt;
Need a Freeduino, a 10K pot, and a 16x2 LCD and a solderless breadboard.&lt;br /&gt;
Follow all steps in [[4th Inning]].&lt;br /&gt;
Now, pull the middle pot pin out of the LCD. Just connect that LCD pin to ground. (It&#039;s the third pin from the end of the LCD) This should give you a high contrast display. We need to use the pot for steering!&lt;br /&gt;
Connect the middle pot pin instead to Analog Input pin 1 of your Freeduino.&lt;br /&gt;
We didn&#039;t add a speaker, just used pin 13 to light up the onboard green LED if you &amp;quot;crash&amp;quot; in the game. If you want to use a speaker, connect it to a PWM pin like digital 3, 5 or 6 and adjust the code accordingly.&lt;br /&gt;
&lt;br /&gt;
Here&#039;s the code, cut and paste this into Arduino and install it to your board. Play away. To play again, press the Freeduino&#039;s reset button.&lt;br /&gt;
&lt;br /&gt;
Much more including videos at the game&#039;s original site [http://www.instructables.com/id/Truck-Lane-a-16x2-LCD-Arduino-game/].&lt;br /&gt;
We&#039;ve changed the pinouts in the code to match what we did in the Freeduino Spring Training LCD activity.&lt;br /&gt;
&lt;br /&gt;
Can you modify the code to make a game that rewards crashing? For example, scoot around catching falling &amp;quot;coins,&amp;quot; and see how many you can collect within a certain time. Then, make them fall faster and faster! This would be a fun way to learn more about what the code is doing.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;/* Simple Car game for a 16x2 LCD display &lt;br /&gt;
   You can use any Hitachi HD44780 compatible LCD.&lt;br /&gt;
   Modified for LVL1 Spring Training LCD Activity,&lt;br /&gt;
    Originally from &lt;br /&gt;
    @TheRealDod, Nov 25, 2010&lt;br /&gt;
   There&#039;s a &amp;quot;steering wheel&amp;quot; potentiometer on analog input 1,&lt;br /&gt;
   and a led on pin 13&lt;br /&gt;
   &lt;br /&gt;
   Enjoy,&lt;br /&gt;
&lt;br /&gt;
*/&lt;br /&gt;
#include &amp;lt;LiquidCrystal.h&amp;gt;&lt;br /&gt;
// LiquidCrystal display&lt;br /&gt;
// You can use any Hitachi HD44780 compatible. Wiring explained at&lt;br /&gt;
// http://www.arduino.cc/en/Tutorial/LiquidCrystal&lt;br /&gt;
LiquidCrystal lcd(7, 8, 9, 10, 11, 12);&lt;br /&gt;
&lt;br /&gt;
// Steering wheel potentiometer&lt;br /&gt;
const int POTPIN = 1;&lt;br /&gt;
const int MAXPOT = 800; // no need to turn the wheel all the way to 1023 :)&lt;br /&gt;
&lt;br /&gt;
// Piezo speaker&lt;br /&gt;
const int SPEAKERPIN = 13;//you can see the led flash when u crash&lt;br /&gt;
&lt;br /&gt;
const int RANDSEEDPIN = 0; // an analog pin that isn&#039;t connected to anything&lt;br /&gt;
&lt;br /&gt;
const int MAXSTEPDURATION = 300; // Start slowly, each step is 1 millisec shorter.&lt;br /&gt;
const int MINSTEPDURATION = 150; // This is as fast as it gets&lt;br /&gt;
&lt;br /&gt;
const int NGLYPHS = 6;&lt;br /&gt;
// the glyphs will be defined starting from 1 (not 0),&lt;br /&gt;
// to enable lcd.print() of null-terminated strings&lt;br /&gt;
byte glyphs[NGLYPHS][8] = {&lt;br /&gt;
  // 1: car up&lt;br /&gt;
  { B00000,&lt;br /&gt;
    B01110,&lt;br /&gt;
    B11111,&lt;br /&gt;
    B01010,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B00000}&lt;br /&gt;
  // 2: car down&lt;br /&gt;
  ,{B00000,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B01110,&lt;br /&gt;
    B11111,&lt;br /&gt;
    B01010,&lt;br /&gt;
    B00000}&lt;br /&gt;
  // 3: truck up&lt;br /&gt;
  ,{B00000,&lt;br /&gt;
    B11110,&lt;br /&gt;
    B11111,&lt;br /&gt;
    B01010,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B00000}&lt;br /&gt;
  // 4: truck down&lt;br /&gt;
  ,{B00000,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B11110,&lt;br /&gt;
    B11111,&lt;br /&gt;
    B01010,&lt;br /&gt;
    B00000}&lt;br /&gt;
  // 5: crash up&lt;br /&gt;
  ,{B10101,&lt;br /&gt;
    B01110,&lt;br /&gt;
    B01110,&lt;br /&gt;
    B10101,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B00000}&lt;br /&gt;
  // 6: crash down&lt;br /&gt;
  ,{B00000,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B10101,&lt;br /&gt;
    B01110,&lt;br /&gt;
    B01110,&lt;br /&gt;
    B10101,&lt;br /&gt;
    B00000}&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
const int NCARPOSITIONS = 4;&lt;br /&gt;
&lt;br /&gt;
// Each position is mapped to a column of 2 glyphs&lt;br /&gt;
// Used to make sense when I had a 5th position&lt;br /&gt;
// where car or crash was drawn as 2 glyphs&lt;br /&gt;
// (can&#039;t do that since 0 terminates strings),&lt;br /&gt;
// so it&#039;s kinda silly now, but it ain&#039;t broke :)&lt;br /&gt;
const char BLANK=32;&lt;br /&gt;
char car2glyphs[NCARPOSITIONS][2] = {&lt;br /&gt;
  {1,BLANK},{2,BLANK},{BLANK,1},{BLANK,2}&lt;br /&gt;
};&lt;br /&gt;
char truck2glyphs[NCARPOSITIONS][2] = {&lt;br /&gt;
  {3,BLANK},{4,BLANK},{BLANK,3},{BLANK,4}&lt;br /&gt;
};&lt;br /&gt;
char crash2glyphs[NCARPOSITIONS][2] = {&lt;br /&gt;
  {5,BLANK},{6,BLANK},{BLANK,5},{BLANK,6}&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
const int ROADLEN = 15; // LCD width (not counting our car)&lt;br /&gt;
int road[ROADLEN]; // positions of other cars&lt;br /&gt;
char line_buff[2+ROADLEN]; // aux string for drawRoad()&lt;br /&gt;
int road_index;&lt;br /&gt;
int car_pos;&lt;br /&gt;
// Off-the-grid position means empty column, so MAXROADPOS&lt;br /&gt;
// determines the probability of a car in a column&lt;br /&gt;
// e.g. 3*NCARPOSITIONS gives p=1/3&lt;br /&gt;
const int MAXROADPOS = 3*NCARPOSITIONS;&lt;br /&gt;
int step_duration;&lt;br /&gt;
&lt;br /&gt;
int crash; // true if crashed&lt;br /&gt;
unsigned int crashtime; // millis() when crashed&lt;br /&gt;
const int CRASHSOUNDDURATION = 250;&lt;br /&gt;
&lt;br /&gt;
const char *INTRO1=&amp;quot;Trucks ahead,&amp;quot;;&lt;br /&gt;
const char *INTRO2=&amp;quot;Drive carefully&amp;quot;;&lt;br /&gt;
const int INTRODELAY = 2000;&lt;br /&gt;
&lt;br /&gt;
void setup()&lt;br /&gt;
{&lt;br /&gt;
  crash = crashtime = road_index = 0;&lt;br /&gt;
  step_duration = MAXSTEPDURATION;&lt;br /&gt;
  line_buff[1+ROADLEN] = &#039;\0&#039;; // null terminate it&lt;br /&gt;
  randomSeed(analogRead(RANDSEEDPIN));&lt;br /&gt;
  for (int i=0; i&amp;lt;NGLYPHS; i++) {&lt;br /&gt;
    lcd.createChar(i+1,glyphs[i]);&lt;br /&gt;
  }&lt;br /&gt;
  for (int i=0; i&amp;lt;ROADLEN; i++) {&lt;br /&gt;
    road[i]=-1;&lt;br /&gt;
  }&lt;br /&gt;
  pinMode(SPEAKERPIN,OUTPUT);&lt;br /&gt;
  analogWrite(SPEAKERPIN,0); // to be on the safe side&lt;br /&gt;
  lcd.begin(16,2);&lt;br /&gt;
  getSteeringWheel();&lt;br /&gt;
  drawRoad();&lt;br /&gt;
  lcd.setCursor(1,0);&lt;br /&gt;
  lcd.print(INTRO1);&lt;br /&gt;
  lcd.setCursor(1,1);&lt;br /&gt;
  lcd.print(INTRO2);&lt;br /&gt;
  delay(INTRODELAY);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void loop() {&lt;br /&gt;
  unsigned long now = millis()-INTRODELAY;&lt;br /&gt;
  if (!crash) {&lt;br /&gt;
    getSteeringWheel();&lt;br /&gt;
    crash = (car_pos==road[road_index]);&lt;br /&gt;
  }&lt;br /&gt;
  if (crash) {&lt;br /&gt;
    if (!crashtime) {&lt;br /&gt;
      crashtime=now;&lt;br /&gt;
      drawRoad();&lt;br /&gt;
      // Game over text&lt;br /&gt;
      // (keep first 2 &amp;quot;crash&amp;quot; columns intact)&lt;br /&gt;
      lcd.setCursor(2,0);&lt;br /&gt;
      lcd.print(&amp;quot;Crashed after&amp;quot;);&lt;br /&gt;
      lcd.setCursor(2,1);&lt;br /&gt;
      lcd.print(now/1000);&lt;br /&gt;
      lcd.print(&amp;quot; seconds.&amp;quot;);&lt;br /&gt;
    }&lt;br /&gt;
    if ((now-crashtime)&amp;lt;CRASHSOUNDDURATION) {&lt;br /&gt;
      analogWrite(SPEAKERPIN,random(255)); // white noise&lt;br /&gt;
    } &lt;br /&gt;
    else {&lt;br /&gt;
      analogWrite(SPEAKERPIN,0); // dramatic post-crush silence :)   &lt;br /&gt;
    }&lt;br /&gt;
    delay(10); // Wait a bit between writes&lt;br /&gt;
  } &lt;br /&gt;
  else {&lt;br /&gt;
&lt;br /&gt;
    int prev_pos = road[(road_index-1)%ROADLEN];&lt;br /&gt;
    int this_pos = random(MAXROADPOS);&lt;br /&gt;
    while (abs(this_pos-prev_pos)&amp;lt;2) { // don&#039;t jam the road&lt;br /&gt;
      this_pos = random(MAXROADPOS);&lt;br /&gt;
    }&lt;br /&gt;
    road[road_index] = this_pos;&lt;br /&gt;
    road_index = (road_index+1)%ROADLEN;&lt;br /&gt;
    drawRoad();&lt;br /&gt;
    delay(step_duration);&lt;br /&gt;
    if (step_duration&amp;gt;MINSTEPDURATION) {&lt;br /&gt;
      step_duration--; // go faster&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
void getSteeringWheel() {&lt;br /&gt;
  car_pos = map(analogRead(POTPIN),0,1024,0,NCARPOSITIONS);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void drawRoad() {&lt;br /&gt;
  for (int i=0; i&amp;lt;2; i++) {&lt;br /&gt;
    if (crash) {&lt;br /&gt;
      line_buff[0]=crash2glyphs[car_pos][i];&lt;br /&gt;
    } &lt;br /&gt;
    else {&lt;br /&gt;
      line_buff[0]=car2glyphs[car_pos][i];&lt;br /&gt;
    }&lt;br /&gt;
    for (int j=0; j&amp;lt;ROADLEN; j++) {&lt;br /&gt;
      int pos = road[(j+road_index)%ROADLEN];&lt;br /&gt;
      line_buff[j+1] = pos&amp;gt;=0 &amp;amp;&amp;amp; pos&amp;lt;NCARPOSITIONS ? truck2glyphs[pos][i] : BLANK;&lt;br /&gt;
    }&lt;br /&gt;
    lcd.setCursor(0,i);&lt;br /&gt;
    lcd.print(line_buff);&lt;br /&gt;
  }&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Freeduino Whack-A-Mole==&lt;br /&gt;
And next, Freeduino Whack-A-Mole![http://www.google.com/url?sa=t&amp;amp;rct=j&amp;amp;q=&amp;amp;esrc=s&amp;amp;source=web&amp;amp;cd=1&amp;amp;cts=1331224454832&amp;amp;ved=0CCkQFjAA&amp;amp;url=http%3A%2F%2Fwww.arduino.cc%2Fcgi-bin%2Fyabb2%2FYaBB.pl%3Fnum%3D1262971548&amp;amp;ei=VeFYT7udG-W30gHRztSsDw&amp;amp;usg=AFQjCNF8jYa_NAlX93ekQY-i1_jE6sCTuQ&amp;amp;sig2=KC_H8S7tHq7lLiaMqooF1g] We need 5-way joysticks for this one. It will introduce the Arduino Serial Monitor.&lt;br /&gt;
We&#039;re getting this 5-way joystick (5 way= up,down,left,right and button press)- it&#039;s a navigation switch from Adafruit.[https://www.adafruit.com/products/504]&lt;br /&gt;
&lt;br /&gt;
Here&#039;s the datasheet for the 5-way switch&amp;quot; [http://www.adafruit.com/datasheets/SKQUCAA010-ALPS.pdf]&lt;br /&gt;
&lt;br /&gt;
Here&#039;s the code:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/*&lt;br /&gt;
This is a whackamole game. &lt;br /&gt;
 Joystick connected as follows: (Instructions are for Adafruit 5-way switch part 504)&lt;br /&gt;
 Up    Arduino digital pin 3, to switch pin 5&lt;br /&gt;
 Right		 Arduino digital pin 4, to switch pin 3&lt;br /&gt;
 Down		  Arduino digital pin 5, to switch pin 2&lt;br /&gt;
 Left		  Arduino digital pin 6, to switch pin 1&lt;br /&gt;
 Button		Arduino digital pin 7, to switch pin 6&lt;br /&gt;
 &lt;br /&gt;
 If you follow this map it should work--you might have to rotate your breadboard&lt;br /&gt;
 Make sure the switch is well connected to the breadboard.&lt;br /&gt;
 &lt;br /&gt;
 Common: Digital Pin 2 to switch pin 4&lt;br /&gt;
 &lt;br /&gt;
 Press the button to start&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
const char cross = &#039;*&#039;;&lt;br /&gt;
const char mole = &#039;O&#039;;&lt;br /&gt;
const char both = &#039;@&#039;;&lt;br /&gt;
const char miss = &#039;x&#039;;&lt;br /&gt;
const char hit = &#039;#&#039;;&lt;br /&gt;
const char blank = &#039;.&#039;;&lt;br /&gt;
&lt;br /&gt;
int crossCoor;&lt;br /&gt;
int moleCoor;&lt;br /&gt;
long spawn;&lt;br /&gt;
int limit;&lt;br /&gt;
char pic;&lt;br /&gt;
boolean dead;&lt;br /&gt;
int coor;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
void setup()  {&lt;br /&gt;
  for(int i=3; i&amp;lt;=7; i++) {&lt;br /&gt;
    pinMode(i, INPUT);&lt;br /&gt;
    digitalWrite(i, HIGH);&lt;br /&gt;
  }&lt;br /&gt;
  pinMode(2, OUTPUT);&lt;br /&gt;
  digitalWrite(2, LOW);&lt;br /&gt;
  Serial.begin(115200);&lt;br /&gt;
  coor=5;//start out in the middle&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
int crossGet()  {//fixed so it works a little better w 5 way switch now&lt;br /&gt;
&lt;br /&gt;
  int mycoor = coor;&lt;br /&gt;
  if(digitalRead(3) == HIGH)  {//up&lt;br /&gt;
    mycoor += 3;&lt;br /&gt;
  }&lt;br /&gt;
  if(digitalRead(5) == HIGH)  {//down&lt;br /&gt;
    mycoor -= 3;&lt;br /&gt;
  }&lt;br /&gt;
  if(digitalRead(4) == HIGH)  {//right&lt;br /&gt;
    mycoor --;&lt;br /&gt;
  }&lt;br /&gt;
  if(digitalRead(6) == HIGH)  {//left&lt;br /&gt;
    mycoor ++;&lt;br /&gt;
  }&lt;br /&gt;
  if((mycoor&amp;gt;0)&amp;amp;(mycoor&amp;lt;10)){&lt;br /&gt;
     coor=mycoor;&lt;br /&gt;
  }&lt;br /&gt;
   return coor;  &lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
boolean pressed()  {&lt;br /&gt;
  boolean res;&lt;br /&gt;
  if(digitalRead(7)==LOW)  {&lt;br /&gt;
    res=true;&lt;br /&gt;
  }&lt;br /&gt;
  else  {&lt;br /&gt;
    res=false;&lt;br /&gt;
  }&lt;br /&gt;
  return res;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void display(int molePos)  {&lt;br /&gt;
  int one=crossGet();&lt;br /&gt;
  boolean button = pressed();&lt;br /&gt;
  for(int i=1; i&amp;lt;=9; i++)  {&lt;br /&gt;
&lt;br /&gt;
    if(one==i &amp;amp;&amp;amp; molePos==i)  {&lt;br /&gt;
      if(button)  {&lt;br /&gt;
        pic = hit;&lt;br /&gt;
        dead=true;&lt;br /&gt;
      }&lt;br /&gt;
      else  {&lt;br /&gt;
        pic=both;&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
    else if(one == i)  {&lt;br /&gt;
      if(button)  {&lt;br /&gt;
        pic=miss;&lt;br /&gt;
      }&lt;br /&gt;
      else  {&lt;br /&gt;
        pic=cross;&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
    else if(molePos==i)  {&lt;br /&gt;
      pic=mole;&lt;br /&gt;
    }&lt;br /&gt;
    else  {&lt;br /&gt;
      pic=blank;&lt;br /&gt;
    }&lt;br /&gt;
    if(i==3 || i==6 || i==9)  {&lt;br /&gt;
      Serial.println(pic);&lt;br /&gt;
    }&lt;br /&gt;
    else  {&lt;br /&gt;
      Serial.print(pic);&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void makeMole()  {&lt;br /&gt;
  spawn = millis();&lt;br /&gt;
  randomSeed(analogRead(0));&lt;br /&gt;
  moleCoor = random(1, 10);&lt;br /&gt;
  dead=false;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void noMole()  {&lt;br /&gt;
  moleCoor=10;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void loop()  {&lt;br /&gt;
  Serial.println(&amp;quot;Ready to play?&amp;quot;);&lt;br /&gt;
  while(digitalRead(7)==HIGH)  {&lt;br /&gt;
  }&lt;br /&gt;
  Serial.println(&amp;quot;Ready...&amp;quot;);&lt;br /&gt;
  delay(1000);&lt;br /&gt;
  Serial.println(&amp;quot;Set...&amp;quot;);&lt;br /&gt;
  delay(1000);&lt;br /&gt;
  Serial.println(&amp;quot;GO!&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
  boolean lost = false;&lt;br /&gt;
  int score = 0;&lt;br /&gt;
  limit= 5000;&lt;br /&gt;
&lt;br /&gt;
  while(lost==false ) {&lt;br /&gt;
    int time = random(100, 300);&lt;br /&gt;
    for(int i=0; i&amp;lt;=time; i++)  {&lt;br /&gt;
      display(10);&lt;br /&gt;
      Serial.println();&lt;br /&gt;
      delay(50);&lt;br /&gt;
    }&lt;br /&gt;
    makeMole();&lt;br /&gt;
    while(dead==false &amp;amp;&amp;amp; spawn+limit &amp;gt;= millis())  {&lt;br /&gt;
      display(moleCoor);&lt;br /&gt;
      if(pic==&#039;#&#039;)  {&lt;br /&gt;
        dead = true;&lt;br /&gt;
      }&lt;br /&gt;
      Serial.println();&lt;br /&gt;
      delay(50);&lt;br /&gt;
    }&lt;br /&gt;
    if(dead)  {&lt;br /&gt;
&lt;br /&gt;
      score++;&lt;br /&gt;
      if(limit&amp;gt;1000)  {&lt;br /&gt;
        limit -= 50;&lt;br /&gt;
      }&lt;br /&gt;
      delay(100);&lt;br /&gt;
&lt;br /&gt;
    }&lt;br /&gt;
    else  {&lt;br /&gt;
      break;&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
  Serial.println(&amp;quot;You lost&amp;quot;);&lt;br /&gt;
  delay(1000);&lt;br /&gt;
  Serial.print(&amp;quot;Your score was  &amp;quot;);&lt;br /&gt;
  Serial.println(score);&lt;br /&gt;
  Serial.println();&lt;br /&gt;
  delay(1000);&lt;br /&gt;
  while(digitalRead(7)==HIGH)  {&lt;br /&gt;
  }&lt;br /&gt;
  delay(1000);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The code works okay with the Serial Monitor, except it scrolls away so it can be hard to track what&#039;s happening with the little whack-a-mole symbols. Instead--you could have a Processing program turn the symbols into pictures. Download &amp;amp; install Processing (very similar to Arduino except is generally for making programs on your laptop), unzip these files [http://www.lvl1.org/wp-content/uploads/2012/03/WhackAMoleScreen2.zip] and put them in your Processing sketch folder, plug in your Arduino running the Whack-a-Mole code and finally launch the Processing Whack-a-Mole screen program.&lt;br /&gt;
&lt;br /&gt;
==Others==&lt;br /&gt;
What games can you make from a Freeduino, LCD, one pot, one 5-way joystick, some LEDs, a temperature sensor, a light sensor and maybe a piezo speaker? &lt;br /&gt;
&lt;br /&gt;
==Advanced==&lt;br /&gt;
You are also allowed to use the Serial Monitor in combination with Processing or the like, to do stuff on your computer&#039;s display. The Freeduino should be the game engine.&lt;/div&gt;</summary>
		<author><name>Ckharnett</name></author>
	</entry>
	<entry>
		<id>http://wiki.lvl1.org/index.php?title=Freeduino_Games&amp;diff=3840</id>
		<title>Freeduino Games</title>
		<link rel="alternate" type="text/html" href="http://wiki.lvl1.org/index.php?title=Freeduino_Games&amp;diff=3840"/>
		<updated>2012-03-18T04:24:35Z</updated>

		<summary type="html">&lt;p&gt;Ckharnett: /* Freeduino Whack-A-Mole */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Freeduino Truck Lane==&lt;br /&gt;
Go from the Freeduino Spring Training LCD activity to a game!&lt;br /&gt;
&lt;br /&gt;
Need a Freeduino, a 10K pot, and a 16x2 LCD and a solderless breadboard.&lt;br /&gt;
Follow all steps in [[4th Inning]].&lt;br /&gt;
Now, pull the middle pot pin out of the LCD. Just connect that LCD pin to ground. (It&#039;s the third pin from the end of the LCD) This should give you a high contrast display. We need to use the pot for steering!&lt;br /&gt;
Connect the middle pot pin instead to Analog Input pin 1 of your Freeduino.&lt;br /&gt;
We didn&#039;t add a speaker, just used pin 13 to light up the onboard green LED if you &amp;quot;crash&amp;quot; in the game. If you want to use a speaker, connect it to a PWM pin like digital 3, 5 or 6 and adjust the code accordingly.&lt;br /&gt;
&lt;br /&gt;
Here&#039;s the code, cut and paste this into Arduino and install it to your board. Play away. To play again, press the Freeduino&#039;s reset button.&lt;br /&gt;
&lt;br /&gt;
Much more including videos at the game&#039;s original site [http://www.instructables.com/id/Truck-Lane-a-16x2-LCD-Arduino-game/].&lt;br /&gt;
We&#039;ve changed the pinouts in the code to match what we did in the Freeduino Spring Training LCD activity.&lt;br /&gt;
&lt;br /&gt;
Can you modify the code to make a game that rewards crashing? For example, scoot around catching falling &amp;quot;coins,&amp;quot; and see how many you can collect within a certain time. Then, make them fall faster and faster! This would be a fun way to learn more about what the code is doing.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;/* Simple Car game for a 16x2 LCD display &lt;br /&gt;
   You can use any Hitachi HD44780 compatible LCD.&lt;br /&gt;
   Modified for LVL1 Spring Training LCD Activity,&lt;br /&gt;
    Originally from &lt;br /&gt;
    @TheRealDod, Nov 25, 2010&lt;br /&gt;
   There&#039;s a &amp;quot;steering wheel&amp;quot; potentiometer on analog input 1,&lt;br /&gt;
   and a led on pin 13&lt;br /&gt;
   &lt;br /&gt;
   Enjoy,&lt;br /&gt;
&lt;br /&gt;
*/&lt;br /&gt;
#include &amp;lt;LiquidCrystal.h&amp;gt;&lt;br /&gt;
// LiquidCrystal display&lt;br /&gt;
// You can use any Hitachi HD44780 compatible. Wiring explained at&lt;br /&gt;
// http://www.arduino.cc/en/Tutorial/LiquidCrystal&lt;br /&gt;
LiquidCrystal lcd(7, 8, 9, 10, 11, 12);&lt;br /&gt;
&lt;br /&gt;
// Steering wheel potentiometer&lt;br /&gt;
const int POTPIN = 1;&lt;br /&gt;
const int MAXPOT = 800; // no need to turn the wheel all the way to 1023 :)&lt;br /&gt;
&lt;br /&gt;
// Piezo speaker&lt;br /&gt;
const int SPEAKERPIN = 13;//you can see the led flash when u crash&lt;br /&gt;
&lt;br /&gt;
const int RANDSEEDPIN = 0; // an analog pin that isn&#039;t connected to anything&lt;br /&gt;
&lt;br /&gt;
const int MAXSTEPDURATION = 300; // Start slowly, each step is 1 millisec shorter.&lt;br /&gt;
const int MINSTEPDURATION = 150; // This is as fast as it gets&lt;br /&gt;
&lt;br /&gt;
const int NGLYPHS = 6;&lt;br /&gt;
// the glyphs will be defined starting from 1 (not 0),&lt;br /&gt;
// to enable lcd.print() of null-terminated strings&lt;br /&gt;
byte glyphs[NGLYPHS][8] = {&lt;br /&gt;
  // 1: car up&lt;br /&gt;
  { B00000,&lt;br /&gt;
    B01110,&lt;br /&gt;
    B11111,&lt;br /&gt;
    B01010,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B00000}&lt;br /&gt;
  // 2: car down&lt;br /&gt;
  ,{B00000,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B01110,&lt;br /&gt;
    B11111,&lt;br /&gt;
    B01010,&lt;br /&gt;
    B00000}&lt;br /&gt;
  // 3: truck up&lt;br /&gt;
  ,{B00000,&lt;br /&gt;
    B11110,&lt;br /&gt;
    B11111,&lt;br /&gt;
    B01010,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B00000}&lt;br /&gt;
  // 4: truck down&lt;br /&gt;
  ,{B00000,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B11110,&lt;br /&gt;
    B11111,&lt;br /&gt;
    B01010,&lt;br /&gt;
    B00000}&lt;br /&gt;
  // 5: crash up&lt;br /&gt;
  ,{B10101,&lt;br /&gt;
    B01110,&lt;br /&gt;
    B01110,&lt;br /&gt;
    B10101,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B00000}&lt;br /&gt;
  // 6: crash down&lt;br /&gt;
  ,{B00000,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B10101,&lt;br /&gt;
    B01110,&lt;br /&gt;
    B01110,&lt;br /&gt;
    B10101,&lt;br /&gt;
    B00000}&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
const int NCARPOSITIONS = 4;&lt;br /&gt;
&lt;br /&gt;
// Each position is mapped to a column of 2 glyphs&lt;br /&gt;
// Used to make sense when I had a 5th position&lt;br /&gt;
// where car or crash was drawn as 2 glyphs&lt;br /&gt;
// (can&#039;t do that since 0 terminates strings),&lt;br /&gt;
// so it&#039;s kinda silly now, but it ain&#039;t broke :)&lt;br /&gt;
const char BLANK=32;&lt;br /&gt;
char car2glyphs[NCARPOSITIONS][2] = {&lt;br /&gt;
  {1,BLANK},{2,BLANK},{BLANK,1},{BLANK,2}&lt;br /&gt;
};&lt;br /&gt;
char truck2glyphs[NCARPOSITIONS][2] = {&lt;br /&gt;
  {3,BLANK},{4,BLANK},{BLANK,3},{BLANK,4}&lt;br /&gt;
};&lt;br /&gt;
char crash2glyphs[NCARPOSITIONS][2] = {&lt;br /&gt;
  {5,BLANK},{6,BLANK},{BLANK,5},{BLANK,6}&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
const int ROADLEN = 15; // LCD width (not counting our car)&lt;br /&gt;
int road[ROADLEN]; // positions of other cars&lt;br /&gt;
char line_buff[2+ROADLEN]; // aux string for drawRoad()&lt;br /&gt;
int road_index;&lt;br /&gt;
int car_pos;&lt;br /&gt;
// Off-the-grid position means empty column, so MAXROADPOS&lt;br /&gt;
// determines the probability of a car in a column&lt;br /&gt;
// e.g. 3*NCARPOSITIONS gives p=1/3&lt;br /&gt;
const int MAXROADPOS = 3*NCARPOSITIONS;&lt;br /&gt;
int step_duration;&lt;br /&gt;
&lt;br /&gt;
int crash; // true if crashed&lt;br /&gt;
unsigned int crashtime; // millis() when crashed&lt;br /&gt;
const int CRASHSOUNDDURATION = 250;&lt;br /&gt;
&lt;br /&gt;
const char *INTRO1=&amp;quot;Trucks ahead,&amp;quot;;&lt;br /&gt;
const char *INTRO2=&amp;quot;Drive carefully&amp;quot;;&lt;br /&gt;
const int INTRODELAY = 2000;&lt;br /&gt;
&lt;br /&gt;
void setup()&lt;br /&gt;
{&lt;br /&gt;
  crash = crashtime = road_index = 0;&lt;br /&gt;
  step_duration = MAXSTEPDURATION;&lt;br /&gt;
  line_buff[1+ROADLEN] = &#039;\0&#039;; // null terminate it&lt;br /&gt;
  randomSeed(analogRead(RANDSEEDPIN));&lt;br /&gt;
  for (int i=0; i&amp;lt;NGLYPHS; i++) {&lt;br /&gt;
    lcd.createChar(i+1,glyphs[i]);&lt;br /&gt;
  }&lt;br /&gt;
  for (int i=0; i&amp;lt;ROADLEN; i++) {&lt;br /&gt;
    road[i]=-1;&lt;br /&gt;
  }&lt;br /&gt;
  pinMode(SPEAKERPIN,OUTPUT);&lt;br /&gt;
  analogWrite(SPEAKERPIN,0); // to be on the safe side&lt;br /&gt;
  lcd.begin(16,2);&lt;br /&gt;
  getSteeringWheel();&lt;br /&gt;
  drawRoad();&lt;br /&gt;
  lcd.setCursor(1,0);&lt;br /&gt;
  lcd.print(INTRO1);&lt;br /&gt;
  lcd.setCursor(1,1);&lt;br /&gt;
  lcd.print(INTRO2);&lt;br /&gt;
  delay(INTRODELAY);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void loop() {&lt;br /&gt;
  unsigned long now = millis()-INTRODELAY;&lt;br /&gt;
  if (!crash) {&lt;br /&gt;
    getSteeringWheel();&lt;br /&gt;
    crash = (car_pos==road[road_index]);&lt;br /&gt;
  }&lt;br /&gt;
  if (crash) {&lt;br /&gt;
    if (!crashtime) {&lt;br /&gt;
      crashtime=now;&lt;br /&gt;
      drawRoad();&lt;br /&gt;
      // Game over text&lt;br /&gt;
      // (keep first 2 &amp;quot;crash&amp;quot; columns intact)&lt;br /&gt;
      lcd.setCursor(2,0);&lt;br /&gt;
      lcd.print(&amp;quot;Crashed after&amp;quot;);&lt;br /&gt;
      lcd.setCursor(2,1);&lt;br /&gt;
      lcd.print(now/1000);&lt;br /&gt;
      lcd.print(&amp;quot; seconds.&amp;quot;);&lt;br /&gt;
    }&lt;br /&gt;
    if ((now-crashtime)&amp;lt;CRASHSOUNDDURATION) {&lt;br /&gt;
      analogWrite(SPEAKERPIN,random(255)); // white noise&lt;br /&gt;
    } &lt;br /&gt;
    else {&lt;br /&gt;
      analogWrite(SPEAKERPIN,0); // dramatic post-crush silence :)   &lt;br /&gt;
    }&lt;br /&gt;
    delay(10); // Wait a bit between writes&lt;br /&gt;
  } &lt;br /&gt;
  else {&lt;br /&gt;
&lt;br /&gt;
    int prev_pos = road[(road_index-1)%ROADLEN];&lt;br /&gt;
    int this_pos = random(MAXROADPOS);&lt;br /&gt;
    while (abs(this_pos-prev_pos)&amp;lt;2) { // don&#039;t jam the road&lt;br /&gt;
      this_pos = random(MAXROADPOS);&lt;br /&gt;
    }&lt;br /&gt;
    road[road_index] = this_pos;&lt;br /&gt;
    road_index = (road_index+1)%ROADLEN;&lt;br /&gt;
    drawRoad();&lt;br /&gt;
    delay(step_duration);&lt;br /&gt;
    if (step_duration&amp;gt;MINSTEPDURATION) {&lt;br /&gt;
      step_duration--; // go faster&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
void getSteeringWheel() {&lt;br /&gt;
  car_pos = map(analogRead(POTPIN),0,1024,0,NCARPOSITIONS);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void drawRoad() {&lt;br /&gt;
  for (int i=0; i&amp;lt;2; i++) {&lt;br /&gt;
    if (crash) {&lt;br /&gt;
      line_buff[0]=crash2glyphs[car_pos][i];&lt;br /&gt;
    } &lt;br /&gt;
    else {&lt;br /&gt;
      line_buff[0]=car2glyphs[car_pos][i];&lt;br /&gt;
    }&lt;br /&gt;
    for (int j=0; j&amp;lt;ROADLEN; j++) {&lt;br /&gt;
      int pos = road[(j+road_index)%ROADLEN];&lt;br /&gt;
      line_buff[j+1] = pos&amp;gt;=0 &amp;amp;&amp;amp; pos&amp;lt;NCARPOSITIONS ? truck2glyphs[pos][i] : BLANK;&lt;br /&gt;
    }&lt;br /&gt;
    lcd.setCursor(0,i);&lt;br /&gt;
    lcd.print(line_buff);&lt;br /&gt;
  }&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Freeduino Whack-A-Mole==&lt;br /&gt;
And next, Freeduino Whack-A-Mole![http://www.google.com/url?sa=t&amp;amp;rct=j&amp;amp;q=&amp;amp;esrc=s&amp;amp;source=web&amp;amp;cd=1&amp;amp;cts=1331224454832&amp;amp;ved=0CCkQFjAA&amp;amp;url=http%3A%2F%2Fwww.arduino.cc%2Fcgi-bin%2Fyabb2%2FYaBB.pl%3Fnum%3D1262971548&amp;amp;ei=VeFYT7udG-W30gHRztSsDw&amp;amp;usg=AFQjCNF8jYa_NAlX93ekQY-i1_jE6sCTuQ&amp;amp;sig2=KC_H8S7tHq7lLiaMqooF1g] We need 5-way joysticks for this one. It will introduce the Arduino Serial Monitor.&lt;br /&gt;
We&#039;re getting this 5-way joystick (5 way= up,down,left,right and button press)- it&#039;s a navigation switch from Adafruit.[https://www.adafruit.com/products/504]&lt;br /&gt;
&lt;br /&gt;
Here&#039;s the datasheet for the 5-way switch&amp;quot; [http://www.adafruit.com/datasheets/SKQUCAA010-ALPS.pdf]&lt;br /&gt;
&lt;br /&gt;
Here&#039;s the code:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/*&lt;br /&gt;
This is a whackamole game. &lt;br /&gt;
 Joystick connected as follows: (Instructions are for Adafruit 5-way switch part 504)&lt;br /&gt;
 Up    Arduino digital pin 3, to switch pin 5&lt;br /&gt;
 Right		 Arduino digital pin 4, to switch pin 3&lt;br /&gt;
 Down		  Arduino digital pin 5, to switch pin 2&lt;br /&gt;
 Left		  Arduino digital pin 6, to switch pin 1&lt;br /&gt;
 Button		Arduino digital pin 7, to switch pin 6&lt;br /&gt;
 &lt;br /&gt;
 If you follow this map it should work--you might have to rotate your breadboard&lt;br /&gt;
 Make sure the switch is well connected to the breadboard.&lt;br /&gt;
 &lt;br /&gt;
 Common: Digital Pin 2 to switch pin 4&lt;br /&gt;
 &lt;br /&gt;
 Press the button to start&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
const char cross = &#039;*&#039;;&lt;br /&gt;
const char mole = &#039;O&#039;;&lt;br /&gt;
const char both = &#039;@&#039;;&lt;br /&gt;
const char miss = &#039;x&#039;;&lt;br /&gt;
const char hit = &#039;#&#039;;&lt;br /&gt;
const char blank = &#039;.&#039;;&lt;br /&gt;
&lt;br /&gt;
int crossCoor;&lt;br /&gt;
int moleCoor;&lt;br /&gt;
long spawn;&lt;br /&gt;
int limit;&lt;br /&gt;
char pic;&lt;br /&gt;
boolean dead;&lt;br /&gt;
int coor;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
void setup()  {&lt;br /&gt;
  for(int i=3; i&amp;lt;=7; i++) {&lt;br /&gt;
    pinMode(i, INPUT);&lt;br /&gt;
    digitalWrite(i, HIGH);&lt;br /&gt;
  }&lt;br /&gt;
  pinMode(2, OUTPUT);&lt;br /&gt;
  digitalWrite(2, LOW);&lt;br /&gt;
  Serial.begin(115200);&lt;br /&gt;
  coor=5;//start out in the middle&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
int crossGet()  {//fixed so it works a little better w 5 way switch now&lt;br /&gt;
&lt;br /&gt;
  int mycoor = coor;&lt;br /&gt;
  if(digitalRead(3) == HIGH)  {//up&lt;br /&gt;
    mycoor += 3;&lt;br /&gt;
  }&lt;br /&gt;
  if(digitalRead(5) == HIGH)  {//down&lt;br /&gt;
    mycoor -= 3;&lt;br /&gt;
  }&lt;br /&gt;
  if(digitalRead(4) == HIGH)  {//right&lt;br /&gt;
    mycoor --;&lt;br /&gt;
  }&lt;br /&gt;
  if(digitalRead(6) == HIGH)  {//left&lt;br /&gt;
    mycoor ++;&lt;br /&gt;
  }&lt;br /&gt;
  if((mycoor&amp;gt;0)&amp;amp;(mycoor&amp;lt;10)){&lt;br /&gt;
     coor=mycoor;&lt;br /&gt;
  }&lt;br /&gt;
   return coor;  &lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
boolean pressed()  {&lt;br /&gt;
  boolean res;&lt;br /&gt;
  if(digitalRead(7)==LOW)  {&lt;br /&gt;
    res=true;&lt;br /&gt;
  }&lt;br /&gt;
  else  {&lt;br /&gt;
    res=false;&lt;br /&gt;
  }&lt;br /&gt;
  return res;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void display(int molePos)  {&lt;br /&gt;
  int one=crossGet();&lt;br /&gt;
  boolean button = pressed();&lt;br /&gt;
  for(int i=1; i&amp;lt;=9; i++)  {&lt;br /&gt;
&lt;br /&gt;
    if(one==i &amp;amp;&amp;amp; molePos==i)  {&lt;br /&gt;
      if(button)  {&lt;br /&gt;
        pic = hit;&lt;br /&gt;
        dead=true;&lt;br /&gt;
      }&lt;br /&gt;
      else  {&lt;br /&gt;
        pic=both;&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
    else if(one == i)  {&lt;br /&gt;
      if(button)  {&lt;br /&gt;
        pic=miss;&lt;br /&gt;
      }&lt;br /&gt;
      else  {&lt;br /&gt;
        pic=cross;&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
    else if(molePos==i)  {&lt;br /&gt;
      pic=mole;&lt;br /&gt;
    }&lt;br /&gt;
    else  {&lt;br /&gt;
      pic=blank;&lt;br /&gt;
    }&lt;br /&gt;
    if(i==3 || i==6 || i==9)  {&lt;br /&gt;
      Serial.println(pic);&lt;br /&gt;
    }&lt;br /&gt;
    else  {&lt;br /&gt;
      Serial.print(pic);&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void makeMole()  {&lt;br /&gt;
  spawn = millis();&lt;br /&gt;
  randomSeed(analogRead(0));&lt;br /&gt;
  moleCoor = random(1, 10);&lt;br /&gt;
  dead=false;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void noMole()  {&lt;br /&gt;
  moleCoor=10;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void loop()  {&lt;br /&gt;
  Serial.println(&amp;quot;Ready to play?&amp;quot;);&lt;br /&gt;
  while(digitalRead(7)==HIGH)  {&lt;br /&gt;
  }&lt;br /&gt;
  Serial.println(&amp;quot;Ready...&amp;quot;);&lt;br /&gt;
  delay(1000);&lt;br /&gt;
  Serial.println(&amp;quot;Set...&amp;quot;);&lt;br /&gt;
  delay(1000);&lt;br /&gt;
  Serial.println(&amp;quot;GO!&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
  boolean lost = false;&lt;br /&gt;
  int score = 0;&lt;br /&gt;
  limit= 5000;&lt;br /&gt;
&lt;br /&gt;
  while(lost==false ) {&lt;br /&gt;
    int time = random(100, 300);&lt;br /&gt;
    for(int i=0; i&amp;lt;=time; i++)  {&lt;br /&gt;
      display(10);&lt;br /&gt;
      Serial.println();&lt;br /&gt;
      delay(50);&lt;br /&gt;
    }&lt;br /&gt;
    makeMole();&lt;br /&gt;
    while(dead==false &amp;amp;&amp;amp; spawn+limit &amp;gt;= millis())  {&lt;br /&gt;
      display(moleCoor);&lt;br /&gt;
      if(pic==&#039;#&#039;)  {&lt;br /&gt;
        dead = true;&lt;br /&gt;
      }&lt;br /&gt;
      Serial.println();&lt;br /&gt;
      delay(50);&lt;br /&gt;
    }&lt;br /&gt;
    if(dead)  {&lt;br /&gt;
&lt;br /&gt;
      score++;&lt;br /&gt;
      if(limit&amp;gt;1000)  {&lt;br /&gt;
        limit -= 50;&lt;br /&gt;
      }&lt;br /&gt;
      delay(100);&lt;br /&gt;
&lt;br /&gt;
    }&lt;br /&gt;
    else  {&lt;br /&gt;
      break;&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
  Serial.println(&amp;quot;You lost&amp;quot;);&lt;br /&gt;
  delay(1000);&lt;br /&gt;
  Serial.print(&amp;quot;Your score was  &amp;quot;);&lt;br /&gt;
  Serial.println(score);&lt;br /&gt;
  Serial.println();&lt;br /&gt;
  delay(1000);&lt;br /&gt;
  while(digitalRead(7)==HIGH)  {&lt;br /&gt;
  }&lt;br /&gt;
  delay(1000);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The code works okay with the Serial Monitor, except it scrolls away so it can be hard to track what&#039;s happening with the little whack-a-mole symbols. Instead--you could have a Processing program turn the symbols into pictures. Download &amp;amp; install Processing (very similar to Arduino except is generally for making programs on your laptop), unzip these files and put them in your Processing sketch folder, plug in your Arduino running the Whack-a-Mole code and finally launch the Processing Whack-a-Mole screen program.&lt;br /&gt;
&lt;br /&gt;
==Others==&lt;br /&gt;
What games can you make from a Freeduino, LCD, one pot, one 5-way joystick, some LEDs, a temperature sensor, a light sensor and maybe a piezo speaker? &lt;br /&gt;
&lt;br /&gt;
==Advanced==&lt;br /&gt;
You are also allowed to use the Serial Monitor in combination with Processing or the like, to do stuff on your computer&#039;s display. The Freeduino should be the game engine.&lt;/div&gt;</summary>
		<author><name>Ckharnett</name></author>
	</entry>
	<entry>
		<id>http://wiki.lvl1.org/index.php?title=Freeduino_Games&amp;diff=3839</id>
		<title>Freeduino Games</title>
		<link rel="alternate" type="text/html" href="http://wiki.lvl1.org/index.php?title=Freeduino_Games&amp;diff=3839"/>
		<updated>2012-03-18T04:19:29Z</updated>

		<summary type="html">&lt;p&gt;Ckharnett: /* Freeduino Whack-A-Mole */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Freeduino Truck Lane==&lt;br /&gt;
Go from the Freeduino Spring Training LCD activity to a game!&lt;br /&gt;
&lt;br /&gt;
Need a Freeduino, a 10K pot, and a 16x2 LCD and a solderless breadboard.&lt;br /&gt;
Follow all steps in [[4th Inning]].&lt;br /&gt;
Now, pull the middle pot pin out of the LCD. Just connect that LCD pin to ground. (It&#039;s the third pin from the end of the LCD) This should give you a high contrast display. We need to use the pot for steering!&lt;br /&gt;
Connect the middle pot pin instead to Analog Input pin 1 of your Freeduino.&lt;br /&gt;
We didn&#039;t add a speaker, just used pin 13 to light up the onboard green LED if you &amp;quot;crash&amp;quot; in the game. If you want to use a speaker, connect it to a PWM pin like digital 3, 5 or 6 and adjust the code accordingly.&lt;br /&gt;
&lt;br /&gt;
Here&#039;s the code, cut and paste this into Arduino and install it to your board. Play away. To play again, press the Freeduino&#039;s reset button.&lt;br /&gt;
&lt;br /&gt;
Much more including videos at the game&#039;s original site [http://www.instructables.com/id/Truck-Lane-a-16x2-LCD-Arduino-game/].&lt;br /&gt;
We&#039;ve changed the pinouts in the code to match what we did in the Freeduino Spring Training LCD activity.&lt;br /&gt;
&lt;br /&gt;
Can you modify the code to make a game that rewards crashing? For example, scoot around catching falling &amp;quot;coins,&amp;quot; and see how many you can collect within a certain time. Then, make them fall faster and faster! This would be a fun way to learn more about what the code is doing.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;/* Simple Car game for a 16x2 LCD display &lt;br /&gt;
   You can use any Hitachi HD44780 compatible LCD.&lt;br /&gt;
   Modified for LVL1 Spring Training LCD Activity,&lt;br /&gt;
    Originally from &lt;br /&gt;
    @TheRealDod, Nov 25, 2010&lt;br /&gt;
   There&#039;s a &amp;quot;steering wheel&amp;quot; potentiometer on analog input 1,&lt;br /&gt;
   and a led on pin 13&lt;br /&gt;
   &lt;br /&gt;
   Enjoy,&lt;br /&gt;
&lt;br /&gt;
*/&lt;br /&gt;
#include &amp;lt;LiquidCrystal.h&amp;gt;&lt;br /&gt;
// LiquidCrystal display&lt;br /&gt;
// You can use any Hitachi HD44780 compatible. Wiring explained at&lt;br /&gt;
// http://www.arduino.cc/en/Tutorial/LiquidCrystal&lt;br /&gt;
LiquidCrystal lcd(7, 8, 9, 10, 11, 12);&lt;br /&gt;
&lt;br /&gt;
// Steering wheel potentiometer&lt;br /&gt;
const int POTPIN = 1;&lt;br /&gt;
const int MAXPOT = 800; // no need to turn the wheel all the way to 1023 :)&lt;br /&gt;
&lt;br /&gt;
// Piezo speaker&lt;br /&gt;
const int SPEAKERPIN = 13;//you can see the led flash when u crash&lt;br /&gt;
&lt;br /&gt;
const int RANDSEEDPIN = 0; // an analog pin that isn&#039;t connected to anything&lt;br /&gt;
&lt;br /&gt;
const int MAXSTEPDURATION = 300; // Start slowly, each step is 1 millisec shorter.&lt;br /&gt;
const int MINSTEPDURATION = 150; // This is as fast as it gets&lt;br /&gt;
&lt;br /&gt;
const int NGLYPHS = 6;&lt;br /&gt;
// the glyphs will be defined starting from 1 (not 0),&lt;br /&gt;
// to enable lcd.print() of null-terminated strings&lt;br /&gt;
byte glyphs[NGLYPHS][8] = {&lt;br /&gt;
  // 1: car up&lt;br /&gt;
  { B00000,&lt;br /&gt;
    B01110,&lt;br /&gt;
    B11111,&lt;br /&gt;
    B01010,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B00000}&lt;br /&gt;
  // 2: car down&lt;br /&gt;
  ,{B00000,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B01110,&lt;br /&gt;
    B11111,&lt;br /&gt;
    B01010,&lt;br /&gt;
    B00000}&lt;br /&gt;
  // 3: truck up&lt;br /&gt;
  ,{B00000,&lt;br /&gt;
    B11110,&lt;br /&gt;
    B11111,&lt;br /&gt;
    B01010,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B00000}&lt;br /&gt;
  // 4: truck down&lt;br /&gt;
  ,{B00000,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B11110,&lt;br /&gt;
    B11111,&lt;br /&gt;
    B01010,&lt;br /&gt;
    B00000}&lt;br /&gt;
  // 5: crash up&lt;br /&gt;
  ,{B10101,&lt;br /&gt;
    B01110,&lt;br /&gt;
    B01110,&lt;br /&gt;
    B10101,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B00000}&lt;br /&gt;
  // 6: crash down&lt;br /&gt;
  ,{B00000,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B10101,&lt;br /&gt;
    B01110,&lt;br /&gt;
    B01110,&lt;br /&gt;
    B10101,&lt;br /&gt;
    B00000}&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
const int NCARPOSITIONS = 4;&lt;br /&gt;
&lt;br /&gt;
// Each position is mapped to a column of 2 glyphs&lt;br /&gt;
// Used to make sense when I had a 5th position&lt;br /&gt;
// where car or crash was drawn as 2 glyphs&lt;br /&gt;
// (can&#039;t do that since 0 terminates strings),&lt;br /&gt;
// so it&#039;s kinda silly now, but it ain&#039;t broke :)&lt;br /&gt;
const char BLANK=32;&lt;br /&gt;
char car2glyphs[NCARPOSITIONS][2] = {&lt;br /&gt;
  {1,BLANK},{2,BLANK},{BLANK,1},{BLANK,2}&lt;br /&gt;
};&lt;br /&gt;
char truck2glyphs[NCARPOSITIONS][2] = {&lt;br /&gt;
  {3,BLANK},{4,BLANK},{BLANK,3},{BLANK,4}&lt;br /&gt;
};&lt;br /&gt;
char crash2glyphs[NCARPOSITIONS][2] = {&lt;br /&gt;
  {5,BLANK},{6,BLANK},{BLANK,5},{BLANK,6}&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
const int ROADLEN = 15; // LCD width (not counting our car)&lt;br /&gt;
int road[ROADLEN]; // positions of other cars&lt;br /&gt;
char line_buff[2+ROADLEN]; // aux string for drawRoad()&lt;br /&gt;
int road_index;&lt;br /&gt;
int car_pos;&lt;br /&gt;
// Off-the-grid position means empty column, so MAXROADPOS&lt;br /&gt;
// determines the probability of a car in a column&lt;br /&gt;
// e.g. 3*NCARPOSITIONS gives p=1/3&lt;br /&gt;
const int MAXROADPOS = 3*NCARPOSITIONS;&lt;br /&gt;
int step_duration;&lt;br /&gt;
&lt;br /&gt;
int crash; // true if crashed&lt;br /&gt;
unsigned int crashtime; // millis() when crashed&lt;br /&gt;
const int CRASHSOUNDDURATION = 250;&lt;br /&gt;
&lt;br /&gt;
const char *INTRO1=&amp;quot;Trucks ahead,&amp;quot;;&lt;br /&gt;
const char *INTRO2=&amp;quot;Drive carefully&amp;quot;;&lt;br /&gt;
const int INTRODELAY = 2000;&lt;br /&gt;
&lt;br /&gt;
void setup()&lt;br /&gt;
{&lt;br /&gt;
  crash = crashtime = road_index = 0;&lt;br /&gt;
  step_duration = MAXSTEPDURATION;&lt;br /&gt;
  line_buff[1+ROADLEN] = &#039;\0&#039;; // null terminate it&lt;br /&gt;
  randomSeed(analogRead(RANDSEEDPIN));&lt;br /&gt;
  for (int i=0; i&amp;lt;NGLYPHS; i++) {&lt;br /&gt;
    lcd.createChar(i+1,glyphs[i]);&lt;br /&gt;
  }&lt;br /&gt;
  for (int i=0; i&amp;lt;ROADLEN; i++) {&lt;br /&gt;
    road[i]=-1;&lt;br /&gt;
  }&lt;br /&gt;
  pinMode(SPEAKERPIN,OUTPUT);&lt;br /&gt;
  analogWrite(SPEAKERPIN,0); // to be on the safe side&lt;br /&gt;
  lcd.begin(16,2);&lt;br /&gt;
  getSteeringWheel();&lt;br /&gt;
  drawRoad();&lt;br /&gt;
  lcd.setCursor(1,0);&lt;br /&gt;
  lcd.print(INTRO1);&lt;br /&gt;
  lcd.setCursor(1,1);&lt;br /&gt;
  lcd.print(INTRO2);&lt;br /&gt;
  delay(INTRODELAY);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void loop() {&lt;br /&gt;
  unsigned long now = millis()-INTRODELAY;&lt;br /&gt;
  if (!crash) {&lt;br /&gt;
    getSteeringWheel();&lt;br /&gt;
    crash = (car_pos==road[road_index]);&lt;br /&gt;
  }&lt;br /&gt;
  if (crash) {&lt;br /&gt;
    if (!crashtime) {&lt;br /&gt;
      crashtime=now;&lt;br /&gt;
      drawRoad();&lt;br /&gt;
      // Game over text&lt;br /&gt;
      // (keep first 2 &amp;quot;crash&amp;quot; columns intact)&lt;br /&gt;
      lcd.setCursor(2,0);&lt;br /&gt;
      lcd.print(&amp;quot;Crashed after&amp;quot;);&lt;br /&gt;
      lcd.setCursor(2,1);&lt;br /&gt;
      lcd.print(now/1000);&lt;br /&gt;
      lcd.print(&amp;quot; seconds.&amp;quot;);&lt;br /&gt;
    }&lt;br /&gt;
    if ((now-crashtime)&amp;lt;CRASHSOUNDDURATION) {&lt;br /&gt;
      analogWrite(SPEAKERPIN,random(255)); // white noise&lt;br /&gt;
    } &lt;br /&gt;
    else {&lt;br /&gt;
      analogWrite(SPEAKERPIN,0); // dramatic post-crush silence :)   &lt;br /&gt;
    }&lt;br /&gt;
    delay(10); // Wait a bit between writes&lt;br /&gt;
  } &lt;br /&gt;
  else {&lt;br /&gt;
&lt;br /&gt;
    int prev_pos = road[(road_index-1)%ROADLEN];&lt;br /&gt;
    int this_pos = random(MAXROADPOS);&lt;br /&gt;
    while (abs(this_pos-prev_pos)&amp;lt;2) { // don&#039;t jam the road&lt;br /&gt;
      this_pos = random(MAXROADPOS);&lt;br /&gt;
    }&lt;br /&gt;
    road[road_index] = this_pos;&lt;br /&gt;
    road_index = (road_index+1)%ROADLEN;&lt;br /&gt;
    drawRoad();&lt;br /&gt;
    delay(step_duration);&lt;br /&gt;
    if (step_duration&amp;gt;MINSTEPDURATION) {&lt;br /&gt;
      step_duration--; // go faster&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
void getSteeringWheel() {&lt;br /&gt;
  car_pos = map(analogRead(POTPIN),0,1024,0,NCARPOSITIONS);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void drawRoad() {&lt;br /&gt;
  for (int i=0; i&amp;lt;2; i++) {&lt;br /&gt;
    if (crash) {&lt;br /&gt;
      line_buff[0]=crash2glyphs[car_pos][i];&lt;br /&gt;
    } &lt;br /&gt;
    else {&lt;br /&gt;
      line_buff[0]=car2glyphs[car_pos][i];&lt;br /&gt;
    }&lt;br /&gt;
    for (int j=0; j&amp;lt;ROADLEN; j++) {&lt;br /&gt;
      int pos = road[(j+road_index)%ROADLEN];&lt;br /&gt;
      line_buff[j+1] = pos&amp;gt;=0 &amp;amp;&amp;amp; pos&amp;lt;NCARPOSITIONS ? truck2glyphs[pos][i] : BLANK;&lt;br /&gt;
    }&lt;br /&gt;
    lcd.setCursor(0,i);&lt;br /&gt;
    lcd.print(line_buff);&lt;br /&gt;
  }&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Freeduino Whack-A-Mole==&lt;br /&gt;
And next, Freeduino Whack-A-Mole![http://www.google.com/url?sa=t&amp;amp;rct=j&amp;amp;q=&amp;amp;esrc=s&amp;amp;source=web&amp;amp;cd=1&amp;amp;cts=1331224454832&amp;amp;ved=0CCkQFjAA&amp;amp;url=http%3A%2F%2Fwww.arduino.cc%2Fcgi-bin%2Fyabb2%2FYaBB.pl%3Fnum%3D1262971548&amp;amp;ei=VeFYT7udG-W30gHRztSsDw&amp;amp;usg=AFQjCNF8jYa_NAlX93ekQY-i1_jE6sCTuQ&amp;amp;sig2=KC_H8S7tHq7lLiaMqooF1g] We need 5-way joysticks for this one. It will introduce the Arduino Serial Monitor.&lt;br /&gt;
We&#039;re getting this 5-way joystick (5 way= up,down,left,right and button press)- it&#039;s a navigation switch from Adafruit.[https://www.adafruit.com/products/504]&lt;br /&gt;
&lt;br /&gt;
Here&#039;s the datasheet for the 5-way switch&amp;quot; [http://www.adafruit.com/datasheets/SKQUCAA010-ALPS.pdf]&lt;br /&gt;
&lt;br /&gt;
Here&#039;s the code:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/*&lt;br /&gt;
This is a whackamole game. &lt;br /&gt;
 Joystick connected as follows: (Instructions are for Adafruit 5-way switch part 504)&lt;br /&gt;
 Up    Arduino digital pin 3, to switch pin 5&lt;br /&gt;
 Right		 Arduino digital pin 4, to switch pin 3&lt;br /&gt;
 Down		  Arduino digital pin 5, to switch pin 2&lt;br /&gt;
 Left		  Arduino digital pin 6, to switch pin 1&lt;br /&gt;
 Button		Arduino digital pin 7, to switch pin 6&lt;br /&gt;
 &lt;br /&gt;
 If you follow this map it should work--you might have to rotate your breadboard&lt;br /&gt;
 Make sure the switch is well connected to the breadboard.&lt;br /&gt;
 &lt;br /&gt;
 Common: Digital Pin 2 to switch pin 4&lt;br /&gt;
 &lt;br /&gt;
 Press the button to start&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
const char cross = &#039;*&#039;;&lt;br /&gt;
const char mole = &#039;O&#039;;&lt;br /&gt;
const char both = &#039;@&#039;;&lt;br /&gt;
const char miss = &#039;x&#039;;&lt;br /&gt;
const char hit = &#039;#&#039;;&lt;br /&gt;
const char blank = &#039;.&#039;;&lt;br /&gt;
&lt;br /&gt;
int crossCoor;&lt;br /&gt;
int moleCoor;&lt;br /&gt;
long spawn;&lt;br /&gt;
int limit;&lt;br /&gt;
char pic;&lt;br /&gt;
boolean dead;&lt;br /&gt;
int coor;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
void setup()  {&lt;br /&gt;
  for(int i=3; i&amp;lt;=7; i++) {&lt;br /&gt;
    pinMode(i, INPUT);&lt;br /&gt;
    digitalWrite(i, HIGH);&lt;br /&gt;
  }&lt;br /&gt;
  pinMode(2, OUTPUT);&lt;br /&gt;
  digitalWrite(2, LOW);&lt;br /&gt;
  Serial.begin(115200);&lt;br /&gt;
  coor=5;//start out in the middle&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
int crossGet()  {//fixed so it works a little better w 5 way switch now&lt;br /&gt;
&lt;br /&gt;
  int mycoor = coor;&lt;br /&gt;
  if(digitalRead(3) == HIGH)  {//up&lt;br /&gt;
    mycoor += 3;&lt;br /&gt;
  }&lt;br /&gt;
  if(digitalRead(5) == HIGH)  {//down&lt;br /&gt;
    mycoor -= 3;&lt;br /&gt;
  }&lt;br /&gt;
  if(digitalRead(4) == HIGH)  {//right&lt;br /&gt;
    mycoor --;&lt;br /&gt;
  }&lt;br /&gt;
  if(digitalRead(6) == HIGH)  {//left&lt;br /&gt;
    mycoor ++;&lt;br /&gt;
  }&lt;br /&gt;
  if((mycoor&amp;gt;0)&amp;amp;(mycoor&amp;lt;10)){&lt;br /&gt;
     coor=mycoor;&lt;br /&gt;
  }&lt;br /&gt;
   return coor;  &lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
boolean pressed()  {&lt;br /&gt;
  boolean res;&lt;br /&gt;
  if(digitalRead(7)==LOW)  {&lt;br /&gt;
    res=true;&lt;br /&gt;
  }&lt;br /&gt;
  else  {&lt;br /&gt;
    res=false;&lt;br /&gt;
  }&lt;br /&gt;
  return res;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void display(int molePos)  {&lt;br /&gt;
  int one=crossGet();&lt;br /&gt;
  boolean button = pressed();&lt;br /&gt;
  for(int i=1; i&amp;lt;=9; i++)  {&lt;br /&gt;
&lt;br /&gt;
    if(one==i &amp;amp;&amp;amp; molePos==i)  {&lt;br /&gt;
      if(button)  {&lt;br /&gt;
        pic = hit;&lt;br /&gt;
        dead=true;&lt;br /&gt;
      }&lt;br /&gt;
      else  {&lt;br /&gt;
        pic=both;&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
    else if(one == i)  {&lt;br /&gt;
      if(button)  {&lt;br /&gt;
        pic=miss;&lt;br /&gt;
      }&lt;br /&gt;
      else  {&lt;br /&gt;
        pic=cross;&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
    else if(molePos==i)  {&lt;br /&gt;
      pic=mole;&lt;br /&gt;
    }&lt;br /&gt;
    else  {&lt;br /&gt;
      pic=blank;&lt;br /&gt;
    }&lt;br /&gt;
    if(i==3 || i==6 || i==9)  {&lt;br /&gt;
      Serial.println(pic);&lt;br /&gt;
    }&lt;br /&gt;
    else  {&lt;br /&gt;
      Serial.print(pic);&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void makeMole()  {&lt;br /&gt;
  spawn = millis();&lt;br /&gt;
  randomSeed(analogRead(0));&lt;br /&gt;
  moleCoor = random(1, 10);&lt;br /&gt;
  dead=false;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void noMole()  {&lt;br /&gt;
  moleCoor=10;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void loop()  {&lt;br /&gt;
  Serial.println(&amp;quot;Ready to play?&amp;quot;);&lt;br /&gt;
  while(digitalRead(7)==HIGH)  {&lt;br /&gt;
  }&lt;br /&gt;
  Serial.println(&amp;quot;Ready...&amp;quot;);&lt;br /&gt;
  delay(1000);&lt;br /&gt;
  Serial.println(&amp;quot;Set...&amp;quot;);&lt;br /&gt;
  delay(1000);&lt;br /&gt;
  Serial.println(&amp;quot;GO!&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
  boolean lost = false;&lt;br /&gt;
  int score = 0;&lt;br /&gt;
  limit= 5000;&lt;br /&gt;
&lt;br /&gt;
  while(lost==false ) {&lt;br /&gt;
    int time = random(100, 300);&lt;br /&gt;
    for(int i=0; i&amp;lt;=time; i++)  {&lt;br /&gt;
      display(10);&lt;br /&gt;
      Serial.println();&lt;br /&gt;
      delay(50);&lt;br /&gt;
    }&lt;br /&gt;
    makeMole();&lt;br /&gt;
    while(dead==false &amp;amp;&amp;amp; spawn+limit &amp;gt;= millis())  {&lt;br /&gt;
      display(moleCoor);&lt;br /&gt;
      if(pic==&#039;#&#039;)  {&lt;br /&gt;
        dead = true;&lt;br /&gt;
      }&lt;br /&gt;
      Serial.println();&lt;br /&gt;
      delay(50);&lt;br /&gt;
    }&lt;br /&gt;
    if(dead)  {&lt;br /&gt;
&lt;br /&gt;
      score++;&lt;br /&gt;
      if(limit&amp;gt;1000)  {&lt;br /&gt;
        limit -= 50;&lt;br /&gt;
      }&lt;br /&gt;
      delay(100);&lt;br /&gt;
&lt;br /&gt;
    }&lt;br /&gt;
    else  {&lt;br /&gt;
      break;&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
  Serial.println(&amp;quot;You lost&amp;quot;);&lt;br /&gt;
  delay(1000);&lt;br /&gt;
  Serial.print(&amp;quot;Your score was  &amp;quot;);&lt;br /&gt;
  Serial.println(score);&lt;br /&gt;
  Serial.println();&lt;br /&gt;
  delay(1000);&lt;br /&gt;
  while(digitalRead(7)==HIGH)  {&lt;br /&gt;
  }&lt;br /&gt;
  delay(1000);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Others==&lt;br /&gt;
What games can you make from a Freeduino, LCD, one pot, one 5-way joystick, some LEDs, a temperature sensor, a light sensor and maybe a piezo speaker? &lt;br /&gt;
&lt;br /&gt;
==Advanced==&lt;br /&gt;
You are also allowed to use the Serial Monitor in combination with Processing or the like, to do stuff on your computer&#039;s display. The Freeduino should be the game engine.&lt;/div&gt;</summary>
		<author><name>Ckharnett</name></author>
	</entry>
	<entry>
		<id>http://wiki.lvl1.org/index.php?title=Freeduino_Games&amp;diff=3838</id>
		<title>Freeduino Games</title>
		<link rel="alternate" type="text/html" href="http://wiki.lvl1.org/index.php?title=Freeduino_Games&amp;diff=3838"/>
		<updated>2012-03-17T14:57:39Z</updated>

		<summary type="html">&lt;p&gt;Ckharnett: /* Freeduino Whack-A-Mole */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Freeduino Truck Lane==&lt;br /&gt;
Go from the Freeduino Spring Training LCD activity to a game!&lt;br /&gt;
&lt;br /&gt;
Need a Freeduino, a 10K pot, and a 16x2 LCD and a solderless breadboard.&lt;br /&gt;
Follow all steps in [[4th Inning]].&lt;br /&gt;
Now, pull the middle pot pin out of the LCD. Just connect that LCD pin to ground. (It&#039;s the third pin from the end of the LCD) This should give you a high contrast display. We need to use the pot for steering!&lt;br /&gt;
Connect the middle pot pin instead to Analog Input pin 1 of your Freeduino.&lt;br /&gt;
We didn&#039;t add a speaker, just used pin 13 to light up the onboard green LED if you &amp;quot;crash&amp;quot; in the game. If you want to use a speaker, connect it to a PWM pin like digital 3, 5 or 6 and adjust the code accordingly.&lt;br /&gt;
&lt;br /&gt;
Here&#039;s the code, cut and paste this into Arduino and install it to your board. Play away. To play again, press the Freeduino&#039;s reset button.&lt;br /&gt;
&lt;br /&gt;
Much more including videos at the game&#039;s original site [http://www.instructables.com/id/Truck-Lane-a-16x2-LCD-Arduino-game/].&lt;br /&gt;
We&#039;ve changed the pinouts in the code to match what we did in the Freeduino Spring Training LCD activity.&lt;br /&gt;
&lt;br /&gt;
Can you modify the code to make a game that rewards crashing? For example, scoot around catching falling &amp;quot;coins,&amp;quot; and see how many you can collect within a certain time. Then, make them fall faster and faster! This would be a fun way to learn more about what the code is doing.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;/* Simple Car game for a 16x2 LCD display &lt;br /&gt;
   You can use any Hitachi HD44780 compatible LCD.&lt;br /&gt;
   Modified for LVL1 Spring Training LCD Activity,&lt;br /&gt;
    Originally from &lt;br /&gt;
    @TheRealDod, Nov 25, 2010&lt;br /&gt;
   There&#039;s a &amp;quot;steering wheel&amp;quot; potentiometer on analog input 1,&lt;br /&gt;
   and a led on pin 13&lt;br /&gt;
   &lt;br /&gt;
   Enjoy,&lt;br /&gt;
&lt;br /&gt;
*/&lt;br /&gt;
#include &amp;lt;LiquidCrystal.h&amp;gt;&lt;br /&gt;
// LiquidCrystal display&lt;br /&gt;
// You can use any Hitachi HD44780 compatible. Wiring explained at&lt;br /&gt;
// http://www.arduino.cc/en/Tutorial/LiquidCrystal&lt;br /&gt;
LiquidCrystal lcd(7, 8, 9, 10, 11, 12);&lt;br /&gt;
&lt;br /&gt;
// Steering wheel potentiometer&lt;br /&gt;
const int POTPIN = 1;&lt;br /&gt;
const int MAXPOT = 800; // no need to turn the wheel all the way to 1023 :)&lt;br /&gt;
&lt;br /&gt;
// Piezo speaker&lt;br /&gt;
const int SPEAKERPIN = 13;//you can see the led flash when u crash&lt;br /&gt;
&lt;br /&gt;
const int RANDSEEDPIN = 0; // an analog pin that isn&#039;t connected to anything&lt;br /&gt;
&lt;br /&gt;
const int MAXSTEPDURATION = 300; // Start slowly, each step is 1 millisec shorter.&lt;br /&gt;
const int MINSTEPDURATION = 150; // This is as fast as it gets&lt;br /&gt;
&lt;br /&gt;
const int NGLYPHS = 6;&lt;br /&gt;
// the glyphs will be defined starting from 1 (not 0),&lt;br /&gt;
// to enable lcd.print() of null-terminated strings&lt;br /&gt;
byte glyphs[NGLYPHS][8] = {&lt;br /&gt;
  // 1: car up&lt;br /&gt;
  { B00000,&lt;br /&gt;
    B01110,&lt;br /&gt;
    B11111,&lt;br /&gt;
    B01010,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B00000}&lt;br /&gt;
  // 2: car down&lt;br /&gt;
  ,{B00000,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B01110,&lt;br /&gt;
    B11111,&lt;br /&gt;
    B01010,&lt;br /&gt;
    B00000}&lt;br /&gt;
  // 3: truck up&lt;br /&gt;
  ,{B00000,&lt;br /&gt;
    B11110,&lt;br /&gt;
    B11111,&lt;br /&gt;
    B01010,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B00000}&lt;br /&gt;
  // 4: truck down&lt;br /&gt;
  ,{B00000,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B11110,&lt;br /&gt;
    B11111,&lt;br /&gt;
    B01010,&lt;br /&gt;
    B00000}&lt;br /&gt;
  // 5: crash up&lt;br /&gt;
  ,{B10101,&lt;br /&gt;
    B01110,&lt;br /&gt;
    B01110,&lt;br /&gt;
    B10101,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B00000}&lt;br /&gt;
  // 6: crash down&lt;br /&gt;
  ,{B00000,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B10101,&lt;br /&gt;
    B01110,&lt;br /&gt;
    B01110,&lt;br /&gt;
    B10101,&lt;br /&gt;
    B00000}&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
const int NCARPOSITIONS = 4;&lt;br /&gt;
&lt;br /&gt;
// Each position is mapped to a column of 2 glyphs&lt;br /&gt;
// Used to make sense when I had a 5th position&lt;br /&gt;
// where car or crash was drawn as 2 glyphs&lt;br /&gt;
// (can&#039;t do that since 0 terminates strings),&lt;br /&gt;
// so it&#039;s kinda silly now, but it ain&#039;t broke :)&lt;br /&gt;
const char BLANK=32;&lt;br /&gt;
char car2glyphs[NCARPOSITIONS][2] = {&lt;br /&gt;
  {1,BLANK},{2,BLANK},{BLANK,1},{BLANK,2}&lt;br /&gt;
};&lt;br /&gt;
char truck2glyphs[NCARPOSITIONS][2] = {&lt;br /&gt;
  {3,BLANK},{4,BLANK},{BLANK,3},{BLANK,4}&lt;br /&gt;
};&lt;br /&gt;
char crash2glyphs[NCARPOSITIONS][2] = {&lt;br /&gt;
  {5,BLANK},{6,BLANK},{BLANK,5},{BLANK,6}&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
const int ROADLEN = 15; // LCD width (not counting our car)&lt;br /&gt;
int road[ROADLEN]; // positions of other cars&lt;br /&gt;
char line_buff[2+ROADLEN]; // aux string for drawRoad()&lt;br /&gt;
int road_index;&lt;br /&gt;
int car_pos;&lt;br /&gt;
// Off-the-grid position means empty column, so MAXROADPOS&lt;br /&gt;
// determines the probability of a car in a column&lt;br /&gt;
// e.g. 3*NCARPOSITIONS gives p=1/3&lt;br /&gt;
const int MAXROADPOS = 3*NCARPOSITIONS;&lt;br /&gt;
int step_duration;&lt;br /&gt;
&lt;br /&gt;
int crash; // true if crashed&lt;br /&gt;
unsigned int crashtime; // millis() when crashed&lt;br /&gt;
const int CRASHSOUNDDURATION = 250;&lt;br /&gt;
&lt;br /&gt;
const char *INTRO1=&amp;quot;Trucks ahead,&amp;quot;;&lt;br /&gt;
const char *INTRO2=&amp;quot;Drive carefully&amp;quot;;&lt;br /&gt;
const int INTRODELAY = 2000;&lt;br /&gt;
&lt;br /&gt;
void setup()&lt;br /&gt;
{&lt;br /&gt;
  crash = crashtime = road_index = 0;&lt;br /&gt;
  step_duration = MAXSTEPDURATION;&lt;br /&gt;
  line_buff[1+ROADLEN] = &#039;\0&#039;; // null terminate it&lt;br /&gt;
  randomSeed(analogRead(RANDSEEDPIN));&lt;br /&gt;
  for (int i=0; i&amp;lt;NGLYPHS; i++) {&lt;br /&gt;
    lcd.createChar(i+1,glyphs[i]);&lt;br /&gt;
  }&lt;br /&gt;
  for (int i=0; i&amp;lt;ROADLEN; i++) {&lt;br /&gt;
    road[i]=-1;&lt;br /&gt;
  }&lt;br /&gt;
  pinMode(SPEAKERPIN,OUTPUT);&lt;br /&gt;
  analogWrite(SPEAKERPIN,0); // to be on the safe side&lt;br /&gt;
  lcd.begin(16,2);&lt;br /&gt;
  getSteeringWheel();&lt;br /&gt;
  drawRoad();&lt;br /&gt;
  lcd.setCursor(1,0);&lt;br /&gt;
  lcd.print(INTRO1);&lt;br /&gt;
  lcd.setCursor(1,1);&lt;br /&gt;
  lcd.print(INTRO2);&lt;br /&gt;
  delay(INTRODELAY);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void loop() {&lt;br /&gt;
  unsigned long now = millis()-INTRODELAY;&lt;br /&gt;
  if (!crash) {&lt;br /&gt;
    getSteeringWheel();&lt;br /&gt;
    crash = (car_pos==road[road_index]);&lt;br /&gt;
  }&lt;br /&gt;
  if (crash) {&lt;br /&gt;
    if (!crashtime) {&lt;br /&gt;
      crashtime=now;&lt;br /&gt;
      drawRoad();&lt;br /&gt;
      // Game over text&lt;br /&gt;
      // (keep first 2 &amp;quot;crash&amp;quot; columns intact)&lt;br /&gt;
      lcd.setCursor(2,0);&lt;br /&gt;
      lcd.print(&amp;quot;Crashed after&amp;quot;);&lt;br /&gt;
      lcd.setCursor(2,1);&lt;br /&gt;
      lcd.print(now/1000);&lt;br /&gt;
      lcd.print(&amp;quot; seconds.&amp;quot;);&lt;br /&gt;
    }&lt;br /&gt;
    if ((now-crashtime)&amp;lt;CRASHSOUNDDURATION) {&lt;br /&gt;
      analogWrite(SPEAKERPIN,random(255)); // white noise&lt;br /&gt;
    } &lt;br /&gt;
    else {&lt;br /&gt;
      analogWrite(SPEAKERPIN,0); // dramatic post-crush silence :)   &lt;br /&gt;
    }&lt;br /&gt;
    delay(10); // Wait a bit between writes&lt;br /&gt;
  } &lt;br /&gt;
  else {&lt;br /&gt;
&lt;br /&gt;
    int prev_pos = road[(road_index-1)%ROADLEN];&lt;br /&gt;
    int this_pos = random(MAXROADPOS);&lt;br /&gt;
    while (abs(this_pos-prev_pos)&amp;lt;2) { // don&#039;t jam the road&lt;br /&gt;
      this_pos = random(MAXROADPOS);&lt;br /&gt;
    }&lt;br /&gt;
    road[road_index] = this_pos;&lt;br /&gt;
    road_index = (road_index+1)%ROADLEN;&lt;br /&gt;
    drawRoad();&lt;br /&gt;
    delay(step_duration);&lt;br /&gt;
    if (step_duration&amp;gt;MINSTEPDURATION) {&lt;br /&gt;
      step_duration--; // go faster&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
void getSteeringWheel() {&lt;br /&gt;
  car_pos = map(analogRead(POTPIN),0,1024,0,NCARPOSITIONS);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void drawRoad() {&lt;br /&gt;
  for (int i=0; i&amp;lt;2; i++) {&lt;br /&gt;
    if (crash) {&lt;br /&gt;
      line_buff[0]=crash2glyphs[car_pos][i];&lt;br /&gt;
    } &lt;br /&gt;
    else {&lt;br /&gt;
      line_buff[0]=car2glyphs[car_pos][i];&lt;br /&gt;
    }&lt;br /&gt;
    for (int j=0; j&amp;lt;ROADLEN; j++) {&lt;br /&gt;
      int pos = road[(j+road_index)%ROADLEN];&lt;br /&gt;
      line_buff[j+1] = pos&amp;gt;=0 &amp;amp;&amp;amp; pos&amp;lt;NCARPOSITIONS ? truck2glyphs[pos][i] : BLANK;&lt;br /&gt;
    }&lt;br /&gt;
    lcd.setCursor(0,i);&lt;br /&gt;
    lcd.print(line_buff);&lt;br /&gt;
  }&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Freeduino Whack-A-Mole==&lt;br /&gt;
And next, Freeduino Whack-A-Mole![http://www.google.com/url?sa=t&amp;amp;rct=j&amp;amp;q=&amp;amp;esrc=s&amp;amp;source=web&amp;amp;cd=1&amp;amp;cts=1331224454832&amp;amp;ved=0CCkQFjAA&amp;amp;url=http%3A%2F%2Fwww.arduino.cc%2Fcgi-bin%2Fyabb2%2FYaBB.pl%3Fnum%3D1262971548&amp;amp;ei=VeFYT7udG-W30gHRztSsDw&amp;amp;usg=AFQjCNF8jYa_NAlX93ekQY-i1_jE6sCTuQ&amp;amp;sig2=KC_H8S7tHq7lLiaMqooF1g] We need 5-way joysticks for this one. It will introduce the Arduino Serial Monitor.&lt;br /&gt;
We&#039;re getting this 5-way joystick (5 way= up,down,left,right and button press)- it&#039;s a navigation switch from Adafruit.[https://www.adafruit.com/products/504]&lt;br /&gt;
&lt;br /&gt;
Here&#039;s the datasheet for the 5-way switch&amp;quot; [http://www.adafruit.com/datasheets/SKQUCAA010-ALPS.pdf]&lt;br /&gt;
&lt;br /&gt;
Here&#039;s the code:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/*&lt;br /&gt;
This is a whackamole game.&lt;br /&gt;
Joystick connected as follows:&lt;br /&gt;
Up    digital pin 3&lt;br /&gt;
Right		 4&lt;br /&gt;
Down		  5&lt;br /&gt;
Left		  6&lt;br /&gt;
Button		7&lt;br /&gt;
&lt;br /&gt;
Common ground (because I have a ribbon wire&lt;br /&gt;
coming from the joystick, and this is just neater)&lt;br /&gt;
	Digital Pin 2&lt;br /&gt;
&lt;br /&gt;
Press the button to start&lt;br /&gt;
*/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
const char cross = &#039;*&#039;;&lt;br /&gt;
const char mole = &#039;O&#039;;&lt;br /&gt;
const char both = &#039;@&#039;;&lt;br /&gt;
const char miss = &#039;x&#039;;&lt;br /&gt;
const char hit = &#039;#&#039;;&lt;br /&gt;
const char blank = &#039;.&#039;;&lt;br /&gt;
&lt;br /&gt;
int crossCoor;&lt;br /&gt;
int moleCoor;&lt;br /&gt;
long spawn;&lt;br /&gt;
int limit;&lt;br /&gt;
char pic;&lt;br /&gt;
boolean dead;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
void setup()  {&lt;br /&gt;
  for(int i=3; i&amp;lt;=7; i++) {&lt;br /&gt;
    pinMode(i, INPUT);&lt;br /&gt;
    digitalWrite(i, HIGH);&lt;br /&gt;
  }&lt;br /&gt;
  pinMode(2, OUTPUT);&lt;br /&gt;
  digitalWrite(2, LOW);&lt;br /&gt;
  Serial.begin(115200);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
int crossGet()  {&lt;br /&gt;
  int coor = 5;&lt;br /&gt;
  if(digitalRead(3) == HIGH)  {&lt;br /&gt;
    coor += 3;&lt;br /&gt;
  }&lt;br /&gt;
  if(digitalRead(5) == HIGH)  {&lt;br /&gt;
    coor -= 3;&lt;br /&gt;
  }&lt;br /&gt;
  if(digitalRead(4) == HIGH)  {&lt;br /&gt;
    coor --;&lt;br /&gt;
  }&lt;br /&gt;
  if(digitalRead(6) == HIGH)  {&lt;br /&gt;
    coor ++;&lt;br /&gt;
  }&lt;br /&gt;
  return coor;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
boolean pressed()  {&lt;br /&gt;
  boolean res;&lt;br /&gt;
  if(digitalRead(7)==LOW)  {&lt;br /&gt;
    res=true;&lt;br /&gt;
  }&lt;br /&gt;
  else  {&lt;br /&gt;
    res=false;&lt;br /&gt;
  }&lt;br /&gt;
  return res;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void display(int molePos)  {&lt;br /&gt;
  int one=crossGet();&lt;br /&gt;
  boolean button = pressed();&lt;br /&gt;
  for(int i=1; i&amp;lt;=9; i++)  {&lt;br /&gt;
&lt;br /&gt;
    if(one==i &amp;amp;&amp;amp; molePos==i)  {&lt;br /&gt;
	if(button)  {&lt;br /&gt;
	  pic = hit;&lt;br /&gt;
	  dead=true;&lt;br /&gt;
	}&lt;br /&gt;
	else  {&lt;br /&gt;
	  pic=both;&lt;br /&gt;
	}&lt;br /&gt;
    }&lt;br /&gt;
    else if(one == i)  {&lt;br /&gt;
	if(button)  {&lt;br /&gt;
	  pic=miss;&lt;br /&gt;
	}&lt;br /&gt;
	else  {&lt;br /&gt;
	  pic=cross;&lt;br /&gt;
	}&lt;br /&gt;
    }&lt;br /&gt;
    else if(molePos==i)  {&lt;br /&gt;
	pic=mole;&lt;br /&gt;
    }&lt;br /&gt;
    else  {&lt;br /&gt;
	pic=blank;&lt;br /&gt;
    }&lt;br /&gt;
    if(i==3 || i==6 || i==9)  {&lt;br /&gt;
	Serial.println(pic);&lt;br /&gt;
    }&lt;br /&gt;
    else  {&lt;br /&gt;
	Serial.print(pic);&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void makeMole()  {&lt;br /&gt;
  spawn = millis();&lt;br /&gt;
  randomSeed(analogRead(0));&lt;br /&gt;
  moleCoor = random(1, 10);&lt;br /&gt;
  dead=false;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void noMole()  {&lt;br /&gt;
  moleCoor=10;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void loop()  {&lt;br /&gt;
  Serial.println(&amp;quot;Ready to play?&amp;quot;);&lt;br /&gt;
  while(digitalRead(7)==HIGH)  {&lt;br /&gt;
  }&lt;br /&gt;
  Serial.println(&amp;quot;Ready...&amp;quot;);&lt;br /&gt;
  delay(1000);&lt;br /&gt;
  Serial.println(&amp;quot;Set...&amp;quot;);&lt;br /&gt;
  delay(1000);&lt;br /&gt;
  Serial.println(&amp;quot;GO!&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
  boolean lost = false;&lt;br /&gt;
  int score = 0;&lt;br /&gt;
  limit= 3000;&lt;br /&gt;
&lt;br /&gt;
  while(lost==false ) {&lt;br /&gt;
    int time = random(0, 21);&lt;br /&gt;
    for(int i=0; i&amp;lt;=time; i++)  {&lt;br /&gt;
	display(10);&lt;br /&gt;
	Serial.println();&lt;br /&gt;
	delay(50);&lt;br /&gt;
    }&lt;br /&gt;
    makeMole();&lt;br /&gt;
    while(dead==false &amp;amp;&amp;amp; spawn+limit &amp;gt;= millis())  {&lt;br /&gt;
	display(moleCoor);&lt;br /&gt;
	if(pic==&#039;#&#039;)  {&lt;br /&gt;
	  dead = true;&lt;br /&gt;
	}&lt;br /&gt;
	Serial.println();&lt;br /&gt;
	delay(50);&lt;br /&gt;
    }&lt;br /&gt;
    if(dead)  {&lt;br /&gt;
&lt;br /&gt;
	score++;&lt;br /&gt;
	if(limit&amp;gt;1000)  {&lt;br /&gt;
	  limit -= 50;&lt;br /&gt;
	}&lt;br /&gt;
	delay(100);&lt;br /&gt;
&lt;br /&gt;
    }&lt;br /&gt;
    else  {&lt;br /&gt;
	break;&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
  Serial.println(&amp;quot;You lost&amp;quot;);&lt;br /&gt;
  Serial.print(&amp;quot;Your score was  &amp;quot;);&lt;br /&gt;
  Serial.println(score);&lt;br /&gt;
  Serial.println();&lt;br /&gt;
  delay(1000);&lt;br /&gt;
  while(digitalRead(7)==HIGH)  {&lt;br /&gt;
  }&lt;br /&gt;
  delay(1000);&lt;br /&gt;
}&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Others==&lt;br /&gt;
What games can you make from a Freeduino, LCD, one pot, one 5-way joystick, some LEDs, a temperature sensor, a light sensor and maybe a piezo speaker? &lt;br /&gt;
&lt;br /&gt;
==Advanced==&lt;br /&gt;
You are also allowed to use the Serial Monitor in combination with Processing or the like, to do stuff on your computer&#039;s display. The Freeduino should be the game engine.&lt;/div&gt;</summary>
		<author><name>Ckharnett</name></author>
	</entry>
	<entry>
		<id>http://wiki.lvl1.org/index.php?title=Freeduino_Games&amp;diff=3802</id>
		<title>Freeduino Games</title>
		<link rel="alternate" type="text/html" href="http://wiki.lvl1.org/index.php?title=Freeduino_Games&amp;diff=3802"/>
		<updated>2012-03-08T20:24:35Z</updated>

		<summary type="html">&lt;p&gt;Ckharnett: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Freeduino Truck Lane==&lt;br /&gt;
Go from the Freeduino Spring Training LCD activity to a game!&lt;br /&gt;
&lt;br /&gt;
Need a Freeduino, a 10K pot, and a 16x2 LCD and a solderless breadboard.&lt;br /&gt;
Follow all steps in [[4th Inning]].&lt;br /&gt;
Now, pull the middle pot pin out of the LCD. Just connect that LCD pin to ground. (It&#039;s the third pin from the end of the LCD) This should give you a high contrast display. We need to use the pot for steering!&lt;br /&gt;
Connect the middle pot pin instead to Analog Input pin 1 of your Freeduino.&lt;br /&gt;
We didn&#039;t add a speaker, just used pin 13 to light up the onboard green LED if you &amp;quot;crash&amp;quot; in the game. If you want to use a speaker, connect it to a PWM pin like digital 3, 5 or 6 and adjust the code accordingly.&lt;br /&gt;
&lt;br /&gt;
Here&#039;s the code, cut and paste this into Arduino and install it to your board. Play away. To play again, press the Freeduino&#039;s reset button.&lt;br /&gt;
&lt;br /&gt;
Much more including videos at the game&#039;s original site [http://www.instructables.com/id/Truck-Lane-a-16x2-LCD-Arduino-game/].&lt;br /&gt;
We&#039;ve changed the pinouts in the code to match what we did in the Freeduino Spring Training LCD activity.&lt;br /&gt;
&lt;br /&gt;
Can you modify the code to make a game that rewards crashing? For example, scoot around catching falling &amp;quot;coins,&amp;quot; and see how many you can collect within a certain time. Then, make them fall faster and faster! This would be a fun way to learn more about what the code is doing.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;/* Simple Car game for a 16x2 LCD display &lt;br /&gt;
   You can use any Hitachi HD44780 compatible LCD.&lt;br /&gt;
   Modified for LVL1 Spring Training LCD Activity,&lt;br /&gt;
    Originally from &lt;br /&gt;
    @TheRealDod, Nov 25, 2010&lt;br /&gt;
   There&#039;s a &amp;quot;steering wheel&amp;quot; potentiometer on analog input 1,&lt;br /&gt;
   and a led on pin 13&lt;br /&gt;
   &lt;br /&gt;
   Enjoy,&lt;br /&gt;
&lt;br /&gt;
*/&lt;br /&gt;
#include &amp;lt;LiquidCrystal.h&amp;gt;&lt;br /&gt;
// LiquidCrystal display&lt;br /&gt;
// You can use any Hitachi HD44780 compatible. Wiring explained at&lt;br /&gt;
// http://www.arduino.cc/en/Tutorial/LiquidCrystal&lt;br /&gt;
LiquidCrystal lcd(7, 8, 9, 10, 11, 12);&lt;br /&gt;
&lt;br /&gt;
// Steering wheel potentiometer&lt;br /&gt;
const int POTPIN = 1;&lt;br /&gt;
const int MAXPOT = 800; // no need to turn the wheel all the way to 1023 :)&lt;br /&gt;
&lt;br /&gt;
// Piezo speaker&lt;br /&gt;
const int SPEAKERPIN = 13;//you can see the led flash when u crash&lt;br /&gt;
&lt;br /&gt;
const int RANDSEEDPIN = 0; // an analog pin that isn&#039;t connected to anything&lt;br /&gt;
&lt;br /&gt;
const int MAXSTEPDURATION = 300; // Start slowly, each step is 1 millisec shorter.&lt;br /&gt;
const int MINSTEPDURATION = 150; // This is as fast as it gets&lt;br /&gt;
&lt;br /&gt;
const int NGLYPHS = 6;&lt;br /&gt;
// the glyphs will be defined starting from 1 (not 0),&lt;br /&gt;
// to enable lcd.print() of null-terminated strings&lt;br /&gt;
byte glyphs[NGLYPHS][8] = {&lt;br /&gt;
  // 1: car up&lt;br /&gt;
  { B00000,&lt;br /&gt;
    B01110,&lt;br /&gt;
    B11111,&lt;br /&gt;
    B01010,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B00000}&lt;br /&gt;
  // 2: car down&lt;br /&gt;
  ,{B00000,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B01110,&lt;br /&gt;
    B11111,&lt;br /&gt;
    B01010,&lt;br /&gt;
    B00000}&lt;br /&gt;
  // 3: truck up&lt;br /&gt;
  ,{B00000,&lt;br /&gt;
    B11110,&lt;br /&gt;
    B11111,&lt;br /&gt;
    B01010,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B00000}&lt;br /&gt;
  // 4: truck down&lt;br /&gt;
  ,{B00000,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B11110,&lt;br /&gt;
    B11111,&lt;br /&gt;
    B01010,&lt;br /&gt;
    B00000}&lt;br /&gt;
  // 5: crash up&lt;br /&gt;
  ,{B10101,&lt;br /&gt;
    B01110,&lt;br /&gt;
    B01110,&lt;br /&gt;
    B10101,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B00000}&lt;br /&gt;
  // 6: crash down&lt;br /&gt;
  ,{B00000,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B10101,&lt;br /&gt;
    B01110,&lt;br /&gt;
    B01110,&lt;br /&gt;
    B10101,&lt;br /&gt;
    B00000}&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
const int NCARPOSITIONS = 4;&lt;br /&gt;
&lt;br /&gt;
// Each position is mapped to a column of 2 glyphs&lt;br /&gt;
// Used to make sense when I had a 5th position&lt;br /&gt;
// where car or crash was drawn as 2 glyphs&lt;br /&gt;
// (can&#039;t do that since 0 terminates strings),&lt;br /&gt;
// so it&#039;s kinda silly now, but it ain&#039;t broke :)&lt;br /&gt;
const char BLANK=32;&lt;br /&gt;
char car2glyphs[NCARPOSITIONS][2] = {&lt;br /&gt;
  {1,BLANK},{2,BLANK},{BLANK,1},{BLANK,2}&lt;br /&gt;
};&lt;br /&gt;
char truck2glyphs[NCARPOSITIONS][2] = {&lt;br /&gt;
  {3,BLANK},{4,BLANK},{BLANK,3},{BLANK,4}&lt;br /&gt;
};&lt;br /&gt;
char crash2glyphs[NCARPOSITIONS][2] = {&lt;br /&gt;
  {5,BLANK},{6,BLANK},{BLANK,5},{BLANK,6}&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
const int ROADLEN = 15; // LCD width (not counting our car)&lt;br /&gt;
int road[ROADLEN]; // positions of other cars&lt;br /&gt;
char line_buff[2+ROADLEN]; // aux string for drawRoad()&lt;br /&gt;
int road_index;&lt;br /&gt;
int car_pos;&lt;br /&gt;
// Off-the-grid position means empty column, so MAXROADPOS&lt;br /&gt;
// determines the probability of a car in a column&lt;br /&gt;
// e.g. 3*NCARPOSITIONS gives p=1/3&lt;br /&gt;
const int MAXROADPOS = 3*NCARPOSITIONS;&lt;br /&gt;
int step_duration;&lt;br /&gt;
&lt;br /&gt;
int crash; // true if crashed&lt;br /&gt;
unsigned int crashtime; // millis() when crashed&lt;br /&gt;
const int CRASHSOUNDDURATION = 250;&lt;br /&gt;
&lt;br /&gt;
const char *INTRO1=&amp;quot;Trucks ahead,&amp;quot;;&lt;br /&gt;
const char *INTRO2=&amp;quot;Drive carefully&amp;quot;;&lt;br /&gt;
const int INTRODELAY = 2000;&lt;br /&gt;
&lt;br /&gt;
void setup()&lt;br /&gt;
{&lt;br /&gt;
  crash = crashtime = road_index = 0;&lt;br /&gt;
  step_duration = MAXSTEPDURATION;&lt;br /&gt;
  line_buff[1+ROADLEN] = &#039;\0&#039;; // null terminate it&lt;br /&gt;
  randomSeed(analogRead(RANDSEEDPIN));&lt;br /&gt;
  for (int i=0; i&amp;lt;NGLYPHS; i++) {&lt;br /&gt;
    lcd.createChar(i+1,glyphs[i]);&lt;br /&gt;
  }&lt;br /&gt;
  for (int i=0; i&amp;lt;ROADLEN; i++) {&lt;br /&gt;
    road[i]=-1;&lt;br /&gt;
  }&lt;br /&gt;
  pinMode(SPEAKERPIN,OUTPUT);&lt;br /&gt;
  analogWrite(SPEAKERPIN,0); // to be on the safe side&lt;br /&gt;
  lcd.begin(16,2);&lt;br /&gt;
  getSteeringWheel();&lt;br /&gt;
  drawRoad();&lt;br /&gt;
  lcd.setCursor(1,0);&lt;br /&gt;
  lcd.print(INTRO1);&lt;br /&gt;
  lcd.setCursor(1,1);&lt;br /&gt;
  lcd.print(INTRO2);&lt;br /&gt;
  delay(INTRODELAY);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void loop() {&lt;br /&gt;
  unsigned long now = millis()-INTRODELAY;&lt;br /&gt;
  if (!crash) {&lt;br /&gt;
    getSteeringWheel();&lt;br /&gt;
    crash = (car_pos==road[road_index]);&lt;br /&gt;
  }&lt;br /&gt;
  if (crash) {&lt;br /&gt;
    if (!crashtime) {&lt;br /&gt;
      crashtime=now;&lt;br /&gt;
      drawRoad();&lt;br /&gt;
      // Game over text&lt;br /&gt;
      // (keep first 2 &amp;quot;crash&amp;quot; columns intact)&lt;br /&gt;
      lcd.setCursor(2,0);&lt;br /&gt;
      lcd.print(&amp;quot;Crashed after&amp;quot;);&lt;br /&gt;
      lcd.setCursor(2,1);&lt;br /&gt;
      lcd.print(now/1000);&lt;br /&gt;
      lcd.print(&amp;quot; seconds.&amp;quot;);&lt;br /&gt;
    }&lt;br /&gt;
    if ((now-crashtime)&amp;lt;CRASHSOUNDDURATION) {&lt;br /&gt;
      analogWrite(SPEAKERPIN,random(255)); // white noise&lt;br /&gt;
    } &lt;br /&gt;
    else {&lt;br /&gt;
      analogWrite(SPEAKERPIN,0); // dramatic post-crush silence :)   &lt;br /&gt;
    }&lt;br /&gt;
    delay(10); // Wait a bit between writes&lt;br /&gt;
  } &lt;br /&gt;
  else {&lt;br /&gt;
&lt;br /&gt;
    int prev_pos = road[(road_index-1)%ROADLEN];&lt;br /&gt;
    int this_pos = random(MAXROADPOS);&lt;br /&gt;
    while (abs(this_pos-prev_pos)&amp;lt;2) { // don&#039;t jam the road&lt;br /&gt;
      this_pos = random(MAXROADPOS);&lt;br /&gt;
    }&lt;br /&gt;
    road[road_index] = this_pos;&lt;br /&gt;
    road_index = (road_index+1)%ROADLEN;&lt;br /&gt;
    drawRoad();&lt;br /&gt;
    delay(step_duration);&lt;br /&gt;
    if (step_duration&amp;gt;MINSTEPDURATION) {&lt;br /&gt;
      step_duration--; // go faster&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
void getSteeringWheel() {&lt;br /&gt;
  car_pos = map(analogRead(POTPIN),0,1024,0,NCARPOSITIONS);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void drawRoad() {&lt;br /&gt;
  for (int i=0; i&amp;lt;2; i++) {&lt;br /&gt;
    if (crash) {&lt;br /&gt;
      line_buff[0]=crash2glyphs[car_pos][i];&lt;br /&gt;
    } &lt;br /&gt;
    else {&lt;br /&gt;
      line_buff[0]=car2glyphs[car_pos][i];&lt;br /&gt;
    }&lt;br /&gt;
    for (int j=0; j&amp;lt;ROADLEN; j++) {&lt;br /&gt;
      int pos = road[(j+road_index)%ROADLEN];&lt;br /&gt;
      line_buff[j+1] = pos&amp;gt;=0 &amp;amp;&amp;amp; pos&amp;lt;NCARPOSITIONS ? truck2glyphs[pos][i] : BLANK;&lt;br /&gt;
    }&lt;br /&gt;
    lcd.setCursor(0,i);&lt;br /&gt;
    lcd.print(line_buff);&lt;br /&gt;
  }&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Freeduino Whack-A-Mole==&lt;br /&gt;
And next, Freeduino Whack-A-Mole![http://www.google.com/url?sa=t&amp;amp;rct=j&amp;amp;q=&amp;amp;esrc=s&amp;amp;source=web&amp;amp;cd=1&amp;amp;cts=1331224454832&amp;amp;ved=0CCkQFjAA&amp;amp;url=http%3A%2F%2Fwww.arduino.cc%2Fcgi-bin%2Fyabb2%2FYaBB.pl%3Fnum%3D1262971548&amp;amp;ei=VeFYT7udG-W30gHRztSsDw&amp;amp;usg=AFQjCNF8jYa_NAlX93ekQY-i1_jE6sCTuQ&amp;amp;sig2=KC_H8S7tHq7lLiaMqooF1g] We need 5-way joysticks for this one. It will introduce the Arduino Serial Monitor.&lt;br /&gt;
We&#039;re getting this 5-way joystick (5 way= up,down,left,right and button press)- it&#039;s a navigation switch from Adafruit.[https://www.adafruit.com/products/504]&lt;br /&gt;
&lt;br /&gt;
Here&#039;s the code:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/*&lt;br /&gt;
This is a whackamole game.&lt;br /&gt;
Joystick connected as follows:&lt;br /&gt;
Up    digital pin 3&lt;br /&gt;
Right		 4&lt;br /&gt;
Down		  5&lt;br /&gt;
Left		  6&lt;br /&gt;
Button		7&lt;br /&gt;
&lt;br /&gt;
Common ground (because I have a ribbon wire&lt;br /&gt;
coming from the joystick, and this is just neater)&lt;br /&gt;
	Digital Pin 2&lt;br /&gt;
&lt;br /&gt;
Press the button to start&lt;br /&gt;
*/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
const char cross = &#039;*&#039;;&lt;br /&gt;
const char mole = &#039;O&#039;;&lt;br /&gt;
const char both = &#039;@&#039;;&lt;br /&gt;
const char miss = &#039;x&#039;;&lt;br /&gt;
const char hit = &#039;#&#039;;&lt;br /&gt;
const char blank = &#039;.&#039;;&lt;br /&gt;
&lt;br /&gt;
int crossCoor;&lt;br /&gt;
int moleCoor;&lt;br /&gt;
long spawn;&lt;br /&gt;
int limit;&lt;br /&gt;
char pic;&lt;br /&gt;
boolean dead;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
void setup()  {&lt;br /&gt;
  for(int i=3; i&amp;lt;=7; i++) {&lt;br /&gt;
    pinMode(i, INPUT);&lt;br /&gt;
    digitalWrite(i, HIGH);&lt;br /&gt;
  }&lt;br /&gt;
  pinMode(2, OUTPUT);&lt;br /&gt;
  digitalWrite(2, LOW);&lt;br /&gt;
  Serial.begin(115200);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
int crossGet()  {&lt;br /&gt;
  int coor = 5;&lt;br /&gt;
  if(digitalRead(3) == HIGH)  {&lt;br /&gt;
    coor += 3;&lt;br /&gt;
  }&lt;br /&gt;
  if(digitalRead(5) == HIGH)  {&lt;br /&gt;
    coor -= 3;&lt;br /&gt;
  }&lt;br /&gt;
  if(digitalRead(4) == HIGH)  {&lt;br /&gt;
    coor --;&lt;br /&gt;
  }&lt;br /&gt;
  if(digitalRead(6) == HIGH)  {&lt;br /&gt;
    coor ++;&lt;br /&gt;
  }&lt;br /&gt;
  return coor;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
boolean pressed()  {&lt;br /&gt;
  boolean res;&lt;br /&gt;
  if(digitalRead(7)==LOW)  {&lt;br /&gt;
    res=true;&lt;br /&gt;
  }&lt;br /&gt;
  else  {&lt;br /&gt;
    res=false;&lt;br /&gt;
  }&lt;br /&gt;
  return res;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void display(int molePos)  {&lt;br /&gt;
  int one=crossGet();&lt;br /&gt;
  boolean button = pressed();&lt;br /&gt;
  for(int i=1; i&amp;lt;=9; i++)  {&lt;br /&gt;
&lt;br /&gt;
    if(one==i &amp;amp;&amp;amp; molePos==i)  {&lt;br /&gt;
	if(button)  {&lt;br /&gt;
	  pic = hit;&lt;br /&gt;
	  dead=true;&lt;br /&gt;
	}&lt;br /&gt;
	else  {&lt;br /&gt;
	  pic=both;&lt;br /&gt;
	}&lt;br /&gt;
    }&lt;br /&gt;
    else if(one == i)  {&lt;br /&gt;
	if(button)  {&lt;br /&gt;
	  pic=miss;&lt;br /&gt;
	}&lt;br /&gt;
	else  {&lt;br /&gt;
	  pic=cross;&lt;br /&gt;
	}&lt;br /&gt;
    }&lt;br /&gt;
    else if(molePos==i)  {&lt;br /&gt;
	pic=mole;&lt;br /&gt;
    }&lt;br /&gt;
    else  {&lt;br /&gt;
	pic=blank;&lt;br /&gt;
    }&lt;br /&gt;
    if(i==3 || i==6 || i==9)  {&lt;br /&gt;
	Serial.println(pic);&lt;br /&gt;
    }&lt;br /&gt;
    else  {&lt;br /&gt;
	Serial.print(pic);&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void makeMole()  {&lt;br /&gt;
  spawn = millis();&lt;br /&gt;
  randomSeed(analogRead(0));&lt;br /&gt;
  moleCoor = random(1, 10);&lt;br /&gt;
  dead=false;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void noMole()  {&lt;br /&gt;
  moleCoor=10;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void loop()  {&lt;br /&gt;
  Serial.println(&amp;quot;Ready to play?&amp;quot;);&lt;br /&gt;
  while(digitalRead(7)==HIGH)  {&lt;br /&gt;
  }&lt;br /&gt;
  Serial.println(&amp;quot;Ready...&amp;quot;);&lt;br /&gt;
  delay(1000);&lt;br /&gt;
  Serial.println(&amp;quot;Set...&amp;quot;);&lt;br /&gt;
  delay(1000);&lt;br /&gt;
  Serial.println(&amp;quot;GO!&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
  boolean lost = false;&lt;br /&gt;
  int score = 0;&lt;br /&gt;
  limit= 3000;&lt;br /&gt;
&lt;br /&gt;
  while(lost==false ) {&lt;br /&gt;
    int time = random(0, 21);&lt;br /&gt;
    for(int i=0; i&amp;lt;=time; i++)  {&lt;br /&gt;
	display(10);&lt;br /&gt;
	Serial.println();&lt;br /&gt;
	delay(50);&lt;br /&gt;
    }&lt;br /&gt;
    makeMole();&lt;br /&gt;
    while(dead==false &amp;amp;&amp;amp; spawn+limit &amp;gt;= millis())  {&lt;br /&gt;
	display(moleCoor);&lt;br /&gt;
	if(pic==&#039;#&#039;)  {&lt;br /&gt;
	  dead = true;&lt;br /&gt;
	}&lt;br /&gt;
	Serial.println();&lt;br /&gt;
	delay(50);&lt;br /&gt;
    }&lt;br /&gt;
    if(dead)  {&lt;br /&gt;
&lt;br /&gt;
	score++;&lt;br /&gt;
	if(limit&amp;gt;1000)  {&lt;br /&gt;
	  limit -= 50;&lt;br /&gt;
	}&lt;br /&gt;
	delay(100);&lt;br /&gt;
&lt;br /&gt;
    }&lt;br /&gt;
    else  {&lt;br /&gt;
	break;&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
  Serial.println(&amp;quot;You lost&amp;quot;);&lt;br /&gt;
  Serial.print(&amp;quot;Your score was  &amp;quot;);&lt;br /&gt;
  Serial.println(score);&lt;br /&gt;
  Serial.println();&lt;br /&gt;
  delay(1000);&lt;br /&gt;
  while(digitalRead(7)==HIGH)  {&lt;br /&gt;
  }&lt;br /&gt;
  delay(1000);&lt;br /&gt;
}&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
==Others==&lt;br /&gt;
What games can you make from a Freeduino, LCD, one pot, one 5-way joystick, some LEDs, a temperature sensor, a light sensor and maybe a piezo speaker? &lt;br /&gt;
&lt;br /&gt;
==Advanced==&lt;br /&gt;
You are also allowed to use the Serial Monitor in combination with Processing or the like, to do stuff on your computer&#039;s display. The Freeduino should be the game engine.&lt;/div&gt;</summary>
		<author><name>Ckharnett</name></author>
	</entry>
	<entry>
		<id>http://wiki.lvl1.org/index.php?title=Freeduino_Games&amp;diff=3801</id>
		<title>Freeduino Games</title>
		<link rel="alternate" type="text/html" href="http://wiki.lvl1.org/index.php?title=Freeduino_Games&amp;diff=3801"/>
		<updated>2012-03-08T16:44:26Z</updated>

		<summary type="html">&lt;p&gt;Ckharnett: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Freeduino Truck Lane==&lt;br /&gt;
Go from the Freeduino Spring Training LCD activity to a game!&lt;br /&gt;
&lt;br /&gt;
Need a Freeduino, a 10K pot, and a 16x2 LCD and a solderless breadboard.&lt;br /&gt;
Follow all steps in [[4th Inning]].&lt;br /&gt;
Now, pull the middle pot pin out of the LCD. Just connect that LCD pin to ground. (It&#039;s the third pin from the end of the LCD) This should give you a high contrast display. We need to use the pot for steering!&lt;br /&gt;
Connect the middle pot pin instead to Analog Input pin 1 of your Freeduino.&lt;br /&gt;
We didn&#039;t add a speaker, just used pin 13 to light up the onboard green LED if you &amp;quot;crash&amp;quot; in the game. If you want to use a speaker, connect it to a PWM pin like digital 3, 5 or 6 and adjust the code accordingly.&lt;br /&gt;
&lt;br /&gt;
Here&#039;s the code, cut and paste this into Arduino and install it to your board. Play away. To play again, press the Freeduino&#039;s reset button.&lt;br /&gt;
&lt;br /&gt;
Much more including videos at the game&#039;s original site [http://www.instructables.com/id/Truck-Lane-a-16x2-LCD-Arduino-game/].&lt;br /&gt;
We&#039;ve changed the pinouts in the code to match what we did in the Freeduino Spring Training LCD activity.&lt;br /&gt;
&lt;br /&gt;
Can you modify the code to make a game that rewards crashing? For example, scoot around catching falling &amp;quot;coins,&amp;quot; and see how many you can collect within a certain time. Then, make them fall faster and faster! This would be a fun way to learn more about what the code is doing.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;/* Simple Car game for a 16x2 LCD display &lt;br /&gt;
   You can use any Hitachi HD44780 compatible LCD.&lt;br /&gt;
   Modified for LVL1 Spring Training LCD Activity,&lt;br /&gt;
    Originally from &lt;br /&gt;
    @TheRealDod, Nov 25, 2010&lt;br /&gt;
   There&#039;s a &amp;quot;steering wheel&amp;quot; potentiometer on analog input 1,&lt;br /&gt;
   and a led on pin 13&lt;br /&gt;
   &lt;br /&gt;
   Enjoy,&lt;br /&gt;
&lt;br /&gt;
*/&lt;br /&gt;
#include &amp;lt;LiquidCrystal.h&amp;gt;&lt;br /&gt;
// LiquidCrystal display&lt;br /&gt;
// You can use any Hitachi HD44780 compatible. Wiring explained at&lt;br /&gt;
// http://www.arduino.cc/en/Tutorial/LiquidCrystal&lt;br /&gt;
LiquidCrystal lcd(7, 8, 9, 10, 11, 12);&lt;br /&gt;
&lt;br /&gt;
// Steering wheel potentiometer&lt;br /&gt;
const int POTPIN = 1;&lt;br /&gt;
const int MAXPOT = 800; // no need to turn the wheel all the way to 1023 :)&lt;br /&gt;
&lt;br /&gt;
// Piezo speaker&lt;br /&gt;
const int SPEAKERPIN = 13;//you can see the led flash when u crash&lt;br /&gt;
&lt;br /&gt;
const int RANDSEEDPIN = 0; // an analog pin that isn&#039;t connected to anything&lt;br /&gt;
&lt;br /&gt;
const int MAXSTEPDURATION = 300; // Start slowly, each step is 1 millisec shorter.&lt;br /&gt;
const int MINSTEPDURATION = 150; // This is as fast as it gets&lt;br /&gt;
&lt;br /&gt;
const int NGLYPHS = 6;&lt;br /&gt;
// the glyphs will be defined starting from 1 (not 0),&lt;br /&gt;
// to enable lcd.print() of null-terminated strings&lt;br /&gt;
byte glyphs[NGLYPHS][8] = {&lt;br /&gt;
  // 1: car up&lt;br /&gt;
  { B00000,&lt;br /&gt;
    B01110,&lt;br /&gt;
    B11111,&lt;br /&gt;
    B01010,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B00000}&lt;br /&gt;
  // 2: car down&lt;br /&gt;
  ,{B00000,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B01110,&lt;br /&gt;
    B11111,&lt;br /&gt;
    B01010,&lt;br /&gt;
    B00000}&lt;br /&gt;
  // 3: truck up&lt;br /&gt;
  ,{B00000,&lt;br /&gt;
    B11110,&lt;br /&gt;
    B11111,&lt;br /&gt;
    B01010,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B00000}&lt;br /&gt;
  // 4: truck down&lt;br /&gt;
  ,{B00000,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B11110,&lt;br /&gt;
    B11111,&lt;br /&gt;
    B01010,&lt;br /&gt;
    B00000}&lt;br /&gt;
  // 5: crash up&lt;br /&gt;
  ,{B10101,&lt;br /&gt;
    B01110,&lt;br /&gt;
    B01110,&lt;br /&gt;
    B10101,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B00000}&lt;br /&gt;
  // 6: crash down&lt;br /&gt;
  ,{B00000,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B10101,&lt;br /&gt;
    B01110,&lt;br /&gt;
    B01110,&lt;br /&gt;
    B10101,&lt;br /&gt;
    B00000}&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
const int NCARPOSITIONS = 4;&lt;br /&gt;
&lt;br /&gt;
// Each position is mapped to a column of 2 glyphs&lt;br /&gt;
// Used to make sense when I had a 5th position&lt;br /&gt;
// where car or crash was drawn as 2 glyphs&lt;br /&gt;
// (can&#039;t do that since 0 terminates strings),&lt;br /&gt;
// so it&#039;s kinda silly now, but it ain&#039;t broke :)&lt;br /&gt;
const char BLANK=32;&lt;br /&gt;
char car2glyphs[NCARPOSITIONS][2] = {&lt;br /&gt;
  {1,BLANK},{2,BLANK},{BLANK,1},{BLANK,2}&lt;br /&gt;
};&lt;br /&gt;
char truck2glyphs[NCARPOSITIONS][2] = {&lt;br /&gt;
  {3,BLANK},{4,BLANK},{BLANK,3},{BLANK,4}&lt;br /&gt;
};&lt;br /&gt;
char crash2glyphs[NCARPOSITIONS][2] = {&lt;br /&gt;
  {5,BLANK},{6,BLANK},{BLANK,5},{BLANK,6}&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
const int ROADLEN = 15; // LCD width (not counting our car)&lt;br /&gt;
int road[ROADLEN]; // positions of other cars&lt;br /&gt;
char line_buff[2+ROADLEN]; // aux string for drawRoad()&lt;br /&gt;
int road_index;&lt;br /&gt;
int car_pos;&lt;br /&gt;
// Off-the-grid position means empty column, so MAXROADPOS&lt;br /&gt;
// determines the probability of a car in a column&lt;br /&gt;
// e.g. 3*NCARPOSITIONS gives p=1/3&lt;br /&gt;
const int MAXROADPOS = 3*NCARPOSITIONS;&lt;br /&gt;
int step_duration;&lt;br /&gt;
&lt;br /&gt;
int crash; // true if crashed&lt;br /&gt;
unsigned int crashtime; // millis() when crashed&lt;br /&gt;
const int CRASHSOUNDDURATION = 250;&lt;br /&gt;
&lt;br /&gt;
const char *INTRO1=&amp;quot;Trucks ahead,&amp;quot;;&lt;br /&gt;
const char *INTRO2=&amp;quot;Drive carefully&amp;quot;;&lt;br /&gt;
const int INTRODELAY = 2000;&lt;br /&gt;
&lt;br /&gt;
void setup()&lt;br /&gt;
{&lt;br /&gt;
  crash = crashtime = road_index = 0;&lt;br /&gt;
  step_duration = MAXSTEPDURATION;&lt;br /&gt;
  line_buff[1+ROADLEN] = &#039;\0&#039;; // null terminate it&lt;br /&gt;
  randomSeed(analogRead(RANDSEEDPIN));&lt;br /&gt;
  for (int i=0; i&amp;lt;NGLYPHS; i++) {&lt;br /&gt;
    lcd.createChar(i+1,glyphs[i]);&lt;br /&gt;
  }&lt;br /&gt;
  for (int i=0; i&amp;lt;ROADLEN; i++) {&lt;br /&gt;
    road[i]=-1;&lt;br /&gt;
  }&lt;br /&gt;
  pinMode(SPEAKERPIN,OUTPUT);&lt;br /&gt;
  analogWrite(SPEAKERPIN,0); // to be on the safe side&lt;br /&gt;
  lcd.begin(16,2);&lt;br /&gt;
  getSteeringWheel();&lt;br /&gt;
  drawRoad();&lt;br /&gt;
  lcd.setCursor(1,0);&lt;br /&gt;
  lcd.print(INTRO1);&lt;br /&gt;
  lcd.setCursor(1,1);&lt;br /&gt;
  lcd.print(INTRO2);&lt;br /&gt;
  delay(INTRODELAY);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void loop() {&lt;br /&gt;
  unsigned long now = millis()-INTRODELAY;&lt;br /&gt;
  if (!crash) {&lt;br /&gt;
    getSteeringWheel();&lt;br /&gt;
    crash = (car_pos==road[road_index]);&lt;br /&gt;
  }&lt;br /&gt;
  if (crash) {&lt;br /&gt;
    if (!crashtime) {&lt;br /&gt;
      crashtime=now;&lt;br /&gt;
      drawRoad();&lt;br /&gt;
      // Game over text&lt;br /&gt;
      // (keep first 2 &amp;quot;crash&amp;quot; columns intact)&lt;br /&gt;
      lcd.setCursor(2,0);&lt;br /&gt;
      lcd.print(&amp;quot;Crashed after&amp;quot;);&lt;br /&gt;
      lcd.setCursor(2,1);&lt;br /&gt;
      lcd.print(now/1000);&lt;br /&gt;
      lcd.print(&amp;quot; seconds.&amp;quot;);&lt;br /&gt;
    }&lt;br /&gt;
    if ((now-crashtime)&amp;lt;CRASHSOUNDDURATION) {&lt;br /&gt;
      analogWrite(SPEAKERPIN,random(255)); // white noise&lt;br /&gt;
    } &lt;br /&gt;
    else {&lt;br /&gt;
      analogWrite(SPEAKERPIN,0); // dramatic post-crush silence :)   &lt;br /&gt;
    }&lt;br /&gt;
    delay(10); // Wait a bit between writes&lt;br /&gt;
  } &lt;br /&gt;
  else {&lt;br /&gt;
&lt;br /&gt;
    int prev_pos = road[(road_index-1)%ROADLEN];&lt;br /&gt;
    int this_pos = random(MAXROADPOS);&lt;br /&gt;
    while (abs(this_pos-prev_pos)&amp;lt;2) { // don&#039;t jam the road&lt;br /&gt;
      this_pos = random(MAXROADPOS);&lt;br /&gt;
    }&lt;br /&gt;
    road[road_index] = this_pos;&lt;br /&gt;
    road_index = (road_index+1)%ROADLEN;&lt;br /&gt;
    drawRoad();&lt;br /&gt;
    delay(step_duration);&lt;br /&gt;
    if (step_duration&amp;gt;MINSTEPDURATION) {&lt;br /&gt;
      step_duration--; // go faster&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
void getSteeringWheel() {&lt;br /&gt;
  car_pos = map(analogRead(POTPIN),0,1024,0,NCARPOSITIONS);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void drawRoad() {&lt;br /&gt;
  for (int i=0; i&amp;lt;2; i++) {&lt;br /&gt;
    if (crash) {&lt;br /&gt;
      line_buff[0]=crash2glyphs[car_pos][i];&lt;br /&gt;
    } &lt;br /&gt;
    else {&lt;br /&gt;
      line_buff[0]=car2glyphs[car_pos][i];&lt;br /&gt;
    }&lt;br /&gt;
    for (int j=0; j&amp;lt;ROADLEN; j++) {&lt;br /&gt;
      int pos = road[(j+road_index)%ROADLEN];&lt;br /&gt;
      line_buff[j+1] = pos&amp;gt;=0 &amp;amp;&amp;amp; pos&amp;lt;NCARPOSITIONS ? truck2glyphs[pos][i] : BLANK;&lt;br /&gt;
    }&lt;br /&gt;
    lcd.setCursor(0,i);&lt;br /&gt;
    lcd.print(line_buff);&lt;br /&gt;
  }&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Freeduino Whack-A-Mole==&lt;br /&gt;
Coming soon, Freeduino [Whack-A-Mole!][http://www.google.com/url?sa=t&amp;amp;rct=j&amp;amp;q=&amp;amp;esrc=s&amp;amp;source=web&amp;amp;cd=1&amp;amp;cts=1331224454832&amp;amp;ved=0CCkQFjAA&amp;amp;url=http%3A%2F%2Fwww.arduino.cc%2Fcgi-bin%2Fyabb2%2FYaBB.pl%3Fnum%3D1262971548&amp;amp;ei=VeFYT7udG-W30gHRztSsDw&amp;amp;usg=AFQjCNF8jYa_NAlX93ekQY-i1_jE6sCTuQ&amp;amp;sig2=KC_H8S7tHq7lLiaMqooF1g] We need 5-way joysticks for this one. It will introduce the Arduino Serial Monitor.&lt;br /&gt;
&lt;br /&gt;
==Others==&lt;br /&gt;
What games can you make from a Freeduino, LCD, one pot, one 5-way joystick, some LEDs, a temperature sensor, a light sensor and maybe a piezo speaker? &lt;br /&gt;
&lt;br /&gt;
==Advanced==&lt;br /&gt;
You are also allowed to use the Serial Monitor in combination with Processing or the like, to do stuff on your computer&#039;s display. The Freeduino should be the game engine.&lt;/div&gt;</summary>
		<author><name>Ckharnett</name></author>
	</entry>
	<entry>
		<id>http://wiki.lvl1.org/index.php?title=Freeduino_Games&amp;diff=3800</id>
		<title>Freeduino Games</title>
		<link rel="alternate" type="text/html" href="http://wiki.lvl1.org/index.php?title=Freeduino_Games&amp;diff=3800"/>
		<updated>2012-03-08T16:37:37Z</updated>

		<summary type="html">&lt;p&gt;Ckharnett: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Freeduino Truck Lane==&lt;br /&gt;
Go from the Freeduino Spring Training LCD activity to a game!&lt;br /&gt;
&lt;br /&gt;
Need a Freeduino, a 10K pot, and a 16x2 LCD and a solderless breadboard.&lt;br /&gt;
Follow all steps in [[4th Inning]].&lt;br /&gt;
Now, pull the middle pot pin out of the LCD. Just connect that LCD pin to ground. (It&#039;s the third pin from the end of the LCD) This should give you a high contrast display. We need to use the pot for steering!&lt;br /&gt;
Connect the middle pot pin instead to Analog Input pin 1 of your Freeduino.&lt;br /&gt;
We didn&#039;t add a speaker, just used pin 13 to light up the onboard green LED if you &amp;quot;crash&amp;quot; in the game. If you want to use a speaker, connect it to a PWM pin like digital 3, 5 or 6 and adjust the code accordingly.&lt;br /&gt;
&lt;br /&gt;
Here&#039;s the code, cut and paste this into Arduino and install it to your board. Play away. To play again, press the Freeduino&#039;s reset button.&lt;br /&gt;
&lt;br /&gt;
Much more including videos at the game&#039;s original site [http://www.instructables.com/id/Truck-Lane-a-16x2-LCD-Arduino-game/].&lt;br /&gt;
We&#039;ve changed the pinouts in the code to match what we did in the Freeduino Spring Training LCD activity.&lt;br /&gt;
&lt;br /&gt;
Can you modify the code to make a game that rewards crashing? For example, scoot around catching falling &amp;quot;coins,&amp;quot; and see how many you can collect within a certain time. Then, make them fall faster and faster! This would be a fun way to learn more about what the code is doing.&lt;br /&gt;
&lt;br /&gt;
==Freeduino Whack-A-Mole==&lt;br /&gt;
Coming soon, Freeduino Whack-A-Mole! We need 5-way joysticks for this one. It will introduce the Arduino Serial Monitor.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;/* Simple Car game for a 16x2 LCD display &lt;br /&gt;
   You can use any Hitachi HD44780 compatible LCD.&lt;br /&gt;
   Modified for LVL1 Spring Training LCD Activity,&lt;br /&gt;
    Originally from &lt;br /&gt;
    @TheRealDod, Nov 25, 2010&lt;br /&gt;
   There&#039;s a &amp;quot;steering wheel&amp;quot; potentiometer on analog input 1,&lt;br /&gt;
   and a led on pin 13&lt;br /&gt;
   &lt;br /&gt;
   Enjoy,&lt;br /&gt;
&lt;br /&gt;
*/&lt;br /&gt;
#include &amp;lt;LiquidCrystal.h&amp;gt;&lt;br /&gt;
// LiquidCrystal display&lt;br /&gt;
// You can use any Hitachi HD44780 compatible. Wiring explained at&lt;br /&gt;
// http://www.arduino.cc/en/Tutorial/LiquidCrystal&lt;br /&gt;
LiquidCrystal lcd(7, 8, 9, 10, 11, 12);&lt;br /&gt;
&lt;br /&gt;
// Steering wheel potentiometer&lt;br /&gt;
const int POTPIN = 1;&lt;br /&gt;
const int MAXPOT = 800; // no need to turn the wheel all the way to 1023 :)&lt;br /&gt;
&lt;br /&gt;
// Piezo speaker&lt;br /&gt;
const int SPEAKERPIN = 13;//you can see the led flash when u crash&lt;br /&gt;
&lt;br /&gt;
const int RANDSEEDPIN = 0; // an analog pin that isn&#039;t connected to anything&lt;br /&gt;
&lt;br /&gt;
const int MAXSTEPDURATION = 300; // Start slowly, each step is 1 millisec shorter.&lt;br /&gt;
const int MINSTEPDURATION = 150; // This is as fast as it gets&lt;br /&gt;
&lt;br /&gt;
const int NGLYPHS = 6;&lt;br /&gt;
// the glyphs will be defined starting from 1 (not 0),&lt;br /&gt;
// to enable lcd.print() of null-terminated strings&lt;br /&gt;
byte glyphs[NGLYPHS][8] = {&lt;br /&gt;
  // 1: car up&lt;br /&gt;
  { B00000,&lt;br /&gt;
    B01110,&lt;br /&gt;
    B11111,&lt;br /&gt;
    B01010,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B00000}&lt;br /&gt;
  // 2: car down&lt;br /&gt;
  ,{B00000,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B01110,&lt;br /&gt;
    B11111,&lt;br /&gt;
    B01010,&lt;br /&gt;
    B00000}&lt;br /&gt;
  // 3: truck up&lt;br /&gt;
  ,{B00000,&lt;br /&gt;
    B11110,&lt;br /&gt;
    B11111,&lt;br /&gt;
    B01010,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B00000}&lt;br /&gt;
  // 4: truck down&lt;br /&gt;
  ,{B00000,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B11110,&lt;br /&gt;
    B11111,&lt;br /&gt;
    B01010,&lt;br /&gt;
    B00000}&lt;br /&gt;
  // 5: crash up&lt;br /&gt;
  ,{B10101,&lt;br /&gt;
    B01110,&lt;br /&gt;
    B01110,&lt;br /&gt;
    B10101,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B00000}&lt;br /&gt;
  // 6: crash down&lt;br /&gt;
  ,{B00000,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B10101,&lt;br /&gt;
    B01110,&lt;br /&gt;
    B01110,&lt;br /&gt;
    B10101,&lt;br /&gt;
    B00000}&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
const int NCARPOSITIONS = 4;&lt;br /&gt;
&lt;br /&gt;
// Each position is mapped to a column of 2 glyphs&lt;br /&gt;
// Used to make sense when I had a 5th position&lt;br /&gt;
// where car or crash was drawn as 2 glyphs&lt;br /&gt;
// (can&#039;t do that since 0 terminates strings),&lt;br /&gt;
// so it&#039;s kinda silly now, but it ain&#039;t broke :)&lt;br /&gt;
const char BLANK=32;&lt;br /&gt;
char car2glyphs[NCARPOSITIONS][2] = {&lt;br /&gt;
  {1,BLANK},{2,BLANK},{BLANK,1},{BLANK,2}&lt;br /&gt;
};&lt;br /&gt;
char truck2glyphs[NCARPOSITIONS][2] = {&lt;br /&gt;
  {3,BLANK},{4,BLANK},{BLANK,3},{BLANK,4}&lt;br /&gt;
};&lt;br /&gt;
char crash2glyphs[NCARPOSITIONS][2] = {&lt;br /&gt;
  {5,BLANK},{6,BLANK},{BLANK,5},{BLANK,6}&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
const int ROADLEN = 15; // LCD width (not counting our car)&lt;br /&gt;
int road[ROADLEN]; // positions of other cars&lt;br /&gt;
char line_buff[2+ROADLEN]; // aux string for drawRoad()&lt;br /&gt;
int road_index;&lt;br /&gt;
int car_pos;&lt;br /&gt;
// Off-the-grid position means empty column, so MAXROADPOS&lt;br /&gt;
// determines the probability of a car in a column&lt;br /&gt;
// e.g. 3*NCARPOSITIONS gives p=1/3&lt;br /&gt;
const int MAXROADPOS = 3*NCARPOSITIONS;&lt;br /&gt;
int step_duration;&lt;br /&gt;
&lt;br /&gt;
int crash; // true if crashed&lt;br /&gt;
unsigned int crashtime; // millis() when crashed&lt;br /&gt;
const int CRASHSOUNDDURATION = 250;&lt;br /&gt;
&lt;br /&gt;
const char *INTRO1=&amp;quot;Trucks ahead,&amp;quot;;&lt;br /&gt;
const char *INTRO2=&amp;quot;Drive carefully&amp;quot;;&lt;br /&gt;
const int INTRODELAY = 2000;&lt;br /&gt;
&lt;br /&gt;
void setup()&lt;br /&gt;
{&lt;br /&gt;
  crash = crashtime = road_index = 0;&lt;br /&gt;
  step_duration = MAXSTEPDURATION;&lt;br /&gt;
  line_buff[1+ROADLEN] = &#039;\0&#039;; // null terminate it&lt;br /&gt;
  randomSeed(analogRead(RANDSEEDPIN));&lt;br /&gt;
  for (int i=0; i&amp;lt;NGLYPHS; i++) {&lt;br /&gt;
    lcd.createChar(i+1,glyphs[i]);&lt;br /&gt;
  }&lt;br /&gt;
  for (int i=0; i&amp;lt;ROADLEN; i++) {&lt;br /&gt;
    road[i]=-1;&lt;br /&gt;
  }&lt;br /&gt;
  pinMode(SPEAKERPIN,OUTPUT);&lt;br /&gt;
  analogWrite(SPEAKERPIN,0); // to be on the safe side&lt;br /&gt;
  lcd.begin(16,2);&lt;br /&gt;
  getSteeringWheel();&lt;br /&gt;
  drawRoad();&lt;br /&gt;
  lcd.setCursor(1,0);&lt;br /&gt;
  lcd.print(INTRO1);&lt;br /&gt;
  lcd.setCursor(1,1);&lt;br /&gt;
  lcd.print(INTRO2);&lt;br /&gt;
  delay(INTRODELAY);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void loop() {&lt;br /&gt;
  unsigned long now = millis()-INTRODELAY;&lt;br /&gt;
  if (!crash) {&lt;br /&gt;
    getSteeringWheel();&lt;br /&gt;
    crash = (car_pos==road[road_index]);&lt;br /&gt;
  }&lt;br /&gt;
  if (crash) {&lt;br /&gt;
    if (!crashtime) {&lt;br /&gt;
      crashtime=now;&lt;br /&gt;
      drawRoad();&lt;br /&gt;
      // Game over text&lt;br /&gt;
      // (keep first 2 &amp;quot;crash&amp;quot; columns intact)&lt;br /&gt;
      lcd.setCursor(2,0);&lt;br /&gt;
      lcd.print(&amp;quot;Crashed after&amp;quot;);&lt;br /&gt;
      lcd.setCursor(2,1);&lt;br /&gt;
      lcd.print(now/1000);&lt;br /&gt;
      lcd.print(&amp;quot; seconds.&amp;quot;);&lt;br /&gt;
    }&lt;br /&gt;
    if ((now-crashtime)&amp;lt;CRASHSOUNDDURATION) {&lt;br /&gt;
      analogWrite(SPEAKERPIN,random(255)); // white noise&lt;br /&gt;
    } &lt;br /&gt;
    else {&lt;br /&gt;
      analogWrite(SPEAKERPIN,0); // dramatic post-crush silence :)   &lt;br /&gt;
    }&lt;br /&gt;
    delay(10); // Wait a bit between writes&lt;br /&gt;
  } &lt;br /&gt;
  else {&lt;br /&gt;
&lt;br /&gt;
    int prev_pos = road[(road_index-1)%ROADLEN];&lt;br /&gt;
    int this_pos = random(MAXROADPOS);&lt;br /&gt;
    while (abs(this_pos-prev_pos)&amp;lt;2) { // don&#039;t jam the road&lt;br /&gt;
      this_pos = random(MAXROADPOS);&lt;br /&gt;
    }&lt;br /&gt;
    road[road_index] = this_pos;&lt;br /&gt;
    road_index = (road_index+1)%ROADLEN;&lt;br /&gt;
    drawRoad();&lt;br /&gt;
    delay(step_duration);&lt;br /&gt;
    if (step_duration&amp;gt;MINSTEPDURATION) {&lt;br /&gt;
      step_duration--; // go faster&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
void getSteeringWheel() {&lt;br /&gt;
  car_pos = map(analogRead(POTPIN),0,1024,0,NCARPOSITIONS);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void drawRoad() {&lt;br /&gt;
  for (int i=0; i&amp;lt;2; i++) {&lt;br /&gt;
    if (crash) {&lt;br /&gt;
      line_buff[0]=crash2glyphs[car_pos][i];&lt;br /&gt;
    } &lt;br /&gt;
    else {&lt;br /&gt;
      line_buff[0]=car2glyphs[car_pos][i];&lt;br /&gt;
    }&lt;br /&gt;
    for (int j=0; j&amp;lt;ROADLEN; j++) {&lt;br /&gt;
      int pos = road[(j+road_index)%ROADLEN];&lt;br /&gt;
      line_buff[j+1] = pos&amp;gt;=0 &amp;amp;&amp;amp; pos&amp;lt;NCARPOSITIONS ? truck2glyphs[pos][i] : BLANK;&lt;br /&gt;
    }&lt;br /&gt;
    lcd.setCursor(0,i);&lt;br /&gt;
    lcd.print(line_buff);&lt;br /&gt;
  }&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Ckharnett</name></author>
	</entry>
	<entry>
		<id>http://wiki.lvl1.org/index.php?title=Freeduino_Games&amp;diff=3799</id>
		<title>Freeduino Games</title>
		<link rel="alternate" type="text/html" href="http://wiki.lvl1.org/index.php?title=Freeduino_Games&amp;diff=3799"/>
		<updated>2012-03-08T16:31:51Z</updated>

		<summary type="html">&lt;p&gt;Ckharnett: /* Freeduino Truck Lane */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Freeduino Truck Lane==&lt;br /&gt;
Go from the Freeduino Spring Training LCD activity to a game!&lt;br /&gt;
&lt;br /&gt;
Need a Freeduino, a 10K pot, and a 16x2 LCD and a solderless breadboard.&lt;br /&gt;
Follow all steps in [[4th Inning]].&lt;br /&gt;
Now, pull the middle pot pin out of pin 14 of the LCD. Just connect pin 14 to ground. This should give you a high contrast display. We need to use the pot for steering!&lt;br /&gt;
Connect the middle pot pin instead to Analog Input pin 1 of your Freeduino.&lt;br /&gt;
Add a speaker on pin 13 if you wish--untested.&lt;br /&gt;
&lt;br /&gt;
Here&#039;s the code, cut and paste this into Arduino and install it to your board. Play away. To play again, press the Freeduino&#039;s reset button.&lt;br /&gt;
&lt;br /&gt;
Much more including videos at the game&#039;s original site [http://www.instructables.com/id/Truck-Lane-a-16x2-LCD-Arduino-game/].&lt;br /&gt;
We&#039;ve changed the pinouts in the code to match what we did in the Freeduino Spring Training LCD activity.&lt;br /&gt;
&lt;br /&gt;
Can you modify the code to make a game that rewards crashing? For example, scoot around catching falling &amp;quot;coins,&amp;quot; and see how many you can collect within a certain time. Then, make them fall faster and faster! This would be a fun way to learn more about what the code is doing.&lt;br /&gt;
&lt;br /&gt;
==Freeduino Whack-A-Mole==&lt;br /&gt;
Coming soon, Freeduino Whack-A-Mole! We need 5-way joysticks for this one. It will introduce the Arduino Serial Monitor.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;/* Simple Car game for a 16x2 LCD display &lt;br /&gt;
   You can use any Hitachi HD44780 compatible LCD.&lt;br /&gt;
   Modified for LVL1 Spring Training LCD Activity, originally from &lt;br /&gt;
    @TheRealDod, Nov 25, 2010&lt;br /&gt;
   There&#039;s a &amp;quot;steering wheel&amp;quot; potentiometer on analog input 1,&lt;br /&gt;
   and a Piezo speaker on pin 13 (PWM).&lt;br /&gt;
   &lt;br /&gt;
   Enjoy,&lt;br /&gt;
&lt;br /&gt;
*/&lt;br /&gt;
#include &amp;lt;LiquidCrystal.h&amp;gt;&lt;br /&gt;
// LiquidCrystal display&lt;br /&gt;
// You can use any Hitachi HD44780 compatible. Wiring explained at&lt;br /&gt;
// http://www.arduino.cc/en/Tutorial/LiquidCrystal&lt;br /&gt;
LiquidCrystal lcd(7, 8, 9, 10, 11, 12);&lt;br /&gt;
&lt;br /&gt;
// Steering wheel potentiometer&lt;br /&gt;
const int POTPIN = 1;&lt;br /&gt;
const int MAXPOT = 800; // no need to turn the wheel all the way to 1023 :)&lt;br /&gt;
&lt;br /&gt;
// Piezo speaker&lt;br /&gt;
const int SPEAKERPIN = 13;//you can see the led flash when u crash&lt;br /&gt;
&lt;br /&gt;
const int RANDSEEDPIN = 0; // an analog pin that isn&#039;t connected to anything&lt;br /&gt;
&lt;br /&gt;
const int MAXSTEPDURATION = 300; // Start slowly, each step is 1 millisec shorter.&lt;br /&gt;
const int MINSTEPDURATION = 150; // This is as fast as it gets&lt;br /&gt;
&lt;br /&gt;
const int NGLYPHS = 6;&lt;br /&gt;
// the glyphs will be defined starting from 1 (not 0),&lt;br /&gt;
// to enable lcd.print() of null-terminated strings&lt;br /&gt;
byte glyphs[NGLYPHS][8] = {&lt;br /&gt;
  // 1: car up&lt;br /&gt;
  { B00000,&lt;br /&gt;
    B01110,&lt;br /&gt;
    B11111,&lt;br /&gt;
    B01010,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B00000}&lt;br /&gt;
  // 2: car down&lt;br /&gt;
  ,{B00000,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B01110,&lt;br /&gt;
    B11111,&lt;br /&gt;
    B01010,&lt;br /&gt;
    B00000}&lt;br /&gt;
  // 3: truck up&lt;br /&gt;
  ,{B00000,&lt;br /&gt;
    B11110,&lt;br /&gt;
    B11111,&lt;br /&gt;
    B01010,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B00000}&lt;br /&gt;
  // 4: truck down&lt;br /&gt;
  ,{B00000,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B11110,&lt;br /&gt;
    B11111,&lt;br /&gt;
    B01010,&lt;br /&gt;
    B00000}&lt;br /&gt;
  // 5: crash up&lt;br /&gt;
  ,{B10101,&lt;br /&gt;
    B01110,&lt;br /&gt;
    B01110,&lt;br /&gt;
    B10101,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B00000}&lt;br /&gt;
  // 6: crash down&lt;br /&gt;
  ,{B00000,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B10101,&lt;br /&gt;
    B01110,&lt;br /&gt;
    B01110,&lt;br /&gt;
    B10101,&lt;br /&gt;
    B00000}&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
const int NCARPOSITIONS = 4;&lt;br /&gt;
&lt;br /&gt;
// Each position is mapped to a column of 2 glyphs&lt;br /&gt;
// Used to make sense when I had a 5th position&lt;br /&gt;
// where car or crash was drawn as 2 glyphs&lt;br /&gt;
// (can&#039;t do that since 0 terminates strings),&lt;br /&gt;
// so it&#039;s kinda silly now, but it ain&#039;t broke :)&lt;br /&gt;
const char BLANK=32;&lt;br /&gt;
char car2glyphs[NCARPOSITIONS][2] = {&lt;br /&gt;
  {1,BLANK},{2,BLANK},{BLANK,1},{BLANK,2}&lt;br /&gt;
};&lt;br /&gt;
char truck2glyphs[NCARPOSITIONS][2] = {&lt;br /&gt;
  {3,BLANK},{4,BLANK},{BLANK,3},{BLANK,4}&lt;br /&gt;
};&lt;br /&gt;
char crash2glyphs[NCARPOSITIONS][2] = {&lt;br /&gt;
  {5,BLANK},{6,BLANK},{BLANK,5},{BLANK,6}&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
const int ROADLEN = 15; // LCD width (not counting our car)&lt;br /&gt;
int road[ROADLEN]; // positions of other cars&lt;br /&gt;
char line_buff[2+ROADLEN]; // aux string for drawRoad()&lt;br /&gt;
int road_index;&lt;br /&gt;
int car_pos;&lt;br /&gt;
// Off-the-grid position means empty column, so MAXROADPOS&lt;br /&gt;
// determines the probability of a car in a column&lt;br /&gt;
// e.g. 3*NCARPOSITIONS gives p=1/3&lt;br /&gt;
const int MAXROADPOS = 3*NCARPOSITIONS;&lt;br /&gt;
int step_duration;&lt;br /&gt;
&lt;br /&gt;
int crash; // true if crashed&lt;br /&gt;
unsigned int crashtime; // millis() when crashed&lt;br /&gt;
const int CRASHSOUNDDURATION = 250;&lt;br /&gt;
&lt;br /&gt;
const char *INTRO1=&amp;quot;Trucks ahead,&amp;quot;;&lt;br /&gt;
const char *INTRO2=&amp;quot;Drive carefully&amp;quot;;&lt;br /&gt;
const int INTRODELAY = 2000;&lt;br /&gt;
&lt;br /&gt;
void setup()&lt;br /&gt;
{&lt;br /&gt;
  crash = crashtime = road_index = 0;&lt;br /&gt;
  step_duration = MAXSTEPDURATION;&lt;br /&gt;
  line_buff[1+ROADLEN] = &#039;\0&#039;; // null terminate it&lt;br /&gt;
  randomSeed(analogRead(RANDSEEDPIN));&lt;br /&gt;
  for (int i=0; i&amp;lt;NGLYPHS; i++) {&lt;br /&gt;
    lcd.createChar(i+1,glyphs[i]);&lt;br /&gt;
  }&lt;br /&gt;
  for (int i=0; i&amp;lt;ROADLEN; i++) {&lt;br /&gt;
    road[i]=-1;&lt;br /&gt;
  }&lt;br /&gt;
  pinMode(SPEAKERPIN,OUTPUT);&lt;br /&gt;
  analogWrite(SPEAKERPIN,0); // to be on the safe side&lt;br /&gt;
  lcd.begin(16,2);&lt;br /&gt;
  getSteeringWheel();&lt;br /&gt;
  drawRoad();&lt;br /&gt;
  lcd.setCursor(1,0);&lt;br /&gt;
  lcd.print(INTRO1);&lt;br /&gt;
  lcd.setCursor(1,1);&lt;br /&gt;
  lcd.print(INTRO2);&lt;br /&gt;
  delay(INTRODELAY);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void loop() {&lt;br /&gt;
  unsigned long now = millis()-INTRODELAY;&lt;br /&gt;
  if (!crash) {&lt;br /&gt;
    getSteeringWheel();&lt;br /&gt;
    crash = (car_pos==road[road_index]);&lt;br /&gt;
  }&lt;br /&gt;
  if (crash) {&lt;br /&gt;
    if (!crashtime) {&lt;br /&gt;
      crashtime=now;&lt;br /&gt;
      drawRoad();&lt;br /&gt;
      // Game over text&lt;br /&gt;
      // (keep first 2 &amp;quot;crash&amp;quot; columns intact)&lt;br /&gt;
      lcd.setCursor(2,0);&lt;br /&gt;
      lcd.print(&amp;quot;Crashed after&amp;quot;);&lt;br /&gt;
      lcd.setCursor(2,1);&lt;br /&gt;
      lcd.print(now/1000);&lt;br /&gt;
      lcd.print(&amp;quot; seconds.&amp;quot;);&lt;br /&gt;
    }&lt;br /&gt;
    if ((now-crashtime)&amp;lt;CRASHSOUNDDURATION) {&lt;br /&gt;
      analogWrite(SPEAKERPIN,random(255)); // white noise&lt;br /&gt;
    } &lt;br /&gt;
    else {&lt;br /&gt;
      analogWrite(SPEAKERPIN,0); // dramatic post-crush silence :)   &lt;br /&gt;
    }&lt;br /&gt;
    delay(10); // Wait a bit between writes&lt;br /&gt;
  } &lt;br /&gt;
  else {&lt;br /&gt;
&lt;br /&gt;
    int prev_pos = road[(road_index-1)%ROADLEN];&lt;br /&gt;
    int this_pos = random(MAXROADPOS);&lt;br /&gt;
    while (abs(this_pos-prev_pos)&amp;lt;2) { // don&#039;t jam the road&lt;br /&gt;
      this_pos = random(MAXROADPOS);&lt;br /&gt;
    }&lt;br /&gt;
    road[road_index] = this_pos;&lt;br /&gt;
    road_index = (road_index+1)%ROADLEN;&lt;br /&gt;
    drawRoad();&lt;br /&gt;
    delay(step_duration);&lt;br /&gt;
    if (step_duration&amp;gt;MINSTEPDURATION) {&lt;br /&gt;
      step_duration--; // go faster&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
void getSteeringWheel() {&lt;br /&gt;
  car_pos = map(analogRead(POTPIN),0,1024,0,NCARPOSITIONS);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void drawRoad() {&lt;br /&gt;
  for (int i=0; i&amp;lt;2; i++) {&lt;br /&gt;
    if (crash) {&lt;br /&gt;
      line_buff[0]=crash2glyphs[car_pos][i];&lt;br /&gt;
    } &lt;br /&gt;
    else {&lt;br /&gt;
      line_buff[0]=car2glyphs[car_pos][i];&lt;br /&gt;
    }&lt;br /&gt;
    for (int j=0; j&amp;lt;ROADLEN; j++) {&lt;br /&gt;
      int pos = road[(j+road_index)%ROADLEN];&lt;br /&gt;
      line_buff[j+1] = pos&amp;gt;=0 &amp;amp;&amp;amp; pos&amp;lt;NCARPOSITIONS ? truck2glyphs[pos][i] : BLANK;&lt;br /&gt;
    }&lt;br /&gt;
    lcd.setCursor(0,i);&lt;br /&gt;
    lcd.print(line_buff);&lt;br /&gt;
  }&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Ckharnett</name></author>
	</entry>
	<entry>
		<id>http://wiki.lvl1.org/index.php?title=Freeduino_Games&amp;diff=3796</id>
		<title>Freeduino Games</title>
		<link rel="alternate" type="text/html" href="http://wiki.lvl1.org/index.php?title=Freeduino_Games&amp;diff=3796"/>
		<updated>2012-03-08T16:28:14Z</updated>

		<summary type="html">&lt;p&gt;Ckharnett: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Freeduino Truck Lane==&lt;br /&gt;
Go from the Freeduino Spring Training LCD activity to a game!&lt;br /&gt;
Need a Freeduino, a 10K pot, and a 16x2 LCD and a solderless breadboard.&lt;br /&gt;
Follow all steps in [[4th Inning]].&lt;br /&gt;
Now, pull the middle pot pin out of pin 14 of the LCD. Just connect pin 14 to ground. This should give you a high contrast display. We need to use the pot for steering!&lt;br /&gt;
Connect the middle pot pin instead to Analog Input pin 1 of your Freeduino.&lt;br /&gt;
Add a speaker on pin 13 if you wish--untested.&lt;br /&gt;
&lt;br /&gt;
Here&#039;s the code, cut and paste this into Arduino and install it to your board. Play away. To play again, press the Freeduino&#039;s reset button.&lt;br /&gt;
&lt;br /&gt;
It comes from [http://www.instructables.com/id/Truck-Lane-a-16x2-LCD-Arduino-game/]&lt;br /&gt;
but we&#039;ve changed the pinouts in the code to match what we did in the Freeduino Spring Training LCD activity.&lt;br /&gt;
&lt;br /&gt;
Can you modify the code to make a game that rewards crashing? For example, scoot around catching falling &amp;quot;coins,&amp;quot; and see how many you can collect within a certain time. Then, make them fall faster and faster! This would be a fun way to learn more about what the code is doing.&lt;br /&gt;
&lt;br /&gt;
Coming soon, Freeduino Whack-A-Mole!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;/* Simple Car game for a 16x2 LCD display &lt;br /&gt;
   You can use any Hitachi HD44780 compatible LCD.&lt;br /&gt;
   Modified for LVL1 Spring Training LCD Activity, originally from &lt;br /&gt;
    @TheRealDod, Nov 25, 2010&lt;br /&gt;
   There&#039;s a &amp;quot;steering wheel&amp;quot; potentiometer on analog input 1,&lt;br /&gt;
   and a Piezo speaker on pin 13 (PWM).&lt;br /&gt;
   &lt;br /&gt;
   Enjoy,&lt;br /&gt;
&lt;br /&gt;
*/&lt;br /&gt;
#include &amp;lt;LiquidCrystal.h&amp;gt;&lt;br /&gt;
// LiquidCrystal display&lt;br /&gt;
// You can use any Hitachi HD44780 compatible. Wiring explained at&lt;br /&gt;
// http://www.arduino.cc/en/Tutorial/LiquidCrystal&lt;br /&gt;
LiquidCrystal lcd(7, 8, 9, 10, 11, 12);&lt;br /&gt;
&lt;br /&gt;
// Steering wheel potentiometer&lt;br /&gt;
const int POTPIN = 1;&lt;br /&gt;
const int MAXPOT = 800; // no need to turn the wheel all the way to 1023 :)&lt;br /&gt;
&lt;br /&gt;
// Piezo speaker&lt;br /&gt;
const int SPEAKERPIN = 13;//you can see the led flash when u crash&lt;br /&gt;
&lt;br /&gt;
const int RANDSEEDPIN = 0; // an analog pin that isn&#039;t connected to anything&lt;br /&gt;
&lt;br /&gt;
const int MAXSTEPDURATION = 300; // Start slowly, each step is 1 millisec shorter.&lt;br /&gt;
const int MINSTEPDURATION = 150; // This is as fast as it gets&lt;br /&gt;
&lt;br /&gt;
const int NGLYPHS = 6;&lt;br /&gt;
// the glyphs will be defined starting from 1 (not 0),&lt;br /&gt;
// to enable lcd.print() of null-terminated strings&lt;br /&gt;
byte glyphs[NGLYPHS][8] = {&lt;br /&gt;
  // 1: car up&lt;br /&gt;
  { B00000,&lt;br /&gt;
    B01110,&lt;br /&gt;
    B11111,&lt;br /&gt;
    B01010,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B00000}&lt;br /&gt;
  // 2: car down&lt;br /&gt;
  ,{B00000,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B01110,&lt;br /&gt;
    B11111,&lt;br /&gt;
    B01010,&lt;br /&gt;
    B00000}&lt;br /&gt;
  // 3: truck up&lt;br /&gt;
  ,{B00000,&lt;br /&gt;
    B11110,&lt;br /&gt;
    B11111,&lt;br /&gt;
    B01010,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B00000}&lt;br /&gt;
  // 4: truck down&lt;br /&gt;
  ,{B00000,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B11110,&lt;br /&gt;
    B11111,&lt;br /&gt;
    B01010,&lt;br /&gt;
    B00000}&lt;br /&gt;
  // 5: crash up&lt;br /&gt;
  ,{B10101,&lt;br /&gt;
    B01110,&lt;br /&gt;
    B01110,&lt;br /&gt;
    B10101,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B00000}&lt;br /&gt;
  // 6: crash down&lt;br /&gt;
  ,{B00000,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B10101,&lt;br /&gt;
    B01110,&lt;br /&gt;
    B01110,&lt;br /&gt;
    B10101,&lt;br /&gt;
    B00000}&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
const int NCARPOSITIONS = 4;&lt;br /&gt;
&lt;br /&gt;
// Each position is mapped to a column of 2 glyphs&lt;br /&gt;
// Used to make sense when I had a 5th position&lt;br /&gt;
// where car or crash was drawn as 2 glyphs&lt;br /&gt;
// (can&#039;t do that since 0 terminates strings),&lt;br /&gt;
// so it&#039;s kinda silly now, but it ain&#039;t broke :)&lt;br /&gt;
const char BLANK=32;&lt;br /&gt;
char car2glyphs[NCARPOSITIONS][2] = {&lt;br /&gt;
  {1,BLANK},{2,BLANK},{BLANK,1},{BLANK,2}&lt;br /&gt;
};&lt;br /&gt;
char truck2glyphs[NCARPOSITIONS][2] = {&lt;br /&gt;
  {3,BLANK},{4,BLANK},{BLANK,3},{BLANK,4}&lt;br /&gt;
};&lt;br /&gt;
char crash2glyphs[NCARPOSITIONS][2] = {&lt;br /&gt;
  {5,BLANK},{6,BLANK},{BLANK,5},{BLANK,6}&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
const int ROADLEN = 15; // LCD width (not counting our car)&lt;br /&gt;
int road[ROADLEN]; // positions of other cars&lt;br /&gt;
char line_buff[2+ROADLEN]; // aux string for drawRoad()&lt;br /&gt;
int road_index;&lt;br /&gt;
int car_pos;&lt;br /&gt;
// Off-the-grid position means empty column, so MAXROADPOS&lt;br /&gt;
// determines the probability of a car in a column&lt;br /&gt;
// e.g. 3*NCARPOSITIONS gives p=1/3&lt;br /&gt;
const int MAXROADPOS = 3*NCARPOSITIONS;&lt;br /&gt;
int step_duration;&lt;br /&gt;
&lt;br /&gt;
int crash; // true if crashed&lt;br /&gt;
unsigned int crashtime; // millis() when crashed&lt;br /&gt;
const int CRASHSOUNDDURATION = 250;&lt;br /&gt;
&lt;br /&gt;
const char *INTRO1=&amp;quot;Trucks ahead,&amp;quot;;&lt;br /&gt;
const char *INTRO2=&amp;quot;Drive carefully&amp;quot;;&lt;br /&gt;
const int INTRODELAY = 2000;&lt;br /&gt;
&lt;br /&gt;
void setup()&lt;br /&gt;
{&lt;br /&gt;
  crash = crashtime = road_index = 0;&lt;br /&gt;
  step_duration = MAXSTEPDURATION;&lt;br /&gt;
  line_buff[1+ROADLEN] = &#039;\0&#039;; // null terminate it&lt;br /&gt;
  randomSeed(analogRead(RANDSEEDPIN));&lt;br /&gt;
  for (int i=0; i&amp;lt;NGLYPHS; i++) {&lt;br /&gt;
    lcd.createChar(i+1,glyphs[i]);&lt;br /&gt;
  }&lt;br /&gt;
  for (int i=0; i&amp;lt;ROADLEN; i++) {&lt;br /&gt;
    road[i]=-1;&lt;br /&gt;
  }&lt;br /&gt;
  pinMode(SPEAKERPIN,OUTPUT);&lt;br /&gt;
  analogWrite(SPEAKERPIN,0); // to be on the safe side&lt;br /&gt;
  lcd.begin(16,2);&lt;br /&gt;
  getSteeringWheel();&lt;br /&gt;
  drawRoad();&lt;br /&gt;
  lcd.setCursor(1,0);&lt;br /&gt;
  lcd.print(INTRO1);&lt;br /&gt;
  lcd.setCursor(1,1);&lt;br /&gt;
  lcd.print(INTRO2);&lt;br /&gt;
  delay(INTRODELAY);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void loop() {&lt;br /&gt;
  unsigned long now = millis()-INTRODELAY;&lt;br /&gt;
  if (!crash) {&lt;br /&gt;
    getSteeringWheel();&lt;br /&gt;
    crash = (car_pos==road[road_index]);&lt;br /&gt;
  }&lt;br /&gt;
  if (crash) {&lt;br /&gt;
    if (!crashtime) {&lt;br /&gt;
      crashtime=now;&lt;br /&gt;
      drawRoad();&lt;br /&gt;
      // Game over text&lt;br /&gt;
      // (keep first 2 &amp;quot;crash&amp;quot; columns intact)&lt;br /&gt;
      lcd.setCursor(2,0);&lt;br /&gt;
      lcd.print(&amp;quot;Crashed after&amp;quot;);&lt;br /&gt;
      lcd.setCursor(2,1);&lt;br /&gt;
      lcd.print(now/1000);&lt;br /&gt;
      lcd.print(&amp;quot; seconds.&amp;quot;);&lt;br /&gt;
    }&lt;br /&gt;
    if ((now-crashtime)&amp;lt;CRASHSOUNDDURATION) {&lt;br /&gt;
      analogWrite(SPEAKERPIN,random(255)); // white noise&lt;br /&gt;
    } &lt;br /&gt;
    else {&lt;br /&gt;
      analogWrite(SPEAKERPIN,0); // dramatic post-crush silence :)   &lt;br /&gt;
    }&lt;br /&gt;
    delay(10); // Wait a bit between writes&lt;br /&gt;
  } &lt;br /&gt;
  else {&lt;br /&gt;
&lt;br /&gt;
    int prev_pos = road[(road_index-1)%ROADLEN];&lt;br /&gt;
    int this_pos = random(MAXROADPOS);&lt;br /&gt;
    while (abs(this_pos-prev_pos)&amp;lt;2) { // don&#039;t jam the road&lt;br /&gt;
      this_pos = random(MAXROADPOS);&lt;br /&gt;
    }&lt;br /&gt;
    road[road_index] = this_pos;&lt;br /&gt;
    road_index = (road_index+1)%ROADLEN;&lt;br /&gt;
    drawRoad();&lt;br /&gt;
    delay(step_duration);&lt;br /&gt;
    if (step_duration&amp;gt;MINSTEPDURATION) {&lt;br /&gt;
      step_duration--; // go faster&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
void getSteeringWheel() {&lt;br /&gt;
  car_pos = map(analogRead(POTPIN),0,1024,0,NCARPOSITIONS);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void drawRoad() {&lt;br /&gt;
  for (int i=0; i&amp;lt;2; i++) {&lt;br /&gt;
    if (crash) {&lt;br /&gt;
      line_buff[0]=crash2glyphs[car_pos][i];&lt;br /&gt;
    } &lt;br /&gt;
    else {&lt;br /&gt;
      line_buff[0]=car2glyphs[car_pos][i];&lt;br /&gt;
    }&lt;br /&gt;
    for (int j=0; j&amp;lt;ROADLEN; j++) {&lt;br /&gt;
      int pos = road[(j+road_index)%ROADLEN];&lt;br /&gt;
      line_buff[j+1] = pos&amp;gt;=0 &amp;amp;&amp;amp; pos&amp;lt;NCARPOSITIONS ? truck2glyphs[pos][i] : BLANK;&lt;br /&gt;
    }&lt;br /&gt;
    lcd.setCursor(0,i);&lt;br /&gt;
    lcd.print(line_buff);&lt;br /&gt;
  }&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Ckharnett</name></author>
	</entry>
	<entry>
		<id>http://wiki.lvl1.org/index.php?title=Freeduino_Games&amp;diff=3795</id>
		<title>Freeduino Games</title>
		<link rel="alternate" type="text/html" href="http://wiki.lvl1.org/index.php?title=Freeduino_Games&amp;diff=3795"/>
		<updated>2012-03-08T16:27:27Z</updated>

		<summary type="html">&lt;p&gt;Ckharnett: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Freeduino Truck Lane&lt;br /&gt;
Go from the Freeduino Spring Training LCD activity to a game!&lt;br /&gt;
Need a Freeduino, a 10K pot, and a 16x2 LCD and a solderless breadboard.&lt;br /&gt;
Follow all steps in [[4th Inning]].&lt;br /&gt;
Now, pull the middle pot pin out of pin 14 of the LCD. Just connect pin 14 to ground. This should give you a high contrast display. We need to use the pot for steering!&lt;br /&gt;
Connect the middle pot pin instead to Analog Input pin 1 of your Freeduino.&lt;br /&gt;
Add a speaker on pin 13 if you wish--untested.&lt;br /&gt;
&lt;br /&gt;
Here&#039;s the code, cut and paste this into Arduino and install it to your board. Play away. To play again, press the Freeduino&#039;s reset button.&lt;br /&gt;
&lt;br /&gt;
It comes from [http://www.instructables.com/id/Truck-Lane-a-16x2-LCD-Arduino-game/]&lt;br /&gt;
but we&#039;ve changed the pinouts in the code to match what we did in the Freeduino Spring Training LCD activity.&lt;br /&gt;
&lt;br /&gt;
Can you modify the code to make a game that rewards crashing? For example, scoot around catching falling &amp;quot;coins,&amp;quot; and see how many you can collect within a certain time. Then, make them fall faster and faster! This would be a fun way to learn more about what the code is doing.&lt;br /&gt;
&lt;br /&gt;
Coming soon, Freeduino Whack-A-Mole!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;/* Simple Car game for a 16x2 LCD display &lt;br /&gt;
   You can use any Hitachi HD44780 compatible LCD.&lt;br /&gt;
   Modified for LVL1 Spring Training LCD Activity, originally from &lt;br /&gt;
    @TheRealDod, Nov 25, 2010&lt;br /&gt;
   There&#039;s a &amp;quot;steering wheel&amp;quot; potentiometer on analog input 1,&lt;br /&gt;
   and a Piezo speaker on pin 13 (PWM).&lt;br /&gt;
   &lt;br /&gt;
   Enjoy,&lt;br /&gt;
&lt;br /&gt;
*/&lt;br /&gt;
#include &amp;lt;LiquidCrystal.h&amp;gt;&lt;br /&gt;
// LiquidCrystal display&lt;br /&gt;
// You can use any Hitachi HD44780 compatible. Wiring explained at&lt;br /&gt;
// http://www.arduino.cc/en/Tutorial/LiquidCrystal&lt;br /&gt;
LiquidCrystal lcd(7, 8, 9, 10, 11, 12);&lt;br /&gt;
&lt;br /&gt;
// Steering wheel potentiometer&lt;br /&gt;
const int POTPIN = 1;&lt;br /&gt;
const int MAXPOT = 800; // no need to turn the wheel all the way to 1023 :)&lt;br /&gt;
&lt;br /&gt;
// Piezo speaker&lt;br /&gt;
const int SPEAKERPIN = 13;//you can see the led flash when u crash&lt;br /&gt;
&lt;br /&gt;
const int RANDSEEDPIN = 0; // an analog pin that isn&#039;t connected to anything&lt;br /&gt;
&lt;br /&gt;
const int MAXSTEPDURATION = 300; // Start slowly, each step is 1 millisec shorter.&lt;br /&gt;
const int MINSTEPDURATION = 150; // This is as fast as it gets&lt;br /&gt;
&lt;br /&gt;
const int NGLYPHS = 6;&lt;br /&gt;
// the glyphs will be defined starting from 1 (not 0),&lt;br /&gt;
// to enable lcd.print() of null-terminated strings&lt;br /&gt;
byte glyphs[NGLYPHS][8] = {&lt;br /&gt;
  // 1: car up&lt;br /&gt;
  { B00000,&lt;br /&gt;
    B01110,&lt;br /&gt;
    B11111,&lt;br /&gt;
    B01010,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B00000}&lt;br /&gt;
  // 2: car down&lt;br /&gt;
  ,{B00000,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B01110,&lt;br /&gt;
    B11111,&lt;br /&gt;
    B01010,&lt;br /&gt;
    B00000}&lt;br /&gt;
  // 3: truck up&lt;br /&gt;
  ,{B00000,&lt;br /&gt;
    B11110,&lt;br /&gt;
    B11111,&lt;br /&gt;
    B01010,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B00000}&lt;br /&gt;
  // 4: truck down&lt;br /&gt;
  ,{B00000,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B11110,&lt;br /&gt;
    B11111,&lt;br /&gt;
    B01010,&lt;br /&gt;
    B00000}&lt;br /&gt;
  // 5: crash up&lt;br /&gt;
  ,{B10101,&lt;br /&gt;
    B01110,&lt;br /&gt;
    B01110,&lt;br /&gt;
    B10101,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B00000}&lt;br /&gt;
  // 6: crash down&lt;br /&gt;
  ,{B00000,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B10101,&lt;br /&gt;
    B01110,&lt;br /&gt;
    B01110,&lt;br /&gt;
    B10101,&lt;br /&gt;
    B00000}&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
const int NCARPOSITIONS = 4;&lt;br /&gt;
&lt;br /&gt;
// Each position is mapped to a column of 2 glyphs&lt;br /&gt;
// Used to make sense when I had a 5th position&lt;br /&gt;
// where car or crash was drawn as 2 glyphs&lt;br /&gt;
// (can&#039;t do that since 0 terminates strings),&lt;br /&gt;
// so it&#039;s kinda silly now, but it ain&#039;t broke :)&lt;br /&gt;
const char BLANK=32;&lt;br /&gt;
char car2glyphs[NCARPOSITIONS][2] = {&lt;br /&gt;
  {1,BLANK},{2,BLANK},{BLANK,1},{BLANK,2}&lt;br /&gt;
};&lt;br /&gt;
char truck2glyphs[NCARPOSITIONS][2] = {&lt;br /&gt;
  {3,BLANK},{4,BLANK},{BLANK,3},{BLANK,4}&lt;br /&gt;
};&lt;br /&gt;
char crash2glyphs[NCARPOSITIONS][2] = {&lt;br /&gt;
  {5,BLANK},{6,BLANK},{BLANK,5},{BLANK,6}&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
const int ROADLEN = 15; // LCD width (not counting our car)&lt;br /&gt;
int road[ROADLEN]; // positions of other cars&lt;br /&gt;
char line_buff[2+ROADLEN]; // aux string for drawRoad()&lt;br /&gt;
int road_index;&lt;br /&gt;
int car_pos;&lt;br /&gt;
// Off-the-grid position means empty column, so MAXROADPOS&lt;br /&gt;
// determines the probability of a car in a column&lt;br /&gt;
// e.g. 3*NCARPOSITIONS gives p=1/3&lt;br /&gt;
const int MAXROADPOS = 3*NCARPOSITIONS;&lt;br /&gt;
int step_duration;&lt;br /&gt;
&lt;br /&gt;
int crash; // true if crashed&lt;br /&gt;
unsigned int crashtime; // millis() when crashed&lt;br /&gt;
const int CRASHSOUNDDURATION = 250;&lt;br /&gt;
&lt;br /&gt;
const char *INTRO1=&amp;quot;Trucks ahead,&amp;quot;;&lt;br /&gt;
const char *INTRO2=&amp;quot;Drive carefully&amp;quot;;&lt;br /&gt;
const int INTRODELAY = 2000;&lt;br /&gt;
&lt;br /&gt;
void setup()&lt;br /&gt;
{&lt;br /&gt;
  crash = crashtime = road_index = 0;&lt;br /&gt;
  step_duration = MAXSTEPDURATION;&lt;br /&gt;
  line_buff[1+ROADLEN] = &#039;\0&#039;; // null terminate it&lt;br /&gt;
  randomSeed(analogRead(RANDSEEDPIN));&lt;br /&gt;
  for (int i=0; i&amp;lt;NGLYPHS; i++) {&lt;br /&gt;
    lcd.createChar(i+1,glyphs[i]);&lt;br /&gt;
  }&lt;br /&gt;
  for (int i=0; i&amp;lt;ROADLEN; i++) {&lt;br /&gt;
    road[i]=-1;&lt;br /&gt;
  }&lt;br /&gt;
  pinMode(SPEAKERPIN,OUTPUT);&lt;br /&gt;
  analogWrite(SPEAKERPIN,0); // to be on the safe side&lt;br /&gt;
  lcd.begin(16,2);&lt;br /&gt;
  getSteeringWheel();&lt;br /&gt;
  drawRoad();&lt;br /&gt;
  lcd.setCursor(1,0);&lt;br /&gt;
  lcd.print(INTRO1);&lt;br /&gt;
  lcd.setCursor(1,1);&lt;br /&gt;
  lcd.print(INTRO2);&lt;br /&gt;
  delay(INTRODELAY);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void loop() {&lt;br /&gt;
  unsigned long now = millis()-INTRODELAY;&lt;br /&gt;
  if (!crash) {&lt;br /&gt;
    getSteeringWheel();&lt;br /&gt;
    crash = (car_pos==road[road_index]);&lt;br /&gt;
  }&lt;br /&gt;
  if (crash) {&lt;br /&gt;
    if (!crashtime) {&lt;br /&gt;
      crashtime=now;&lt;br /&gt;
      drawRoad();&lt;br /&gt;
      // Game over text&lt;br /&gt;
      // (keep first 2 &amp;quot;crash&amp;quot; columns intact)&lt;br /&gt;
      lcd.setCursor(2,0);&lt;br /&gt;
      lcd.print(&amp;quot;Crashed after&amp;quot;);&lt;br /&gt;
      lcd.setCursor(2,1);&lt;br /&gt;
      lcd.print(now/1000);&lt;br /&gt;
      lcd.print(&amp;quot; seconds.&amp;quot;);&lt;br /&gt;
    }&lt;br /&gt;
    if ((now-crashtime)&amp;lt;CRASHSOUNDDURATION) {&lt;br /&gt;
      analogWrite(SPEAKERPIN,random(255)); // white noise&lt;br /&gt;
    } &lt;br /&gt;
    else {&lt;br /&gt;
      analogWrite(SPEAKERPIN,0); // dramatic post-crush silence :)   &lt;br /&gt;
    }&lt;br /&gt;
    delay(10); // Wait a bit between writes&lt;br /&gt;
  } &lt;br /&gt;
  else {&lt;br /&gt;
&lt;br /&gt;
    int prev_pos = road[(road_index-1)%ROADLEN];&lt;br /&gt;
    int this_pos = random(MAXROADPOS);&lt;br /&gt;
    while (abs(this_pos-prev_pos)&amp;lt;2) { // don&#039;t jam the road&lt;br /&gt;
      this_pos = random(MAXROADPOS);&lt;br /&gt;
    }&lt;br /&gt;
    road[road_index] = this_pos;&lt;br /&gt;
    road_index = (road_index+1)%ROADLEN;&lt;br /&gt;
    drawRoad();&lt;br /&gt;
    delay(step_duration);&lt;br /&gt;
    if (step_duration&amp;gt;MINSTEPDURATION) {&lt;br /&gt;
      step_duration--; // go faster&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
void getSteeringWheel() {&lt;br /&gt;
  car_pos = map(analogRead(POTPIN),0,1024,0,NCARPOSITIONS);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void drawRoad() {&lt;br /&gt;
  for (int i=0; i&amp;lt;2; i++) {&lt;br /&gt;
    if (crash) {&lt;br /&gt;
      line_buff[0]=crash2glyphs[car_pos][i];&lt;br /&gt;
    } &lt;br /&gt;
    else {&lt;br /&gt;
      line_buff[0]=car2glyphs[car_pos][i];&lt;br /&gt;
    }&lt;br /&gt;
    for (int j=0; j&amp;lt;ROADLEN; j++) {&lt;br /&gt;
      int pos = road[(j+road_index)%ROADLEN];&lt;br /&gt;
      line_buff[j+1] = pos&amp;gt;=0 &amp;amp;&amp;amp; pos&amp;lt;NCARPOSITIONS ? truck2glyphs[pos][i] : BLANK;&lt;br /&gt;
    }&lt;br /&gt;
    lcd.setCursor(0,i);&lt;br /&gt;
    lcd.print(line_buff);&lt;br /&gt;
  }&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Ckharnett</name></author>
	</entry>
	<entry>
		<id>http://wiki.lvl1.org/index.php?title=Freeduino_Games&amp;diff=3794</id>
		<title>Freeduino Games</title>
		<link rel="alternate" type="text/html" href="http://wiki.lvl1.org/index.php?title=Freeduino_Games&amp;diff=3794"/>
		<updated>2012-03-08T16:25:54Z</updated>

		<summary type="html">&lt;p&gt;Ckharnett: Added Truck Lane code&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Freeduino Truck Lane&lt;br /&gt;
Go from the Freeduino Spring Training LCD activity to a game!&lt;br /&gt;
Need a Freeduino, a 10K pot, and a 16x2 LCD and a solderless breadboard.&lt;br /&gt;
Follow all steps in [[4th Inning]].&lt;br /&gt;
Now, pull the middle pot pin out of pin 14 of the LCD. Just connect pin 14 to ground. This should give you a high contrast display. We need to use the pot for steering!&lt;br /&gt;
Connect the middle pot pin instead to Analog Input pin 1 of your Freeduino.&lt;br /&gt;
Add a speaker on pin 13 if you wish--untested.&lt;br /&gt;
&lt;br /&gt;
Here&#039;s the code, cut and paste this into Arduino and install it to your board. Play away. To play again, press the Freeduino&#039;s reset button.&lt;br /&gt;
&lt;br /&gt;
It comes from [http://www.instructables.com/id/Truck-Lane-a-16x2-LCD-Arduino-game/]&lt;br /&gt;
but we&#039;ve changed the pinouts in the code to match what we did in the Freeduino Spring Training LCD activity.&lt;br /&gt;
&lt;br /&gt;
Can you modify the code to make a game that rewards crashing? For example, scoot around catching falling &amp;quot;coins,&amp;quot; and see how many you can collect within a certain time. Then, make them fall faster and faster! This would be a fun way to learn more about what the code is doing.&lt;br /&gt;
&lt;br /&gt;
Coming soon, Freeduino Whack-A-Mole!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;/* Simple Car game for a 16x2 LCD display &lt;br /&gt;
   You can use any Hitachi HD44780 compatible LCD.&lt;br /&gt;
   Modified for LVL1 Spring Training LCD Activity, originally from &lt;br /&gt;
    @TheRealDod, Nov 25, 2010&lt;br /&gt;
   There&#039;s a &amp;quot;steering wheel&amp;quot; potentiometer on analog input 1,&lt;br /&gt;
   and a Piezo speaker on pin 13 (PWM).&lt;br /&gt;
   &lt;br /&gt;
   Enjoy,&lt;br /&gt;
&lt;br /&gt;
*/&lt;br /&gt;
#include &amp;lt;LiquidCrystal.h&amp;gt;&lt;br /&gt;
// LiquidCrystal display&lt;br /&gt;
// You can use any Hitachi HD44780 compatible. Wiring explained at&lt;br /&gt;
// http://www.arduino.cc/en/Tutorial/LiquidCrystal&lt;br /&gt;
LiquidCrystal lcd(7, 8, 9, 10, 11, 12);&lt;br /&gt;
&lt;br /&gt;
// Steering wheel potentiometer&lt;br /&gt;
const int POTPIN = 1;&lt;br /&gt;
const int MAXPOT = 800; // no need to turn the wheel all the way to 1023 :)&lt;br /&gt;
&lt;br /&gt;
// Piezo speaker&lt;br /&gt;
const int SPEAKERPIN = 13;//you can see the led flash when u crash&lt;br /&gt;
&lt;br /&gt;
const int RANDSEEDPIN = 0; // an analog pin that isn&#039;t connected to anything&lt;br /&gt;
&lt;br /&gt;
const int MAXSTEPDURATION = 300; // Start slowly, each step is 1 millisec shorter.&lt;br /&gt;
const int MINSTEPDURATION = 150; // This is as fast as it gets&lt;br /&gt;
&lt;br /&gt;
const int NGLYPHS = 6;&lt;br /&gt;
// the glyphs will be defined starting from 1 (not 0),&lt;br /&gt;
// to enable lcd.print() of null-terminated strings&lt;br /&gt;
byte glyphs[NGLYPHS][8] = {&lt;br /&gt;
  // 1: car up&lt;br /&gt;
  { B00000,&lt;br /&gt;
    B01110,&lt;br /&gt;
    B11111,&lt;br /&gt;
    B01010,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B00000}&lt;br /&gt;
  // 2: car down&lt;br /&gt;
  ,{B00000,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B01110,&lt;br /&gt;
    B11111,&lt;br /&gt;
    B01010,&lt;br /&gt;
    B00000}&lt;br /&gt;
  // 3: truck up&lt;br /&gt;
  ,{B00000,&lt;br /&gt;
    B11110,&lt;br /&gt;
    B11111,&lt;br /&gt;
    B01010,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B00000}&lt;br /&gt;
  // 4: truck down&lt;br /&gt;
  ,{B00000,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B11110,&lt;br /&gt;
    B11111,&lt;br /&gt;
    B01010,&lt;br /&gt;
    B00000}&lt;br /&gt;
  // 5: crash up&lt;br /&gt;
  ,{B10101,&lt;br /&gt;
    B01110,&lt;br /&gt;
    B01110,&lt;br /&gt;
    B10101,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B00000}&lt;br /&gt;
  // 6: crash down&lt;br /&gt;
  ,{B00000,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B00000,&lt;br /&gt;
    B10101,&lt;br /&gt;
    B01110,&lt;br /&gt;
    B01110,&lt;br /&gt;
    B10101,&lt;br /&gt;
    B00000}&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
const int NCARPOSITIONS = 4;&lt;br /&gt;
&lt;br /&gt;
// Each position is mapped to a column of 2 glyphs&lt;br /&gt;
// Used to make sense when I had a 5th position&lt;br /&gt;
// where car or crash was drawn as 2 glyphs&lt;br /&gt;
// (can&#039;t do that since 0 terminates strings),&lt;br /&gt;
// so it&#039;s kinda silly now, but it ain&#039;t broke :)&lt;br /&gt;
const char BLANK=32;&lt;br /&gt;
char car2glyphs[NCARPOSITIONS][2] = {&lt;br /&gt;
  {1,BLANK},{2,BLANK},{BLANK,1},{BLANK,2}&lt;br /&gt;
};&lt;br /&gt;
char truck2glyphs[NCARPOSITIONS][2] = {&lt;br /&gt;
  {3,BLANK},{4,BLANK},{BLANK,3},{BLANK,4}&lt;br /&gt;
};&lt;br /&gt;
char crash2glyphs[NCARPOSITIONS][2] = {&lt;br /&gt;
  {5,BLANK},{6,BLANK},{BLANK,5},{BLANK,6}&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
const int ROADLEN = 15; // LCD width (not counting our car)&lt;br /&gt;
int road[ROADLEN]; // positions of other cars&lt;br /&gt;
char line_buff[2+ROADLEN]; // aux string for drawRoad()&lt;br /&gt;
int road_index;&lt;br /&gt;
int car_pos;&lt;br /&gt;
// Off-the-grid position means empty column, so MAXROADPOS&lt;br /&gt;
// determines the probability of a car in a column&lt;br /&gt;
// e.g. 3*NCARPOSITIONS gives p=1/3&lt;br /&gt;
const int MAXROADPOS = 3*NCARPOSITIONS;&lt;br /&gt;
int step_duration;&lt;br /&gt;
&lt;br /&gt;
int crash; // true if crashed&lt;br /&gt;
unsigned int crashtime; // millis() when crashed&lt;br /&gt;
const int CRASHSOUNDDURATION = 250;&lt;br /&gt;
&lt;br /&gt;
const char *INTRO1=&amp;quot;Trucks ahead,&amp;quot;;&lt;br /&gt;
const char *INTRO2=&amp;quot;Drive carefully&amp;quot;;&lt;br /&gt;
const int INTRODELAY = 2000;&lt;br /&gt;
&lt;br /&gt;
void setup()&lt;br /&gt;
{&lt;br /&gt;
  crash = crashtime = road_index = 0;&lt;br /&gt;
  step_duration = MAXSTEPDURATION;&lt;br /&gt;
  line_buff[1+ROADLEN] = &#039;\0&#039;; // null terminate it&lt;br /&gt;
  randomSeed(analogRead(RANDSEEDPIN));&lt;br /&gt;
  for (int i=0; i&amp;lt;NGLYPHS; i++) {&lt;br /&gt;
    lcd.createChar(i+1,glyphs[i]);&lt;br /&gt;
  }&lt;br /&gt;
  for (int i=0; i&amp;lt;ROADLEN; i++) {&lt;br /&gt;
    road[i]=-1;&lt;br /&gt;
  }&lt;br /&gt;
  pinMode(SPEAKERPIN,OUTPUT);&lt;br /&gt;
  analogWrite(SPEAKERPIN,0); // to be on the safe side&lt;br /&gt;
  lcd.begin(16,2);&lt;br /&gt;
  getSteeringWheel();&lt;br /&gt;
  drawRoad();&lt;br /&gt;
  lcd.setCursor(1,0);&lt;br /&gt;
  lcd.print(INTRO1);&lt;br /&gt;
  lcd.setCursor(1,1);&lt;br /&gt;
  lcd.print(INTRO2);&lt;br /&gt;
  delay(INTRODELAY);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void loop() {&lt;br /&gt;
  unsigned long now = millis()-INTRODELAY;&lt;br /&gt;
  if (!crash) {&lt;br /&gt;
    getSteeringWheel();&lt;br /&gt;
    crash = (car_pos==road[road_index]);&lt;br /&gt;
  }&lt;br /&gt;
  if (crash) {&lt;br /&gt;
    if (!crashtime) {&lt;br /&gt;
      crashtime=now;&lt;br /&gt;
      drawRoad();&lt;br /&gt;
      // Game over text&lt;br /&gt;
      // (keep first 2 &amp;quot;crash&amp;quot; columns intact)&lt;br /&gt;
      lcd.setCursor(2,0);&lt;br /&gt;
      lcd.print(&amp;quot;Crashed after&amp;quot;);&lt;br /&gt;
      lcd.setCursor(2,1);&lt;br /&gt;
      lcd.print(now/1000);&lt;br /&gt;
      lcd.print(&amp;quot; seconds.&amp;quot;);&lt;br /&gt;
    }&lt;br /&gt;
    if ((now-crashtime)&amp;lt;CRASHSOUNDDURATION) {&lt;br /&gt;
      analogWrite(SPEAKERPIN,random(255)); // white noise&lt;br /&gt;
    } &lt;br /&gt;
    else {&lt;br /&gt;
      analogWrite(SPEAKERPIN,0); // dramatic post-crush silence :)   &lt;br /&gt;
    }&lt;br /&gt;
    delay(10); // Wait a bit between writes&lt;br /&gt;
  } &lt;br /&gt;
  else {&lt;br /&gt;
&lt;br /&gt;
    int prev_pos = road[(road_index-1)%ROADLEN];&lt;br /&gt;
    int this_pos = random(MAXROADPOS);&lt;br /&gt;
    while (abs(this_pos-prev_pos)&amp;lt;2) { // don&#039;t jam the road&lt;br /&gt;
      this_pos = random(MAXROADPOS);&lt;br /&gt;
    }&lt;br /&gt;
    road[road_index] = this_pos;&lt;br /&gt;
    road_index = (road_index+1)%ROADLEN;&lt;br /&gt;
    drawRoad();&lt;br /&gt;
    delay(step_duration);&lt;br /&gt;
    if (step_duration&amp;gt;MINSTEPDURATION) {&lt;br /&gt;
      step_duration--; // go faster&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
void getSteeringWheel() {&lt;br /&gt;
  car_pos = map(analogRead(POTPIN),0,1024,0,NCARPOSITIONS);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void drawRoad() {&lt;br /&gt;
  for (int i=0; i&amp;lt;2; i++) {&lt;br /&gt;
    if (crash) {&lt;br /&gt;
      line_buff[0]=crash2glyphs[car_pos][i];&lt;br /&gt;
    } &lt;br /&gt;
    else {&lt;br /&gt;
      line_buff[0]=car2glyphs[car_pos][i];&lt;br /&gt;
    }&lt;br /&gt;
    for (int j=0; j&amp;lt;ROADLEN; j++) {&lt;br /&gt;
      int pos = road[(j+road_index)%ROADLEN];&lt;br /&gt;
      line_buff[j+1] = pos&amp;gt;=0 &amp;amp;&amp;amp; pos&amp;lt;NCARPOSITIONS ? truck2glyphs[pos][i] : BLANK;&lt;br /&gt;
    }&lt;br /&gt;
    lcd.setCursor(0,i);&lt;br /&gt;
    lcd.print(line_buff);&lt;br /&gt;
  }&lt;br /&gt;
}&amp;lt;/nowiki&amp;gt;&lt;/div&gt;</summary>
		<author><name>Ckharnett</name></author>
	</entry>
	<entry>
		<id>http://wiki.lvl1.org/index.php?title=Workshops&amp;diff=3793</id>
		<title>Workshops</title>
		<link rel="alternate" type="text/html" href="http://wiki.lvl1.org/index.php?title=Workshops&amp;diff=3793"/>
		<updated>2012-03-08T16:05:05Z</updated>

		<summary type="html">&lt;p&gt;Ckharnett: Added Freeduino Games&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page is a free resource for all learning materials used in LVL1 workshops. Check our [[Calendar]] to see what LVL1 workshops are on the horizon! Enjoy!&lt;br /&gt;
&lt;br /&gt;
== How to Solder ==&lt;br /&gt;
* [[media:soldercomic.pdf|Soldering is Easy Comic]]&lt;br /&gt;
&lt;br /&gt;
== Solder Your Own Freeduino ==&lt;br /&gt;
*[http://www.arduino.cc/en/Main/Software Download Arduino Software] the Arduino software and install.&lt;br /&gt;
*[http://arduino.cc/en/Tutorial/HomePage Arduino Tutorials] Arduino Tutorials&lt;br /&gt;
*[[Media:Solder_your_own_freeduino_handout.pdf|Solder Your Own Freeduino Instructions PDF]]&lt;br /&gt;
*[[Media:Solder_your_own_freeduino_handout.odp|Solder Your Own Freeduino Instructions Open Office Presentation]]&lt;br /&gt;
*[[Media:ResistorQV.pdf|Resistor Color Code PDF]]&lt;br /&gt;
*[[Media:Arduino_cheat_sheet_v02c.pdf|Arduino Cheatsheet PDF]]&lt;br /&gt;
&lt;br /&gt;
== Freeduino Spring Training ==&lt;br /&gt;
&lt;br /&gt;
http://wiki.lvl1.org/Freediuino_Spring_Training&lt;br /&gt;
&lt;br /&gt;
Below are the lessons for the Freeduino Spring Training.  They are Creative Commons licensed, so share and use.  Pass them along.  If there are issues (bugs) with the instruction, code or circuits, then email me brian_at_lvl1.org.  The breadboard and schematic pictures are drawn using the [http://www.fritzing.org Fritzing] Program.  Try Fritzing out - it is really cool! &lt;br /&gt;
&lt;br /&gt;
*[[1st Inning]] - Arduino and Breadboard setup, Power&lt;br /&gt;
*[[2nd Inning]] - Blinking LED&lt;br /&gt;
*[[3rd Inning]] - Tri-Color LED fading&lt;br /&gt;
*[[4th Inning]] - LCD display&lt;br /&gt;
*[[5th Inning]] - Pushbutton switches&lt;br /&gt;
*[[6th Inning]] - Potentiometers and voltage dividers&lt;br /&gt;
*[[7th Inning]] - Photocell, Thermistor&lt;br /&gt;
*[[8th Inning]] - Spin a motor, transistors and diodes&lt;br /&gt;
*[[9th Inning]] - Sounds and speakers&lt;br /&gt;
&lt;br /&gt;
== February Freeduino Frenzy ==&lt;br /&gt;
[[February Freeduino Frenzy]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Learn To Solder with Mitch Altman and Jimmie Rodgers ==&lt;br /&gt;
*[[Media:LearnToSolderWithMitch.odt|Flyer for the workshop in OOO Writer format.]]&lt;br /&gt;
*[[Media:LearnToSolderWithMitch.pdf|Flyer for the workshop in PDF format.]]&lt;br /&gt;
&lt;br /&gt;
== Intermediate Microcontroller Workshop, &amp;quot;Beyond Arduino&amp;quot; == &lt;br /&gt;
*[http://drop.io/kt3wfh7 Presentation] - The Powerpoint Presentation used in the workshop, with notes.&lt;br /&gt;
*[[Resources and Code]] - The files used during the course of this workshop.&lt;br /&gt;
*[[Parts]] - Parts used in this workshop&lt;br /&gt;
*[[Media:Lvl1_avr_workshop.svg|Flyer for the workshop in SVG Format.]]&lt;br /&gt;
*[[Media:Lvl1_avr_workshop.pdf|Flyer for the workshop in PDF Format.]]&lt;br /&gt;
&lt;br /&gt;
== TV-B-Gone Workshop ==&lt;br /&gt;
*[[Media:Tv-b-gone.odp|TV-B-Gone instructions Open Office Presentation]]&lt;br /&gt;
*[[Media:Tv-b-gone.pdf|TV-B-Gone instructions PDF]]&lt;br /&gt;
&lt;br /&gt;
== Minti Boost Workshop ==&lt;br /&gt;
[[MintiBoost]] Workshop Information for 12/6/10 and 12/18/10&lt;br /&gt;
&lt;br /&gt;
== Android Game Workshop ==&lt;br /&gt;
*[https://docs.google.com/viewer?a=v&amp;amp;pid=explorer&amp;amp;chrome=true&amp;amp;srcid=0B4p7lji7MVk7NGU3Zjk1NDUtMTliMS00NzFhLTg4YTMtNjMzMjQ1ZWIxMzVm&amp;amp;hl=en&amp;amp;authkey=CLqd-usM] Android Slides PDF&lt;br /&gt;
*[https://docs.google.com/leaf?id=0B4p7lji7MVk7YjBlN2Q1OTYtNjIyZS00MmZiLWIzMGMtYzMxMmNmZTQ0MGRm&amp;amp;hl=en&amp;amp;authkey=CMHRx3E] Android Sample App&lt;br /&gt;
&lt;br /&gt;
== Ruby on Rails Workshop ==&lt;br /&gt;
==== Source Code &amp;amp; Notes ====&lt;br /&gt;
*[https://docs.google.com/leaf?id=0Bzy184pfAcrUMThkNGVjMmItMWVmNS00OTM2LTg3ZTctOWY5MDk1MDdjY2Mx&amp;amp;hl=en&amp;amp;authkey=CP_Qo5kI] blog.zip&lt;br /&gt;
==== References ====&lt;br /&gt;
*[http://www.amazon.com/Design-Patterns-Ruby-Russ-Olsen/dp/0321490452/ref=sr_1_1?ie=UTF8&amp;amp;qid=1305291175&amp;amp;sr=8-1|Design Patterns in Ruby, by Russ Olsen]&lt;br /&gt;
This book is both very readable (a rarity in tech books) and a fantastic introduction to Ruby for someone familiar with the GoF design pattern implementations in other languages. It has a quick Ruby syntax primer in the beginning, then jumps straight into the patterns.&lt;br /&gt;
&lt;br /&gt;
*[http://www.amazon.com/Programming-Ruby-1-9-Pragmatic-Programmers/dp/1934356085/ref=sr_1_1?s=books&amp;amp;ie=UTF8&amp;amp;qid=1305291335&amp;amp;sr=1-1|Programming Ruby 1.9, by Dave Thomas, Chad Fowler, and Andy Hunt]&lt;br /&gt;
This is the latest edition of the book commonly known as &amp;quot;The Pickaxe&amp;quot; in the Ruby community -- in its first edition, it was the first comprehensive English-language reference for Ruby, and was therefore indispensable to someone just getting started with the language. The latest edition is still a great reference book to have around.&lt;br /&gt;
&lt;br /&gt;
*[http://www.amazon.com/Agile-Development-Rails-Pragmatic-Programmers/dp/1934356549/ref=sr_1_1?ie=UTF8&amp;amp;qid=1305291555&amp;amp;sr=8-1|Agile Web Development with Rails, 4th Edition, by Sam Ruby, Dave Thomas, and David Heinemeier Hansson]&lt;br /&gt;
Agile Web Development was co-authored by David Heinemeier Hansson, the creator of Rails, and was the closest thing that the Rails community had to &amp;quot;The Pickaxe&amp;quot; for Ruby, in its first edition. The authors have done a great job of cleaning it up and keeping it relevant, and the latest version covers Rails 3.&lt;br /&gt;
&lt;br /&gt;
*[http://www.amazon.com/Rails-Way-Addison-Wesley-Professional-Ruby/dp/0321601661/ref=sr_1_1?s=books&amp;amp;ie=UTF8&amp;amp;qid=1305291830&amp;amp;sr=1-1|The Rails 3 Way, 2nd Edition, by Obie Fernandez]&lt;br /&gt;
Obie heads up the Florida-based Rails consultancy, Hashrocket, and was an early adopter of Rails, coming over from the Java camp. He&#039;s been a vocal advocate of best practices in Rails for just about as long as Rails has existed, and his book helps to explain not just how to do things in Rails, but why.&lt;br /&gt;
&lt;br /&gt;
== Pimping your Home Network with DDWRT ==&lt;br /&gt;
&lt;br /&gt;
*[http://www.dd-wrt.com/site/support/router-database DDWRT Database Search]&lt;br /&gt;
*[http://www.dd-wrt.com/wiki/index.php/Repeater_Bridge Creating a wireless bridge]&lt;br /&gt;
*[http://www.pennock.nl/dd-wrt/Multiple_BSSIDs.html Guest Wifi]&lt;br /&gt;
*[https://docs.google.com/leaf?id=1w1FSYX70ejcjo5jaXnvqVe3HGLekPd3I0CW5LnRBrs6RnAOcU8jWBn4ES-Lb&amp;amp;hl=en_US&amp;amp;authkey=CKC21ZMF DDWRT Power Point]&lt;br /&gt;
&lt;br /&gt;
===Parts for a custom home router===&lt;br /&gt;
*[http://www.newegg.com/Product/Product.aspx?Item=N82E16813153154 Motherboard]&lt;br /&gt;
*[http://www.newegg.com/Product/Product.aspx?Item=N82E16820144151 RAM]&lt;br /&gt;
*[http://www.newegg.com/Product/Product.aspx?Item=N82E16822136771 Hard Drive]&lt;br /&gt;
*[http://www.newegg.com/Product/Product.aspx?Item=N82E16811108196 Case]&lt;br /&gt;
&lt;br /&gt;
== LVL1 Summer Camp ==&lt;br /&gt;
&lt;br /&gt;
LVL1 Summer Camp was a workshop that is occurring during the month of June, 2011, taking up every Saturday in June, from 1pm to 5pm.&lt;br /&gt;
&lt;br /&gt;
=== Eagle Workshop ===&lt;br /&gt;
&lt;br /&gt;
==== Links ====&lt;br /&gt;
&lt;br /&gt;
Eagle itself: [http://www.cadsoft.de/download.htm Eagle Download]&lt;br /&gt;
&lt;br /&gt;
Sparkfun parts library used for this workshop: [https://github.com/sparkfun/SparkFun-Eagle-Library/raw/master/SparkFun.lbr Sparkfun Library]&lt;br /&gt;
&lt;br /&gt;
Dangerous Prototypes Parts Library: [http://dangerous-prototypes-open-hardware.googlecode.com/svn/trunk/Eagle_Part_Library/dp_devices.lbr DP Parts Library]&lt;br /&gt;
&lt;br /&gt;
Sparkfun Keyboard Shortcuts, Appropriate for most layouts: [http://www.sparkfun.com/tutorial/BeginningEmbedded/8-EagleSchematics/sfe_eagle_shortcuts.zip Keyboard Shortcuts]&lt;br /&gt;
&lt;br /&gt;
CAM file: [http://www.sparkfun.com/tutorial/BeginningEmbedded/9-EaglePCBs/sfe-gerb274x.cam Sparkfun CAM, appropriate for GoldPhoenix]&lt;br /&gt;
&lt;br /&gt;
==== Board files we created ====&lt;br /&gt;
&lt;br /&gt;
[http://dl.dropbox.com/u/13484341/capsLocker.brd Caps Locker Board File]&lt;br /&gt;
&lt;br /&gt;
[http://dl.dropbox.com/u/13484341/tinyBreakout.brd Caps Locker Schematic File]&lt;br /&gt;
&lt;br /&gt;
[http://dl.dropbox.com/u/13484341/vusbtiny.brd V-USB Tiny Board File]&lt;br /&gt;
&lt;br /&gt;
[http://dl.dropbox.com/u/13484341/vusbtiny.sch V-USB Tiny Schematic File]&lt;br /&gt;
&lt;br /&gt;
=== Etching Workshop ===&lt;br /&gt;
&lt;br /&gt;
Please See: [http://www.meatandnetworking.com/?p=47 Toner Transfer and Muriatic Acid Etchant: Making PCBs at LVL1]&lt;br /&gt;
&lt;br /&gt;
=== Soldering Workshop ===&lt;br /&gt;
&lt;br /&gt;
[http://wiki.lvl1.org/File:Surface_Mount_Soldering.pdf Summer Camp Soldering Presentation]&lt;br /&gt;
&lt;br /&gt;
If you&#039;d like to create your own, you&#039;ll need these parts:&lt;br /&gt;
&lt;br /&gt;
== V-USB Programmer ==&lt;br /&gt;
&lt;br /&gt;
* 1x AtTiny45, .3&amp;quot; SOIC package&lt;br /&gt;
* 1x Mini-USB B Port (surface mount)&lt;br /&gt;
* 1x Surface Mount Slide Switch (See Sparkfun)&lt;br /&gt;
* 2x 1.5k Ohm, 0805 Resistors&lt;br /&gt;
* 2x 68 Ohm, 0805 Resistors&lt;br /&gt;
* 1x Decoupling Cap&lt;br /&gt;
* 2x 3.3v Zener Diodes, SMB Package (Note: MUST Clamp Voltage to 3.3v)&lt;br /&gt;
* 1x Surface Mount, 6 pin, 2 row terminal block&lt;br /&gt;
&lt;br /&gt;
== Caps Locker ==&lt;br /&gt;
&lt;br /&gt;
* 1x AtTiny45, .3&amp;quot; SOIC package&lt;br /&gt;
* 2x 68 Ohm 0805 Resistors&lt;br /&gt;
* 1x 1.5k Ohm 0805 Resistors&lt;br /&gt;
* 1x Surface Mount, 6 pin, 2 row terminal block&lt;br /&gt;
&lt;br /&gt;
=== Programming Workshop === &lt;br /&gt;
&lt;br /&gt;
[http://wiki.lvl1.org/File:Presentationn.pdf Presentation with Notes]&lt;br /&gt;
&lt;br /&gt;
For Code, see [[Resources and Code]]&lt;br /&gt;
&lt;br /&gt;
== Tinkering to Commercialization Workshop ==&lt;br /&gt;
[[Media:Tinkering_To_Commercialization_-_August_2011.pdf|Tinkering to Commercialization Presentation]]&lt;br /&gt;
&lt;br /&gt;
== KiCad Workshop (1/21/12) ==&lt;br /&gt;
&lt;br /&gt;
[http://wiki.lvl1.org/File:KiCad.pdf Kicad Presentation]&lt;br /&gt;
[meatandnetworking.com/w/Kicad_Resources More KiCad links and resources]&lt;br /&gt;
&lt;br /&gt;
== Freeduino Games (Gadget Lab at U of Louisville) ==&lt;br /&gt;
Add some games to the Freeduino Frenzy/Spring Training workshops!&lt;br /&gt;
*[[Freeduino Games]]&lt;/div&gt;</summary>
		<author><name>Ckharnett</name></author>
	</entry>
	<entry>
		<id>http://wiki.lvl1.org/index.php?title=Sensors_Everywhere&amp;diff=2926</id>
		<title>Sensors Everywhere</title>
		<link rel="alternate" type="text/html" href="http://wiki.lvl1.org/index.php?title=Sensors_Everywhere&amp;diff=2926"/>
		<updated>2011-10-04T19:09:30Z</updated>

		<summary type="html">&lt;p&gt;Ckharnett: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Cellphones and laptops, plus Arduinos mean there are &amp;quot;Sensors Everywhere&amp;quot; &lt;br /&gt;
More information can be found at the [http://sensorseverywhere.wordpress.com project website].&lt;br /&gt;
&lt;br /&gt;
There are a million applications.&lt;br /&gt;
Let&#039;s use these sensors to track energy consumption!&lt;br /&gt;
&lt;br /&gt;
We are seeking to:&lt;br /&gt;
--Make an image of stray electric fields (like those measured by a&lt;br /&gt;
Home Depot live-wire detector) overlaid on a photo of the space. This will generate ideas on designing a wearable sensor that can detect whether a light or computer is on or off.&lt;br /&gt;
&lt;br /&gt;
--Automatically generate a &amp;quot;timeline&amp;quot; of an individual&#039;s energy-using&lt;br /&gt;
activities within the space, for instance: Turned on light and fan,&lt;br /&gt;
ran laser cutter for x minutes, used y watts, turned off light and&lt;br /&gt;
went away&lt;br /&gt;
(Do the timeline using the simplest set of mobile sensors/mobile&lt;br /&gt;
phones possible.)&lt;br /&gt;
&lt;br /&gt;
--Generate a ton of real-world data for U of L students/faculty (and&lt;br /&gt;
anyone else) to apply visualization and machine learning algorithms.&lt;br /&gt;
&lt;br /&gt;
There is lots of overlap with the Quantified Self group. If the above&lt;br /&gt;
goals don&#039;t fit your exact interests but you want to join up and work&lt;br /&gt;
on sensors in general, that is great.&lt;br /&gt;
&lt;br /&gt;
Things that would be helpful along the way are&lt;br /&gt;
--Borrow a good EMF detector and spectrum analyzer to figure out what&lt;br /&gt;
to look for in the e-field when a user flips a switch&lt;br /&gt;
(DONE, we have one to bring to the space as of mid Sept)&lt;br /&gt;
&lt;br /&gt;
--More spatial data collection, build a datalogger shield for your&lt;br /&gt;
Arduino and carry around some sensors (temperature, lighting and&lt;br /&gt;
electric fields, and whatever else would help infer what you are&lt;br /&gt;
doing)&lt;br /&gt;
(Somewhat DONE, I built the super simple emf detector by Alai)&lt;br /&gt;
&lt;br /&gt;
--Someone with an iPhone to try out the &amp;quot;Batphone&amp;quot; app to locate a&lt;br /&gt;
user within the space&lt;br /&gt;
(DONE, I have this running on an ipod touch. It is pretty interesting)&lt;br /&gt;
&lt;br /&gt;
--User interface expert: we could use a minimally annoying mobile-&lt;br /&gt;
phone based survey to ask what the user is doing when the sensors&lt;br /&gt;
detect something new&lt;br /&gt;
&lt;br /&gt;
--More Kill-A-Watt power monitors, or even build some Tweet-A-Watts&lt;br /&gt;
and code to gather true energy consumption data for judging the&lt;br /&gt;
accuracy of the timeline.&lt;br /&gt;
&lt;br /&gt;
--A 3D model of the LVL1 space --for instance the Counterstrike game&lt;br /&gt;
level exported into some common format!&lt;br /&gt;
&lt;br /&gt;
--Make sensors small and glove-wearable&lt;/div&gt;</summary>
		<author><name>Ckharnett</name></author>
	</entry>
	<entry>
		<id>http://wiki.lvl1.org/index.php?title=Sensors_Everywhere&amp;diff=2776</id>
		<title>Sensors Everywhere</title>
		<link rel="alternate" type="text/html" href="http://wiki.lvl1.org/index.php?title=Sensors_Everywhere&amp;diff=2776"/>
		<updated>2011-09-12T16:46:37Z</updated>

		<summary type="html">&lt;p&gt;Ckharnett: Created page with &amp;quot;Cellphones and laptops, plus Arduinos mean there are &amp;quot;Sensors Everywhere&amp;quot;   There are a million applications. Let&amp;#039;s use these sensors to track energy consumption!  We are seeking...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Cellphones and laptops, plus Arduinos mean there are &amp;quot;Sensors Everywhere&amp;quot; &lt;br /&gt;
&lt;br /&gt;
There are a million applications.&lt;br /&gt;
Let&#039;s use these sensors to track energy consumption!&lt;br /&gt;
&lt;br /&gt;
We are seeking to:&lt;br /&gt;
--Make an image of stray electric fields (like those measured by a&lt;br /&gt;
Home Depot live-wire detector) overlaid on a photo of the space. This will generate ideas on designing a wearable sensor that can detect whether a light or computer is on or off.&lt;br /&gt;
&lt;br /&gt;
--Automatically generate a &amp;quot;timeline&amp;quot; of an individual&#039;s energy-using&lt;br /&gt;
activities within the space, for instance: Turned on light and fan,&lt;br /&gt;
ran laser cutter for x minutes, used y watts, turned off light and&lt;br /&gt;
went away&lt;br /&gt;
(Do the timeline using the simplest set of mobile sensors/mobile&lt;br /&gt;
phones possible.)&lt;br /&gt;
&lt;br /&gt;
--Generate a ton of real-world data for U of L students/faculty (and&lt;br /&gt;
anyone else) to apply visualization and machine learning algorithms.&lt;br /&gt;
&lt;br /&gt;
There is lots of overlap with the Quantified Self group. If the above&lt;br /&gt;
goals don&#039;t fit your exact interests but you want to join up and work&lt;br /&gt;
on sensors in general, that is great.&lt;br /&gt;
&lt;br /&gt;
Things that would be helpful along the way are&lt;br /&gt;
--Borrow a good EMF detector and spectrum analyzer to figure out what&lt;br /&gt;
to look for in the e-field when a user flips a switch&lt;br /&gt;
(DONE, we have one to bring to the space as of mid Sept)&lt;br /&gt;
&lt;br /&gt;
--More spatial data collection, build a datalogger shield for your&lt;br /&gt;
Arduino and carry around some sensors (temperature, lighting and&lt;br /&gt;
electric fields, and whatever else would help infer what you are&lt;br /&gt;
doing)&lt;br /&gt;
(Somewhat DONE, I built the super simple emf detector by Alai)&lt;br /&gt;
&lt;br /&gt;
--Someone with an iPhone to try out the &amp;quot;Batphone&amp;quot; app to locate a&lt;br /&gt;
user within the space&lt;br /&gt;
(DONE, I have this running on an ipod touch. It is pretty interesting)&lt;br /&gt;
&lt;br /&gt;
--User interface expert: we could use a minimally annoying mobile-&lt;br /&gt;
phone based survey to ask what the user is doing when the sensors&lt;br /&gt;
detect something new&lt;br /&gt;
&lt;br /&gt;
--More Kill-A-Watt power monitors, or even build some Tweet-A-Watts&lt;br /&gt;
and code to gather true energy consumption data for judging the&lt;br /&gt;
accuracy of the timeline.&lt;br /&gt;
&lt;br /&gt;
--A 3D model of the LVL1 space --for instance the Counterstrike game&lt;br /&gt;
level exported into some common format!&lt;br /&gt;
&lt;br /&gt;
--Make sensors small and glove-wearable&lt;/div&gt;</summary>
		<author><name>Ckharnett</name></author>
	</entry>
	<entry>
		<id>http://wiki.lvl1.org/index.php?title=Main_Page&amp;diff=2775</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="http://wiki.lvl1.org/index.php?title=Main_Page&amp;diff=2775"/>
		<updated>2011-09-12T16:25:24Z</updated>

		<summary type="html">&lt;p&gt;Ckharnett: added sensors everywhere link&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{| cellpadding=&amp;quot;5&amp;quot; style=&amp;quot;border:1px; background-color:#f9f9f9; solid #B0B0B0; padding:3px; width:100%; margin-bottom:2px;&amp;quot;&lt;br /&gt;
!width=&amp;quot;49%&amp;quot;|&lt;br /&gt;
!width=&amp;quot;49%&amp;quot;|&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;;|&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; |&lt;br /&gt;
|valign=&amp;quot;top&amp;quot;|&lt;br /&gt;
|-&lt;br /&gt;
|valign=&amp;quot;top&amp;quot;|&lt;br /&gt;
&lt;br /&gt;
===New to LVL1.org?===&lt;br /&gt;
This is our fast and loose wiki site. It&#039;s the quickest way for all those involved with LVL1 to add and update information. For news, announcements and blogs check out our main page [http://www.lvl1.org http://www.lvl1.org]!&lt;br /&gt;
&lt;br /&gt;
=== Join in the LVL1 discussions. ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;shtml hash=&amp;quot;02566b3912fca84ab24a2a06e1cbb65e&amp;quot;&amp;gt;&amp;lt;form action=&amp;quot;http://groups.google.com/group/lvl1/boxsubscribe&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;img src=&amp;quot;http://groups.google.com/intl/en/images/logos/groups_logo_sm.gif&amp;quot; height=30 width=140 alt=&amp;quot;Google Groups&amp;quot;&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Subscribe to LVL1 - Louisville&amp;amp;#39;s MakerSpace&amp;lt;/b&amp;gt;&lt;br /&gt;
  Email: &amp;lt;input type=text name=email&amp;gt;&lt;br /&gt;
  &amp;lt;input type=submit name=&amp;quot;sub&amp;quot; value=&amp;quot;Subscribe&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;a href=&amp;quot;http://groups.google.com/group/lvl1&amp;quot;&amp;gt;Visit this group&amp;lt;/a&amp;gt;&lt;br /&gt;
&amp;lt;/form&amp;gt;&amp;lt;/shtml&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Membership ===&lt;br /&gt;
You don&#039;t need to be a LVL1 member to enjoy any of our meetings, events and workshops. But if you&#039;d like the full LVL1 access that membership provides, and want to fully support LVL1, we&#039;d love to have you!&lt;br /&gt;
* [[Members|Current members and officers]]&lt;br /&gt;
* [[How To Become A Member]]&lt;br /&gt;
&lt;br /&gt;
=== Support ===&lt;br /&gt;
Not ready to sign up to be a full member, but still want to support the LVL1 Louisville Hackerspace?  Send us a donation of any value!&lt;br /&gt;
&lt;br /&gt;
&amp;lt;shtml hash=&amp;quot;2e94dfa6b8c3b7b966d0ecc68b6ea66a&amp;quot;&amp;gt;&amp;lt;form action=&amp;quot;https://www.paypal.com/cgi-bin/webscr&amp;quot; method=&amp;quot;post&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;input type=&amp;quot;hidden&amp;quot; name=&amp;quot;cmd&amp;quot; value=&amp;quot;_s-xclick&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;input type=&amp;quot;hidden&amp;quot; name=&amp;quot;hosted_button_id&amp;quot; value=&amp;quot;11193995&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;input type=&amp;quot;image&amp;quot; src=&amp;quot;https://www.paypal.com/en_US/i/btn/btn_donateCC_LG.gif&amp;quot; border=&amp;quot;0&amp;quot; name=&amp;quot;submit&amp;quot; alt=&amp;quot;PayPal - The safer, easier way to pay online!&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;img alt=&amp;quot;&amp;quot; border=&amp;quot;0&amp;quot; src=&amp;quot;https://www.paypal.com/en_US/i/scr/pixel.gif&amp;quot; width=&amp;quot;1&amp;quot; height=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/form&amp;gt;&lt;br /&gt;
&amp;lt;/shtml&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[Subscribe to Make Magazine]] and help LVL1!&lt;br /&gt;
&lt;br /&gt;
=== Recent Meetings ===&lt;br /&gt;
These are the agendas from recent meetings&lt;br /&gt;
* [[9/6/11]]&lt;br /&gt;
* [[8/30/11]]&lt;br /&gt;
* [[8/23/11]]&lt;br /&gt;
* [[8/16/11]]&lt;br /&gt;
* [[8/9/11]]&lt;br /&gt;
* [[8/2/11]]&lt;br /&gt;
* [[7/26/11]]&lt;br /&gt;
* [[7/19/11]]&lt;br /&gt;
* [[7/12/11]]&lt;br /&gt;
* [[7/5/11]]&lt;br /&gt;
* [[Older Meetings]]&lt;br /&gt;
&lt;br /&gt;
=== What&#039;s Happening? ===&lt;br /&gt;
* [[White Star Balloon]]&lt;br /&gt;
* [[Louisville Soundbuilders]]&lt;br /&gt;
* [[Louisville Biodiesel]] project info&lt;br /&gt;
* [[KYOSS]]&lt;br /&gt;
* [[KIPCUG]]&lt;br /&gt;
* [[Workshops]]&lt;br /&gt;
* [[Sumobots]] Information and Links&lt;br /&gt;
* Study Groups&lt;br /&gt;
** [[Micro Mondays]]&lt;br /&gt;
** [[Amateur Radio Club]]&lt;br /&gt;
* [[Disturbing Robot Project]]&lt;br /&gt;
* [[Micro-Laser Cutter Project]]&lt;br /&gt;
* [[LVL1 Labs]]&lt;br /&gt;
* [[Sensors Everywhere]]&lt;br /&gt;
&lt;br /&gt;
=== Links ===&lt;br /&gt;
* [http://makezine.com/blog Make magazine blog]&lt;br /&gt;
* [http://instructables.com Instructables]&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; |&lt;br /&gt;
&lt;br /&gt;
=== Calendar ===&lt;br /&gt;
Meetings are at our space every Tuesday at 8pm&amp;lt;br&amp;gt; 814 E Broadway.  [[http://maps.google.com/maps?q=814+e+broadway&amp;amp;oe=utf-8&amp;amp;client=firefox-a&amp;amp;ie=UTF8&amp;amp;hl=en&amp;amp;hq=&amp;amp;hnear=814+E+Broadway,+Louisville%2FJefferson+County,+Jefferson,+Kentucky+40204&amp;amp;z=16 MAP]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;shtml hash=&amp;quot;a659238a976b356bbd893d28cbb72662&amp;quot;&amp;gt;&amp;lt;iframe src=&amp;quot;https://www.google.com/calendar/embed?mode=AGENDA&amp;amp;amp;height=400&amp;amp;amp;wkst=1&amp;amp;amp;bgcolor=%23FFFFFF&amp;amp;amp;src=1n5qvjga6i4t6lde35vq5dg8ds%40group.calendar.google.com&amp;amp;amp;color=%23A32929&amp;amp;amp;ctz=America%2FNew_York&amp;quot; style=&amp;quot; border-width:0 &amp;quot; width=&amp;quot;300&amp;quot; height=&amp;quot;400&amp;quot; frameborder=&amp;quot;0&amp;quot; scrolling=&amp;quot;no&amp;quot;&amp;gt;&amp;lt;/iframe&amp;gt;&amp;lt;/shtml&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Our Space ===&lt;br /&gt;
* 814 E Broadway, entrance in back of the building!&lt;br /&gt;
* [[Cleaning crews]] - who is on what team and when are they responsible&lt;br /&gt;
* [[Cleanup List]] - what needs to be cleaned&lt;br /&gt;
* [[CNC Machine]] - Located in the basement&lt;br /&gt;
* [http://wiki.lvl1.org/Full_Spectrum_Laser Laser Cutter]&lt;br /&gt;
* [[Veruca Gloop]] - 3d printer&lt;br /&gt;
** [[MakerBot Quickstart]] - Get Printing!&lt;br /&gt;
* [[Equipment|Equipment List]]&lt;br /&gt;
* [[Oculus LVL1]]&lt;br /&gt;
&lt;br /&gt;
=== Media ===&lt;br /&gt;
* [[Graphics]]&lt;br /&gt;
* [[t-shirts]] etc.&lt;br /&gt;
* Stickers are at the space&lt;br /&gt;
&lt;br /&gt;
=== Communications ===&lt;br /&gt;
* [http://groups.google.com/group/lvl1 Our Google Group] This is where we do all our talking!  Subscribe to get all the latest by email.&lt;br /&gt;
* [http://www.flickr.com/groups/lvl1/ Our Flickr Group] [[Flickr Slideshow]]&lt;br /&gt;
* [[About this Wiki]]&lt;br /&gt;
&lt;br /&gt;
=== Paper Work ===&lt;br /&gt;
* [[Incorporation]]&lt;br /&gt;
* [[Bylaws]]&lt;br /&gt;
* [[Mission]]&lt;br /&gt;
* [[Waiver]]&lt;br /&gt;
* [[Media:Member_info_form.pdf|Member Info Form]]&lt;br /&gt;
&lt;br /&gt;
=== Our Neighbors ===&lt;br /&gt;
*[http://www.hive13.org/ Hive 13] - Cincinnati, Oh &lt;br /&gt;
*[http://www.daytondiode.org/ Dayton Diode] - Dayton, Oh &lt;br /&gt;
*[http://bloominglabs.org/index.php/Main_Page Bloominglabs] - Bloomington, In &lt;br /&gt;
*[http://collexion.net/wiki/Main_Page Collexion] - Lexington, Ky &lt;br /&gt;
*[http://www.hackerconsortium.com/blog/ Hacker Consortium] - Nashville, Tn&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Ckharnett</name></author>
	</entry>
	<entry>
		<id>http://wiki.lvl1.org/index.php?title=Space_Requirements&amp;diff=332</id>
		<title>Space Requirements</title>
		<link rel="alternate" type="text/html" href="http://wiki.lvl1.org/index.php?title=Space_Requirements&amp;diff=332"/>
		<updated>2010-01-11T20:47:40Z</updated>

		<summary type="html">&lt;p&gt;Ckharnett: Created page with &amp;#039;1. laserLASERlaserLASERlaserLaserLASER&amp;#039;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;1. laserLASERlaserLASERlaserLaserLASER&lt;/div&gt;</summary>
		<author><name>Ckharnett</name></author>
	</entry>
	<entry>
		<id>http://wiki.lvl1.org/index.php?title=Cindy_Harnett&amp;diff=235</id>
		<title>Cindy Harnett</title>
		<link rel="alternate" type="text/html" href="http://wiki.lvl1.org/index.php?title=Cindy_Harnett&amp;diff=235"/>
		<updated>2009-12-27T01:23:20Z</updated>

		<summary type="html">&lt;p&gt;Ckharnett: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Hi all, I am a professor in ECE (Electrical and Computer Engineering) at the University of Louisville. My research area is in micro/nano fabrication, microfluidics and putting it all together with electronics for wireless environmental sensors.&lt;br /&gt;
&lt;br /&gt;
I am excited about LVL1 as a way to bring in new students AND for our students to get hands-on project building experience outside class. &lt;br /&gt;
&lt;br /&gt;
Plus, the creative energy of people in the Louisville area is amazing to behold. If you&#039;re curious about LVL1--no matter your background or experience level--DO attend a meeting! &lt;br /&gt;
&lt;br /&gt;
Here&#039;s my research/teaching web page: [http://www.ece.louisville.edu/c0harn01 Harnett Lab]&lt;br /&gt;
&lt;br /&gt;
Here&#039;s an instructable I did on [http://www.instructables.com/id/DIY-Flexible-Printed-Circuits/ DIY Flex Circuits]&lt;br /&gt;
&lt;br /&gt;
Laser cutters are a wonderful resource I hope we can get for LVL1, but until then, service bureaus like Pololu and Ponoko do a good job. Here&#039;s a [http://www.ponoko.com/showroom/ckharnett/carbon-1194 construction kit] I made that you can download at Ponoko. Lately I have been using these services to make cases for electronic circuits. If anyone local has gone 3D with Shapeways I would enjoy seeing the results at a LVL1 meeting!&lt;/div&gt;</summary>
		<author><name>Ckharnett</name></author>
	</entry>
	<entry>
		<id>http://wiki.lvl1.org/index.php?title=Cindy_Harnett&amp;diff=234</id>
		<title>Cindy Harnett</title>
		<link rel="alternate" type="text/html" href="http://wiki.lvl1.org/index.php?title=Cindy_Harnett&amp;diff=234"/>
		<updated>2009-12-27T01:13:24Z</updated>

		<summary type="html">&lt;p&gt;Ckharnett: Member page: Cindy Harnett&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Hi all, I am a professor in ECE (Electrical and Computer Engineering) at the University of Louisville. &lt;br /&gt;
I am excited about LVL1 as a way to bring in new students AND for our students to get hands-on project building experience outside class. &lt;br /&gt;
&lt;br /&gt;
Plus, the creative energy of people in the Louisville area is amazing to behold. If you&#039;re curious about LVL1--no matter your background or experience level--DO attend a meeting! &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here&#039;s my research web page: [http://www.ece.louisville.edu/c0harn01 Harnett Lab]&lt;/div&gt;</summary>
		<author><name>Ckharnett</name></author>
	</entry>
	<entry>
		<id>http://wiki.lvl1.org/index.php?title=Members&amp;diff=233</id>
		<title>Members</title>
		<link rel="alternate" type="text/html" href="http://wiki.lvl1.org/index.php?title=Members&amp;diff=233"/>
		<updated>2009-12-27T00:55:10Z</updated>

		<summary type="html">&lt;p&gt;Ckharnett: added new member name: Cindy Harnett&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;You can put your information here or feel free to create a page for yourself.&lt;br /&gt;
&lt;br /&gt;
    * [[Brian Wagner]] &lt;br /&gt;
    * [[Mark Endicott]] &lt;br /&gt;
    * [[Sam Troutman]] &lt;br /&gt;
    * [[Todd Chandler]] &lt;br /&gt;
    * [[Christopher Cprek]] &lt;br /&gt;
    * [[Tim Knowlton]]&lt;br /&gt;
    * [[Camron Brooks]] &lt;br /&gt;
    * [[Joe Pugh]]&lt;br /&gt;
    * [[Jennifer Smith]]&lt;br /&gt;
    * [[Becky Gallion]]&lt;br /&gt;
    * [[Gene Wood]]&lt;br /&gt;
    * [[Dave Stocklan]]&lt;br /&gt;
    * [[Dan Stocklan]]&lt;br /&gt;
    * [[Jason McGrew]]&lt;br /&gt;
    * [[Michael Searcy]] &lt;br /&gt;
    * [[Todd Welsh]] &lt;br /&gt;
    * [[Creighton Samuels]] &lt;br /&gt;
    * [[Chris Worth]]  &lt;br /&gt;
    * [[Bill Piepmeyer]]&lt;br /&gt;
    * [[Connor Bell]]&lt;br /&gt;
    * [[Cindy Harnett]]&lt;/div&gt;</summary>
		<author><name>Ckharnett</name></author>
	</entry>
</feed>