<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comments for Making Toys</title>
	<atom:link href="http://makingtoys.net/comments/feed/" rel="self" type="application/rss+xml" />
	<link>http://makingtoys.net</link>
	<description>Art, Play Experience, and Physical Computing</description>
	<lastBuildDate>Thu, 16 Feb 2012 23:24:22 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
	<item>
		<title>Comment on Desert Terrarium by aisencc</title>
		<link>http://makingtoys.net/2012/02/16/desert-terrarium/#comment-805</link>
		<dc:creator><![CDATA[aisencc]]></dc:creator>
		<pubDate>Thu, 16 Feb 2012 23:24:22 +0000</pubDate>
		<guid isPermaLink="false">http://makingtoys.net/?p=5578#comment-805</guid>
		<description><![CDATA[This project was surprising in all aspects. Having left the practice of making projects every week since the brake reminded me that  it is practice that makes perfect. It is important to keep these skills current. The delay threw me off! having to rename it so it can be checked and not interfere with other commands was the most unexpected challenge this project brought to me. Also, I forgot how fun it can be to find beautiful colors rather than have the cycling rainbow effect. This project brought me back to my earthy roots, I am glad to incorporate sand and its other state silicon.]]></description>
		<content:encoded><![CDATA[<p>This project was surprising in all aspects. Having left the practice of making projects every week since the brake reminded me that  it is practice that makes perfect. It is important to keep these skills current. The delay threw me off! having to rename it so it can be checked and not interfere with other commands was the most unexpected challenge this project brought to me. Also, I forgot how fun it can be to find beautiful colors rather than have the cycling rainbow effect. This project brought me back to my earthy roots, I am glad to incorporate sand and its other state silicon.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on EmoBox by ramiroc1</title>
		<link>http://makingtoys.net/2012/02/16/emobox/#comment-804</link>
		<dc:creator><![CDATA[ramiroc1]]></dc:creator>
		<pubDate>Thu, 16 Feb 2012 23:22:28 +0000</pubDate>
		<guid isPermaLink="false">http://makingtoys.net/?p=5570#comment-804</guid>
		<description><![CDATA[1. While I was aware of this, it&#039;s easy to forget how much of the time you spend on a physical computing project comes down to debugging.  Unlike software debugging, where 99.9% of the time the problem is with your code, in physical computing you have to worry about two different problem areas: software and hardware.  This can make debugging a bit fun (it takes you away from the screen), but it can also make debugging super frustrating when things go wrong.
2. Working with 3 LEDs of different colors in a clear box lined with paper, I expected the LEDs to simply blend together to make new colors.  It turns out that diffusing LED light is not as simple as I expected.  Whenever I managed to diffuse the light more thoroughly, it became almost invisible.  I had to settle for a not-quite-diffused light.
3. I&#039;m still making simple mistakes that I did not expect to make.  For example, I put both legs of an LED as well as the ground wire on the same line, so the electricity was just skipping the LED and going straight to the ground wire.  That slowed me down for a few minutes.]]></description>
		<content:encoded><![CDATA[<p>1. While I was aware of this, it&#8217;s easy to forget how much of the time you spend on a physical computing project comes down to debugging.  Unlike software debugging, where 99.9% of the time the problem is with your code, in physical computing you have to worry about two different problem areas: software and hardware.  This can make debugging a bit fun (it takes you away from the screen), but it can also make debugging super frustrating when things go wrong.<br />
2. Working with 3 LEDs of different colors in a clear box lined with paper, I expected the LEDs to simply blend together to make new colors.  It turns out that diffusing LED light is not as simple as I expected.  Whenever I managed to diffuse the light more thoroughly, it became almost invisible.  I had to settle for a not-quite-diffused light.<br />
3. I&#8217;m still making simple mistakes that I did not expect to make.  For example, I put both legs of an LED as well as the ground wire on the same line, so the electricity was just skipping the LED and going straight to the ground wire.  That slowed me down for a few minutes.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on White LED Box by naterudolph</title>
		<link>http://makingtoys.net/2012/02/16/white-led-box/#comment-803</link>
		<dc:creator><![CDATA[naterudolph]]></dc:creator>
		<pubDate>Thu, 16 Feb 2012 23:20:59 +0000</pubDate>
		<guid isPermaLink="false">http://makingtoys.net/?p=5569#comment-803</guid>
		<description><![CDATA[I was out of town til Wednesday this week, so when I found out we had an assignment for Thursday&#039;s class my main concern was just getting something presentable. I was surprised at how quickly I was able to get a working prototype with some cardboard and the wire wrap tool. Thankfully everything was laid out neatly with the header pins so I was able to test the code and ensure there weren&#039;t any short circuits.

The code was actually the portion that took longer than I assumed it might. Making the whole series of LEDs do something was simple enough with a for loop, but trying to do any sort of pattern proved a little more counter intuitive. Using the fade code from Monday&#039;s class I was able to add some variety to that simple sequence of LEDs turning on into something different for the &quot;waking up&quot; function of the box.]]></description>
		<content:encoded><![CDATA[<p>I was out of town til Wednesday this week, so when I found out we had an assignment for Thursday&#8217;s class my main concern was just getting something presentable. I was surprised at how quickly I was able to get a working prototype with some cardboard and the wire wrap tool. Thankfully everything was laid out neatly with the header pins so I was able to test the code and ensure there weren&#8217;t any short circuits.</p>
<p>The code was actually the portion that took longer than I assumed it might. Making the whole series of LEDs do something was simple enough with a for loop, but trying to do any sort of pattern proved a little more counter intuitive. Using the fade code from Monday&#8217;s class I was able to add some variety to that simple sequence of LEDs turning on into something different for the &#8220;waking up&#8221; function of the box.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Assignment 1 Moody &#8220;Cube&#8221; by Amira Pettus</title>
		<link>http://makingtoys.net/2012/02/16/assignment-1-moody-cube/#comment-802</link>
		<dc:creator><![CDATA[Amira Pettus]]></dc:creator>
		<pubDate>Thu, 16 Feb 2012 23:20:16 +0000</pubDate>
		<guid isPermaLink="false">http://makingtoys.net/?p=5572#comment-802</guid>
		<description><![CDATA[1.What was surprising about making your project?

Instead you using multiple separate LEDS I used a single RGB LED, I assumed that the methods for fading and flashing would be almost identical to single LEDS and I was mistaken. I learned that different colors are activated and are visible in different amount and trying to arrive at a single suitable color combination proved to be interesting.I thought it would be simple to come up with switches for transitioning between &quot;moods&quot; but the potentiometer I used is quite finicky. Instead of moving smoothly between each mood it is hard to determine how to be in specific sections of fading,flashing A and flashing B.]]></description>
		<content:encoded><![CDATA[<p>1.What was surprising about making your project?</p>
<p>Instead you using multiple separate LEDS I used a single RGB LED, I assumed that the methods for fading and flashing would be almost identical to single LEDS and I was mistaken. I learned that different colors are activated and are visible in different amount and trying to arrive at a single suitable color combination proved to be interesting.I thought it would be simple to come up with switches for transitioning between &#8220;moods&#8221; but the potentiometer I used is quite finicky. Instead of moving smoothly between each mood it is hard to determine how to be in specific sections of fading,flashing A and flashing B.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on &#8220;Bleep&#8230;Blop&#8221; by christopherkoelsch</title>
		<link>http://makingtoys.net/2012/02/16/bleep-blop/#comment-801</link>
		<dc:creator><![CDATA[christopherkoelsch]]></dc:creator>
		<pubDate>Thu, 16 Feb 2012 23:18:40 +0000</pubDate>
		<guid isPermaLink="false">http://makingtoys.net/?p=5567#comment-801</guid>
		<description><![CDATA[Surprises for this process:  it wasn&#039;t too difficult to get the LED&#039;s working.  Working with Mike Susol, we both had a sense of satisfaction with this revelation especially with the &quot;sleeping&quot; state.  We both hadn&#039;t worked with brightness before.

What was difficult was &quot;perfecting&quot; the project.  Putting &#039;for&#039; loops inside the else, else if statements -- and timing the pauses between the states accurately.  

Taking arduino to the &#039;next&#039; level jumped me to understanding a bit more.  There was an additional satisfaction in making a complete project.  Also, the several ways our code can be written was also seen.

I hadn&#039;t ever seen Arduino as an art medium previously:  I&#039;d always only concentrated on just trying to make the code work.]]></description>
		<content:encoded><![CDATA[<p>Surprises for this process:  it wasn&#8217;t too difficult to get the LED&#8217;s working.  Working with Mike Susol, we both had a sense of satisfaction with this revelation especially with the &#8220;sleeping&#8221; state.  We both hadn&#8217;t worked with brightness before.</p>
<p>What was difficult was &#8220;perfecting&#8221; the project.  Putting &#8216;for&#8217; loops inside the else, else if statements &#8212; and timing the pauses between the states accurately.  </p>
<p>Taking arduino to the &#8216;next&#8217; level jumped me to understanding a bit more.  There was an additional satisfaction in making a complete project.  Also, the several ways our code can be written was also seen.</p>
<p>I hadn&#8217;t ever seen Arduino as an art medium previously:  I&#8217;d always only concentrated on just trying to make the code work.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Josef Ayala-Wake Box by Josef Ayala-Tell Tale Heart Box Iteration 2 and 3. Final Pieces (Hat Piece/Tell Tale Heart). &#124; Making Toys</title>
		<link>http://makingtoys.net/2011/11/26/josef-ayala-wake-box/#comment-750</link>
		<dc:creator><![CDATA[Josef Ayala-Tell Tale Heart Box Iteration 2 and 3. Final Pieces (Hat Piece/Tell Tale Heart). &#124; Making Toys]]></dc:creator>
		<pubDate>Sun, 18 Dec 2011 22:02:30 +0000</pubDate>
		<guid isPermaLink="false">http://makingtoys.net/?p=4963#comment-750</guid>
		<description><![CDATA[[...] Josef Ayala-Wake&#160;Box [...]]]></description>
		<content:encoded><![CDATA[<p>[...] Josef Ayala-Wake&nbsp;Box [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Josef Ayala-Tell Tale Heart Box (Pulse Sensor Project) by Josef Ayala-Tell Tale Heart Box Iteration 2 and 3. Final Pieces (Hat Piece/Tell Tale Heart). &#124; Making Toys</title>
		<link>http://makingtoys.net/2011/12/07/josef-ayala-tell-tale-heart-box-pulse-sensor-project/#comment-749</link>
		<dc:creator><![CDATA[Josef Ayala-Tell Tale Heart Box Iteration 2 and 3. Final Pieces (Hat Piece/Tell Tale Heart). &#124; Making Toys]]></dc:creator>
		<pubDate>Sun, 18 Dec 2011 22:02:26 +0000</pubDate>
		<guid isPermaLink="false">http://makingtoys.net/?p=5071#comment-749</guid>
		<description><![CDATA[[...] Josef Ayala-Tell Tale Heart Box (Pulse Sensor&#160;Project) [...]]]></description>
		<content:encoded><![CDATA[<p>[...] Josef Ayala-Tell Tale Heart Box (Pulse Sensor&nbsp;Project) [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Grove Sound Recorder: PLAY/REC Switching from Manual to Digital by Catalina Cortazar</title>
		<link>http://makingtoys.net/2011/12/05/grove-sound-recorder-playrec-switching-from-manual-to-digital/#comment-742</link>
		<dc:creator><![CDATA[Catalina Cortazar]]></dc:creator>
		<pubDate>Wed, 07 Dec 2011 21:10:35 +0000</pubDate>
		<guid isPermaLink="false">http://makingtoys.wordpress.com/?p=5061#comment-742</guid>
		<description><![CDATA[gracias Aisen!!!]]></description>
		<content:encoded><![CDATA[<p>gracias Aisen!!!</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Searching for the Right Channel by aisencc</title>
		<link>http://makingtoys.net/2011/12/02/searching-for-the-right-channel/#comment-741</link>
		<dc:creator><![CDATA[aisencc]]></dc:creator>
		<pubDate>Tue, 06 Dec 2011 05:54:13 +0000</pubDate>
		<guid isPermaLink="false">http://makingtoys.net/?p=5030#comment-741</guid>
		<description><![CDATA[// Searching for the Right Channel
// By Aisen Caro Chacin 
// With the help of Shawn Lauriat, the LOL shield and IR library developers 

#include   //This is in the Arduino library
#include       // IR remote control library

const int irReceivePin = 14;   // pin connected to IR detector output
IRrecv irrecv(irReceivePin);  // create the IR library
decode_results results;     // IR data goes here

int blinkdelay = 75; //This basically controls brightness. Lower is dimmer
int runspeed = 20;   //smaller = faster

int pin13 =13;
int pin12 =12;
int pin11 =11;
int pin10 =10;
int pin09 =9;
int pin08 =8;
int pin07 =7;
int pin06 =6;
int pin05 =5;
int pin04 =4;
int pin03 =3;
int pin02 =2;

int x=1;
int y=0;

const int pins[] = {
  pin13,pin12,pin11,pin10,pin09,pin08,pin07,pin06,pin05,pin04,pin03,pin02};

const int ledMap[126][2] ={
{pin13, pin05},{pin13, pin06},{pin13, pin07},{pin13, pin08},{pin13, pin09},{pin13, pin10},{pin13, pin11},{pin13, pin12},{pin13, pin04},{pin04, pin13},{pin13, pin03},{pin03, pin13},{pin13, pin02},{pin02, pin13},
{pin12, pin05},{pin12, pin06},{pin12, pin07},{pin12, pin08},{pin12, pin09},{pin12, pin10},{pin12, pin11},{pin12, pin13},{pin12, pin04},{pin04, pin12},{pin12, pin03},{pin03, pin12},{pin12, pin02},{pin02, pin12},
{pin11, pin05},{pin11, pin06},{pin11, pin07},{pin11, pin08},{pin11, pin09},{pin11, pin10},{pin11, pin12},{pin11, pin13},{pin11, pin04},{pin04, pin11},{pin11, pin03},{pin03, pin11},{pin11, pin02},{pin02, pin11},
{pin10, pin05},{pin10, pin06},{pin10, pin07},{pin10, pin08},{pin10, pin09},{pin10, pin11},{pin10, pin12},{pin10, pin13},{pin10, pin04},{pin04, pin10},{pin10, pin03},{pin03, pin10},{pin10, pin02},{pin02, pin10},
{pin09, pin05},{pin09, pin06},{pin09, pin07},{pin09, pin08},{pin09, pin10},{pin09, pin11},{pin09, pin12},{pin09, pin13},{pin09, pin04},{pin04, pin09},{pin09, pin03},{pin03, pin09},{pin09, pin02},{pin02, pin09},
{pin08, pin05},{pin08, pin06},{pin08, pin07},{pin08, pin09},{pin08, pin10},{pin08, pin11},{pin08, pin12},{pin08, pin13},{pin08, pin04},{pin04, pin08},{pin08, pin03},{pin03, pin08},{pin08, pin02},{pin02, pin08},
{pin07, pin05},{pin07, pin06},{pin07, pin08},{pin07, pin09},{pin07, pin10},{pin07, pin11},{pin07, pin12},{pin07, pin13},{pin07, pin04},{pin04, pin07},{pin07, pin03},{pin03, pin07},{pin07, pin02},{pin02, pin07},
{pin06, pin05},{pin06, pin07},{pin06, pin08},{pin06, pin09},{pin06, pin10},{pin06, pin11},{pin06, pin12},{pin06, pin13},{pin06, pin04},{pin04, pin06},{pin06, pin03},{pin03, pin06},{pin06, pin02},{pin02, pin06},
{pin05, pin06},{pin05, pin07},{pin05, pin08},{pin05, pin09},{pin05, pin10},{pin05, pin11},{pin05, pin12},{pin05, pin13},{pin05, pin04},{pin04, pin05},{pin05, pin03},{pin03, pin05},{pin05, pin02},{pin02, pin05}
};

uint16_t BitMap[][9] PROGMEM = {
{0,0,0,0,2048,5120,2048,0,0},
{0,0,0,10752,2048,13824,2048,10752,0},
{0,13696,8320,2560,13696,2560,8320,13696,0},
{4352,9344,2624,4352,9344,2560,9408,12672,6912},
{4352,9344,2624,4352,8320,15232,8384,12672,6912	},
{1024,1536,1280,1152,1088,16352,4224,3840,0},	
{1024,1536,17921920,1024,16320,4224,3860,16383},
{1024,1536,1792,1920,1024,16320,4224,3882,16383},
{512,768,896,960,512,8160,2112,6037,16383},
{256,384,448,480,256,4080,1056,5098,16383},
{128,192,224,240,128,2040,528,4586,16383},
{64,96,112,120,64,1020,8456,13562,16383},
{32,48,56,60,32,8702,12420,14457,16383},
{32,48,56,60,8224,12798,14468,15482,16383},	
{16,24,8220,30,12304,14591,15426,15934,16383},
{8,8204,12302,8207,8200,15487,15905,16286,16383},	
{4,1229,14343,8199,8196,12351,15888,16271,16383},	
{2,6147,15363,12291,12290,14367,16136,16327,16383},
{1,7169,15873,14849,14337,15375,15876,16355,16383},
{0,7680,16128,14592,14336,14343,15362,16129,16383},
{16128,16256,16320,14528,12352,12291,12289,14336,16383},
{7680,16256,16320,16352,15456,14369,14336,14336,16383},
{1920,8128,16352,16352,15920,15520,15456,15872,16383},
{0,1984,4064,7952,15952,16016,15968,16128,16383},
{0,448,2016,4080,7952,16208,16160,16256,16383},
{0,0,960,2016,3984,7984,16256,16376,16383},
{0,0,0,960,1824,4000,8128,16380,16383},
{0,0,0,384,960,2016,4088,16382,16383},
{0,0,0,192,480,1008,2040,16383,16383},	
{0,0,0,0,192,480,1008,2040,16383},
{0,0,0,192,0,192,480,1008,2040},
{0,0,192,0,0,192,480,1008,2040},
{0,288,0,192,0,192,480,1008,2040},
{0,816,192,0,0,192,480,1008,2040},
{0,816,1032,192,0,192,480,1008,2040},
{0,816,1032,192,0,192,480,1008,2040},
{0,528,1224,1032,0,192,480,1008,2040},	
{0,560,1032,1032,528,192,480,1008,2040},
{0,560,1224,1032,528,480,480,1008,2040},
{0,560,1224,1032,528,288,480,1008,2040},
{0,560,1224,1032,528,288,192,1008,2040},
{0,560,2040,1752,528,816,480,192,0},
{0,560,1224,1032,0,528,288,192,0},
{0,560,1224,1032,4092,528,288,192,0},
{0,560,2040,1752,4092,816,0,0,0},
{0,512,1920,1728,3968,768,0,0,0},
{1792,3712,4032,7872,8064,3968,1792,0,8},
{0,1536,1984,1664,3968,768,0,8,28},
{0,1536,3968,3840,7424,1536,8,28,28},
{0,1536,3968,3840,7424,1544,28,28,28},
{0,1536,3968,3840,7448,1564,28,28,62},
{0,1536,3968,3848,7452,1564,28,62,127},
{0,1536,3976,3868,7452,1564,62,127,93},
{0,1544,3996,3868,7452,1598,127,93,8},
{0,1032,3612,3612,1052,62,127,93,8},
{4096,14336,4192,192,2018,4095,2034,192,96},
{4096,14336,4288,384,4066,8183,4066,384,192},
{10240,4096,11264,6144,15873,16251,15889,6144,3072},
{4096,14336,6144,12288,15364,16094,15364,12288,6144},
{10240,4096,14336,8192,14340,16094,14340,8192,12288},
{0,4096,8192,0,12292,15070,12292,0,8192},
{4096,14336,4096,0,8196,14046,8196,0,0},
{4096,14336,4096,0,66,11759,66,0,0},
{0,0,0,0,0,11759,0,0,0},
{18000}
};


// BitMap[9] 
uint16_t grid[] = {
  0, 0, 0, 0, 0, 0, 0, 0, 0
};




void up(){
     Serial.println(&quot;moveUP();&quot;); 
    
    if(y &gt; 0){
      y= y -1;
    }
}

void down(){
      Serial.println(&quot;moveDOWN();&quot;);
      if(y &lt; 8){
      y= y +1;
    }
}

void right(){
      Serial.println(&quot;moveRIGHT();&quot;);
      if(x 1) {
      x /= 2;
    }
}


void menu(){
      Serial.println(&quot;menu();&quot;);
      x=1;
      y= 0;
}

void play(){
      Serial.println(&quot;play();&quot;);
      blinkall(33);
}






void setup() {
  blinkall(2); // useful for testing
  Serial.begin(9600);
  pinMode(irReceivePin, INPUT);
  irrecv.enableIRIn();       // Start the IR receiver
  Serial.println(&quot;Press a remote key&quot;);
}

void turnon(int led) {
  int pospin = ledMap[led][0];
  int negpin = ledMap[led][1];
  pinMode (pospin, OUTPUT);
  pinMode (negpin, OUTPUT);
  digitalWrite (pospin, HIGH);
  digitalWrite (negpin, LOW);
}

void alloff() {
  DDRD = B00000010;
  DDRB = B00000000; 
}

void loop() {
  byte line = 0;
  unsigned long data;
  if (irrecv.decode(&amp;results)) {
    // here if data is received
    irrecv.resume();
    if(results.value == 2011255018){
       up();
    }else if(results.value == 2011246826){
       down();
    }else if(results.value == 2011259114){
       right();
    }else if(results.value == 2011271402){
      left();
    }else if(results.value == 2011283690){
      menu();
    }else if(results.value == 2011275498){
      play();
    }  
  }
  if (x == 2048 &amp;&amp; y == 5) {
    DisplayBitMap();
    y = 0;
  }
  for(line = 0; line &lt; 9; line++){
    if(line == y){ 
    grid[line]= x;
    }else{
    grid[line]= 0;
    }
  } 
  for(int i = 0; i &lt; runspeed; i++)     {
    for(line = 0; line &lt; 9; line++)       {
      data= grid[line];
      for (byte led=0; led&lt;14; ++led) {
        if (data &amp; (1&lt;&lt;led)) {
          turnon((line*14)+led);
          delayMicroseconds(blinkdelay);
          alloff();
        }
        else {
          delayMicroseconds(blinkdelay);
        }
      }
    }     
  }
}

void blinkall(int numblink) {
  alloff();
  for(int n = 0;n &lt; numblink;n++)   {
    if (irrecv.decode(&amp;results)) { // need to call the IR read
      // here if data is received
      irrecv.resume();
      if(results.value == 2011283690){ // this makes the menu button reset if it is stuck on the play loop
        return;
      }
    }
    for(int i = 0; i &lt; runspeed; i++)     {
      for(int j = 0; j &lt; 126; j++)       {
        turnon(j);
        delayMicroseconds(blinkdelay);
        alloff();
      }
    }
    delay(500);
  }
}

void sequenceon() {
  for(int i = 0; i &lt; 126; i++)   {
    turnon(i);
    delay(800);
    alloff();
    delay(800);
  }
}

void DisplayBitMap()
{
  boolean run=true;
  byte frame = 0;
  byte line = 0;
  unsigned long data;
  while(run == true) {
    for(int i = 0; i &lt; runspeed; i++)     {
      for(line = 0; line &lt; 9; line++)       {
        data = pgm_read_word_near (&amp;BitMap[frame][line]);   // fetch data from program memory
        if (data==18000){
          run=false;
        }
        else for (byte led=0; led&lt;14; ++led) {
          if (data &amp; (1&lt;&lt;led)) {
            turnon((line*14)+led);
            delayMicroseconds(blinkdelay);
            alloff();
          }
          else {
            delayMicroseconds(blinkdelay);
          }
        }

      }
             
    } frame++;  
  }
}]]></description>
		<content:encoded><![CDATA[<p>// Searching for the Right Channel<br />
// By Aisen Caro Chacin<br />
// With the help of Shawn Lauriat, the LOL shield and IR library developers </p>
<p>#include   //This is in the Arduino library<br />
#include       // IR remote control library</p>
<p>const int irReceivePin = 14;   // pin connected to IR detector output<br />
IRrecv irrecv(irReceivePin);  // create the IR library<br />
decode_results results;     // IR data goes here</p>
<p>int blinkdelay = 75; //This basically controls brightness. Lower is dimmer<br />
int runspeed = 20;   //smaller = faster</p>
<p>int pin13 =13;<br />
int pin12 =12;<br />
int pin11 =11;<br />
int pin10 =10;<br />
int pin09 =9;<br />
int pin08 =8;<br />
int pin07 =7;<br />
int pin06 =6;<br />
int pin05 =5;<br />
int pin04 =4;<br />
int pin03 =3;<br />
int pin02 =2;</p>
<p>int x=1;<br />
int y=0;</p>
<p>const int pins[] = {<br />
  pin13,pin12,pin11,pin10,pin09,pin08,pin07,pin06,pin05,pin04,pin03,pin02};</p>
<p>const int ledMap[126][2] ={<br />
{pin13, pin05},{pin13, pin06},{pin13, pin07},{pin13, pin08},{pin13, pin09},{pin13, pin10},{pin13, pin11},{pin13, pin12},{pin13, pin04},{pin04, pin13},{pin13, pin03},{pin03, pin13},{pin13, pin02},{pin02, pin13},<br />
{pin12, pin05},{pin12, pin06},{pin12, pin07},{pin12, pin08},{pin12, pin09},{pin12, pin10},{pin12, pin11},{pin12, pin13},{pin12, pin04},{pin04, pin12},{pin12, pin03},{pin03, pin12},{pin12, pin02},{pin02, pin12},<br />
{pin11, pin05},{pin11, pin06},{pin11, pin07},{pin11, pin08},{pin11, pin09},{pin11, pin10},{pin11, pin12},{pin11, pin13},{pin11, pin04},{pin04, pin11},{pin11, pin03},{pin03, pin11},{pin11, pin02},{pin02, pin11},<br />
{pin10, pin05},{pin10, pin06},{pin10, pin07},{pin10, pin08},{pin10, pin09},{pin10, pin11},{pin10, pin12},{pin10, pin13},{pin10, pin04},{pin04, pin10},{pin10, pin03},{pin03, pin10},{pin10, pin02},{pin02, pin10},<br />
{pin09, pin05},{pin09, pin06},{pin09, pin07},{pin09, pin08},{pin09, pin10},{pin09, pin11},{pin09, pin12},{pin09, pin13},{pin09, pin04},{pin04, pin09},{pin09, pin03},{pin03, pin09},{pin09, pin02},{pin02, pin09},<br />
{pin08, pin05},{pin08, pin06},{pin08, pin07},{pin08, pin09},{pin08, pin10},{pin08, pin11},{pin08, pin12},{pin08, pin13},{pin08, pin04},{pin04, pin08},{pin08, pin03},{pin03, pin08},{pin08, pin02},{pin02, pin08},<br />
{pin07, pin05},{pin07, pin06},{pin07, pin08},{pin07, pin09},{pin07, pin10},{pin07, pin11},{pin07, pin12},{pin07, pin13},{pin07, pin04},{pin04, pin07},{pin07, pin03},{pin03, pin07},{pin07, pin02},{pin02, pin07},<br />
{pin06, pin05},{pin06, pin07},{pin06, pin08},{pin06, pin09},{pin06, pin10},{pin06, pin11},{pin06, pin12},{pin06, pin13},{pin06, pin04},{pin04, pin06},{pin06, pin03},{pin03, pin06},{pin06, pin02},{pin02, pin06},<br />
{pin05, pin06},{pin05, pin07},{pin05, pin08},{pin05, pin09},{pin05, pin10},{pin05, pin11},{pin05, pin12},{pin05, pin13},{pin05, pin04},{pin04, pin05},{pin05, pin03},{pin03, pin05},{pin05, pin02},{pin02, pin05}<br />
};</p>
<p>uint16_t BitMap[][9] PROGMEM = {<br />
{0,0,0,0,2048,5120,2048,0,0},<br />
{0,0,0,10752,2048,13824,2048,10752,0},<br />
{0,13696,8320,2560,13696,2560,8320,13696,0},<br />
{4352,9344,2624,4352,9344,2560,9408,12672,6912},<br />
{4352,9344,2624,4352,8320,15232,8384,12672,6912	},<br />
{1024,1536,1280,1152,1088,16352,4224,3840,0},<br />
{1024,1536,17921920,1024,16320,4224,3860,16383},<br />
{1024,1536,1792,1920,1024,16320,4224,3882,16383},<br />
{512,768,896,960,512,8160,2112,6037,16383},<br />
{256,384,448,480,256,4080,1056,5098,16383},<br />
{128,192,224,240,128,2040,528,4586,16383},<br />
{64,96,112,120,64,1020,8456,13562,16383},<br />
{32,48,56,60,32,8702,12420,14457,16383},<br />
{32,48,56,60,8224,12798,14468,15482,16383},<br />
{16,24,8220,30,12304,14591,15426,15934,16383},<br />
{8,8204,12302,8207,8200,15487,15905,16286,16383},<br />
{4,1229,14343,8199,8196,12351,15888,16271,16383},<br />
{2,6147,15363,12291,12290,14367,16136,16327,16383},<br />
{1,7169,15873,14849,14337,15375,15876,16355,16383},<br />
{0,7680,16128,14592,14336,14343,15362,16129,16383},<br />
{16128,16256,16320,14528,12352,12291,12289,14336,16383},<br />
{7680,16256,16320,16352,15456,14369,14336,14336,16383},<br />
{1920,8128,16352,16352,15920,15520,15456,15872,16383},<br />
{0,1984,4064,7952,15952,16016,15968,16128,16383},<br />
{0,448,2016,4080,7952,16208,16160,16256,16383},<br />
{0,0,960,2016,3984,7984,16256,16376,16383},<br />
{0,0,0,960,1824,4000,8128,16380,16383},<br />
{0,0,0,384,960,2016,4088,16382,16383},<br />
{0,0,0,192,480,1008,2040,16383,16383},<br />
{0,0,0,0,192,480,1008,2040,16383},<br />
{0,0,0,192,0,192,480,1008,2040},<br />
{0,0,192,0,0,192,480,1008,2040},<br />
{0,288,0,192,0,192,480,1008,2040},<br />
{0,816,192,0,0,192,480,1008,2040},<br />
{0,816,1032,192,0,192,480,1008,2040},<br />
{0,816,1032,192,0,192,480,1008,2040},<br />
{0,528,1224,1032,0,192,480,1008,2040},<br />
{0,560,1032,1032,528,192,480,1008,2040},<br />
{0,560,1224,1032,528,480,480,1008,2040},<br />
{0,560,1224,1032,528,288,480,1008,2040},<br />
{0,560,1224,1032,528,288,192,1008,2040},<br />
{0,560,2040,1752,528,816,480,192,0},<br />
{0,560,1224,1032,0,528,288,192,0},<br />
{0,560,1224,1032,4092,528,288,192,0},<br />
{0,560,2040,1752,4092,816,0,0,0},<br />
{0,512,1920,1728,3968,768,0,0,0},<br />
{1792,3712,4032,7872,8064,3968,1792,0,8},<br />
{0,1536,1984,1664,3968,768,0,8,28},<br />
{0,1536,3968,3840,7424,1536,8,28,28},<br />
{0,1536,3968,3840,7424,1544,28,28,28},<br />
{0,1536,3968,3840,7448,1564,28,28,62},<br />
{0,1536,3968,3848,7452,1564,28,62,127},<br />
{0,1536,3976,3868,7452,1564,62,127,93},<br />
{0,1544,3996,3868,7452,1598,127,93,8},<br />
{0,1032,3612,3612,1052,62,127,93,8},<br />
{4096,14336,4192,192,2018,4095,2034,192,96},<br />
{4096,14336,4288,384,4066,8183,4066,384,192},<br />
{10240,4096,11264,6144,15873,16251,15889,6144,3072},<br />
{4096,14336,6144,12288,15364,16094,15364,12288,6144},<br />
{10240,4096,14336,8192,14340,16094,14340,8192,12288},<br />
{0,4096,8192,0,12292,15070,12292,0,8192},<br />
{4096,14336,4096,0,8196,14046,8196,0,0},<br />
{4096,14336,4096,0,66,11759,66,0,0},<br />
{0,0,0,0,0,11759,0,0,0},<br />
{18000}<br />
};</p>
<p>// BitMap[9]<br />
uint16_t grid[] = {<br />
  0, 0, 0, 0, 0, 0, 0, 0, 0<br />
};</p>
<p>void up(){<br />
     Serial.println(&#8220;moveUP();&#8221;); </p>
<p>    if(y &gt; 0){<br />
      y= y -1;<br />
    }<br />
}</p>
<p>void down(){<br />
      Serial.println(&#8220;moveDOWN();&#8221;);<br />
      if(y &lt; 8){<br />
      y= y +1;<br />
    }<br />
}</p>
<p>void right(){<br />
      Serial.println(&quot;moveRIGHT();&quot;);<br />
      if(x 1) {<br />
      x /= 2;<br />
    }<br />
}</p>
<p>void menu(){<br />
      Serial.println(&#8220;menu();&#8221;);<br />
      x=1;<br />
      y= 0;<br />
}</p>
<p>void play(){<br />
      Serial.println(&#8220;play();&#8221;);<br />
      blinkall(33);<br />
}</p>
<p>void setup() {<br />
  blinkall(2); // useful for testing<br />
  Serial.begin(9600);<br />
  pinMode(irReceivePin, INPUT);<br />
  irrecv.enableIRIn();       // Start the IR receiver<br />
  Serial.println(&#8220;Press a remote key&#8221;);<br />
}</p>
<p>void turnon(int led) {<br />
  int pospin = ledMap[led][0];<br />
  int negpin = ledMap[led][1];<br />
  pinMode (pospin, OUTPUT);<br />
  pinMode (negpin, OUTPUT);<br />
  digitalWrite (pospin, HIGH);<br />
  digitalWrite (negpin, LOW);<br />
}</p>
<p>void alloff() {<br />
  DDRD = B00000010;<br />
  DDRB = B00000000;<br />
}</p>
<p>void loop() {<br />
  byte line = 0;<br />
  unsigned long data;<br />
  if (irrecv.decode(&amp;results)) {<br />
    // here if data is received<br />
    irrecv.resume();<br />
    if(results.value == 2011255018){<br />
       up();<br />
    }else if(results.value == 2011246826){<br />
       down();<br />
    }else if(results.value == 2011259114){<br />
       right();<br />
    }else if(results.value == 2011271402){<br />
      left();<br />
    }else if(results.value == 2011283690){<br />
      menu();<br />
    }else if(results.value == 2011275498){<br />
      play();<br />
    }<br />
  }<br />
  if (x == 2048 &amp;&amp; y == 5) {<br />
    DisplayBitMap();<br />
    y = 0;<br />
  }<br />
  for(line = 0; line &lt; 9; line++){<br />
    if(line == y){<br />
    grid[line]= x;<br />
    }else{<br />
    grid[line]= 0;<br />
    }<br />
  }<br />
  for(int i = 0; i &lt; runspeed; i++)     {<br />
    for(line = 0; line &lt; 9; line++)       {<br />
      data= grid[line];<br />
      for (byte led=0; led&lt;14; ++led) {<br />
        if (data &amp; (1&lt;&lt;led)) {<br />
          turnon((line*14)+led);<br />
          delayMicroseconds(blinkdelay);<br />
          alloff();<br />
        }<br />
        else {<br />
          delayMicroseconds(blinkdelay);<br />
        }<br />
      }<br />
    }<br />
  }<br />
}</p>
<p>void blinkall(int numblink) {<br />
  alloff();<br />
  for(int n = 0;n &lt; numblink;n++)   {<br />
    if (irrecv.decode(&amp;results)) { // need to call the IR read<br />
      // here if data is received<br />
      irrecv.resume();<br />
      if(results.value == 2011283690){ // this makes the menu button reset if it is stuck on the play loop<br />
        return;<br />
      }<br />
    }<br />
    for(int i = 0; i &lt; runspeed; i++)     {<br />
      for(int j = 0; j &lt; 126; j++)       {<br />
        turnon(j);<br />
        delayMicroseconds(blinkdelay);<br />
        alloff();<br />
      }<br />
    }<br />
    delay(500);<br />
  }<br />
}</p>
<p>void sequenceon() {<br />
  for(int i = 0; i &lt; 126; i++)   {<br />
    turnon(i);<br />
    delay(800);<br />
    alloff();<br />
    delay(800);<br />
  }<br />
}</p>
<p>void DisplayBitMap()<br />
{<br />
  boolean run=true;<br />
  byte frame = 0;<br />
  byte line = 0;<br />
  unsigned long data;<br />
  while(run == true) {<br />
    for(int i = 0; i &lt; runspeed; i++)     {<br />
      for(line = 0; line &lt; 9; line++)       {<br />
        data = pgm_read_word_near (&amp;BitMap[frame][line]);   // fetch data from program memory<br />
        if (data==18000){<br />
          run=false;<br />
        }<br />
        else for (byte led=0; led&lt;14; ++led) {<br />
          if (data &amp; (1&lt;&lt;led)) {<br />
            turnon((line*14)+led);<br />
            delayMicroseconds(blinkdelay);<br />
            alloff();<br />
          }<br />
          else {<br />
            delayMicroseconds(blinkdelay);<br />
          }<br />
        }</p>
<p>      }</p>
<p>    } frame++;<br />
  }<br />
}</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on LoL Shield, Soldering and Testing by josefayala</title>
		<link>http://makingtoys.net/2011/11/06/lol-shield-soldering-and-testing/#comment-700</link>
		<dc:creator><![CDATA[josefayala]]></dc:creator>
		<pubDate>Mon, 07 Nov 2011 18:31:26 +0000</pubDate>
		<guid isPermaLink="false">http://makingtoys.net/?p=4772#comment-700</guid>
		<description><![CDATA[I believe there might be a problem with that sketch- just because of the name...I tried correcting it but it would not let me.
What do you suggest?]]></description>
		<content:encoded><![CDATA[<p>I believe there might be a problem with that sketch- just because of the name&#8230;I tried correcting it but it would not let me.<br />
What do you suggest?</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on R2D2 Pumpkin!!!! Amazing by rachel</title>
		<link>http://makingtoys.net/2011/10/20/r2d2-pumpkin-amazing/#comment-669</link>
		<dc:creator><![CDATA[rachel]]></dc:creator>
		<pubDate>Fri, 21 Oct 2011 04:50:49 +0000</pubDate>
		<guid isPermaLink="false">http://makingtoys.net/?p=4621#comment-669</guid>
		<description><![CDATA[okay that makes america&#039;s obsession with halloween 100x cooler!!!!!!]]></description>
		<content:encoded><![CDATA[<p>okay that makes america&#8217;s obsession with halloween 100x cooler!!!!!!</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Arduino Cookbook Reading/Homework by aisencc</title>
		<link>http://makingtoys.net/2011/10/08/reading-homework-from-arduino-cookbook/#comment-662</link>
		<dc:creator><![CDATA[aisencc]]></dc:creator>
		<pubDate>Fri, 14 Oct 2011 17:02:59 +0000</pubDate>
		<guid isPermaLink="false">http://makingtoys.net/?p=4524#comment-662</guid>
		<description><![CDATA[10/14 Reading Assignment Response
The easiest sections from the readings were the Arrays Introduced and Logical Operators. Both of these sections are reviews to the Processing and Arduino IDEs. Both of these sections seemed a bit redundant, since it is crucial to know these in order to create any functions or when working with a variety of pins that are programmed to do similar things. For the homework assignment I used both of these methods in structuring my code. Every time I use these 

The most challenging chapters were Determining How Long a Switch is Pressed and Knight Rider. These are not necessarily hard to understand, but more dense than the practical sections I mentioned above. The Knight Rider was not complicated, but it was dense. Understanding arrays makes this section easy, because the use of for loops with the right amount of delay HIGH and LOW patterns is what makes the LED pins blink one at a time. Determining How Long a Switch is Pressed was the most challenging section of the homework because it introduces a counter and functions. I am still having to read it over and over again, to try to understand exactly what it&#039;s doing.]]></description>
		<content:encoded><![CDATA[<p>10/14 Reading Assignment Response<br />
The easiest sections from the readings were the Arrays Introduced and Logical Operators. Both of these sections are reviews to the Processing and Arduino IDEs. Both of these sections seemed a bit redundant, since it is crucial to know these in order to create any functions or when working with a variety of pins that are programmed to do similar things. For the homework assignment I used both of these methods in structuring my code. Every time I use these </p>
<p>The most challenging chapters were Determining How Long a Switch is Pressed and Knight Rider. These are not necessarily hard to understand, but more dense than the practical sections I mentioned above. The Knight Rider was not complicated, but it was dense. Understanding arrays makes this section easy, because the use of for loops with the right amount of delay HIGH and LOW patterns is what makes the LED pins blink one at a time. Determining How Long a Switch is Pressed was the most challenging section of the homework because it introduces a counter and functions. I am still having to read it over and over again, to try to understand exactly what it&#8217;s doing.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Arduino Cookbook Reading/Homework by josefayala</title>
		<link>http://makingtoys.net/2011/10/08/reading-homework-from-arduino-cookbook/#comment-661</link>
		<dc:creator><![CDATA[josefayala]]></dc:creator>
		<pubDate>Fri, 14 Oct 2011 16:33:25 +0000</pubDate>
		<guid isPermaLink="false">http://makingtoys.net/?p=4524#comment-661</guid>
		<description><![CDATA[I liked the vast majority of the tutorials. My favorite was Arrays because in the past I have not been able to properly execute them. There is something gratifying about making 100 ellipses with 3-4 lines of code (otherwise we&#039;d have to hard code each ellipse). With regards to Arduino work it&#039;s nice to know that I can call on a group of pins for one purpose by simply calling an array. What I was surprised to find out is that the array can hold a string of characters. I found that character strings are good possibly for Serial Monitor work. Functions were also a good time, and it was good to get a good look at the use of parameters and returns.

Switch statements can be difficult, but overall the concept is well embedded into my mind. I understand the importance of using breaks within a switch command but kind of miss the logic of setting it up with what seem to be all the arguments wrapped between the switch (I guess from the purpose of switching). Is it comparable to an array ? Who knows...I guess I have to re-read it.

-josef]]></description>
		<content:encoded><![CDATA[<p>I liked the vast majority of the tutorials. My favorite was Arrays because in the past I have not been able to properly execute them. There is something gratifying about making 100 ellipses with 3-4 lines of code (otherwise we&#8217;d have to hard code each ellipse). With regards to Arduino work it&#8217;s nice to know that I can call on a group of pins for one purpose by simply calling an array. What I was surprised to find out is that the array can hold a string of characters. I found that character strings are good possibly for Serial Monitor work. Functions were also a good time, and it was good to get a good look at the use of parameters and returns.</p>
<p>Switch statements can be difficult, but overall the concept is well embedded into my mind. I understand the importance of using breaks within a switch command but kind of miss the logic of setting it up with what seem to be all the arguments wrapped between the switch (I guess from the purpose of switching). Is it comparable to an array ? Who knows&#8230;I guess I have to re-read it.</p>
<p>-josef</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Arduino Cookbook Reading/Homework by litchirhythm</title>
		<link>http://makingtoys.net/2011/10/08/reading-homework-from-arduino-cookbook/#comment-659</link>
		<dc:creator><![CDATA[litchirhythm]]></dc:creator>
		<pubDate>Fri, 14 Oct 2011 16:29:08 +0000</pubDate>
		<guid isPermaLink="false">http://makingtoys.net/?p=4524#comment-659</guid>
		<description><![CDATA[● The most useful exercise would be 5.4, the switch timer, for sure. It shows how to use timing (millis() function) to count how long you push the button and make led lit up in relative amount of time.

And the other one that is interesting is 2.16 on the &#039;switch&#039; logical command which I never know before. It function can be written with a long list of if statement but switch can be really handy on another person (or yourself) to read and understand the code much easier.

● The most difficult would also be the 5.4, the switch timer, since the first homework assignment is to tweak this one to make it blink. So I have to know this code inside out to be able to tweak it. In it, I have to apply the concept of custom function that count the time and return the data back to the main loop (the concept from 2.10 the function block), It&#039;s like a wrap up of all exercises. 

Another thing that I find most difficult is Array (2.4). Even we have saw some of them on the example we work on. But to read and understand all of the concept and remember the syntax so that I can think and make it to work in the way I want is still hard. Because you&#039;ll have to use a for loop to run the arrays all the time. But I think I understand it much more now.]]></description>
		<content:encoded><![CDATA[<p>● The most useful exercise would be 5.4, the switch timer, for sure. It shows how to use timing (millis() function) to count how long you push the button and make led lit up in relative amount of time.</p>
<p>And the other one that is interesting is 2.16 on the &#8216;switch&#8217; logical command which I never know before. It function can be written with a long list of if statement but switch can be really handy on another person (or yourself) to read and understand the code much easier.</p>
<p>● The most difficult would also be the 5.4, the switch timer, since the first homework assignment is to tweak this one to make it blink. So I have to know this code inside out to be able to tweak it. In it, I have to apply the concept of custom function that count the time and return the data back to the main loop (the concept from 2.10 the function block), It&#8217;s like a wrap up of all exercises. </p>
<p>Another thing that I find most difficult is Array (2.4). Even we have saw some of them on the example we work on. But to read and understand all of the concept and remember the syntax so that I can think and make it to work in the way I want is still hard. Because you&#8217;ll have to use a for loop to run the arrays all the time. But I think I understand it much more now.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Arduino Cookbook Reading/Homework by dss49</title>
		<link>http://makingtoys.net/2011/10/08/reading-homework-from-arduino-cookbook/#comment-658</link>
		<dc:creator><![CDATA[dss49]]></dc:creator>
		<pubDate>Fri, 14 Oct 2011 16:28:56 +0000</pubDate>
		<guid isPermaLink="false">http://makingtoys.net/?p=4524#comment-658</guid>
		<description><![CDATA[debouncing was helpful as well.. making sure both readings of the input were consistent.]]></description>
		<content:encoded><![CDATA[<p>debouncing was helpful as well.. making sure both readings of the input were consistent.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Arduino Cookbook Reading/Homework by jasonkim1006</title>
		<link>http://makingtoys.net/2011/10/08/reading-homework-from-arduino-cookbook/#comment-657</link>
		<dc:creator><![CDATA[jasonkim1006]]></dc:creator>
		<pubDate>Fri, 14 Oct 2011 16:27:45 +0000</pubDate>
		<guid isPermaLink="false">http://makingtoys.net/?p=4524#comment-657</guid>
		<description><![CDATA[1. Which two exercises or code did you find most useful or valuable from the reading? Be as specific as possible.

a) The first code I found to be very useful was the case / break code. It was really interesting to get input from the serial monitor and make the LED blink.
  if(Serial.available()){
    char ch = Serial.read();
    switch(ch){
    case &#039;1&#039;:
      Serial.println(&quot;blink once!&quot;);
      for(int i = 0; i&lt;4; i++){
        myBlink(i,70);
      }

Using default, we can set the default input and by using the switch case, we can use any key on the keyboard to create an input and make, for example, an LED blink sequence. Just by using the case &#039;1&#039;:, case &#039;2&#039;:, etc. we can determine how many different types of sequences we want.

b) The second code I found very useful were using logical operators such as and (&amp;&amp;), or (&#124;&#124;), and not (!). By using logical operators, we can determine diverse situations such as if both switches are pressed, both the switch and the tilt sensor are sending input, either the first button or the last button is pressed, etc. By including logical operators, there can be so many different types of situations with just four buttons. Instead of making one button do one thing, we can make a combination of one, two, three, or four buttons to something else. The logical operators are also good for setting up boundaries or giving certain conditions to inputs. 

2.Which two exercises or code did you find most difficult or confusing from the reading? Be as specific as possible.

a) The first code that was really difficult to understand was calculating the amount of time using the switchTime() function. It was really hard to understand because whenever I tried it, the counter would increase rapidly or even decrease to a high negative number. I want to try using the &quot;long&quot; and &quot;millis()&quot; more so that I can understand its concept better. Because we used pullup resistors inside the Arduino, the HIGH and LOW was also a bit confusing to understand. The state should be inverted when using different resistors. 

long switchTime(){ 
  static unsigned long startTime = 0;
  static boolean state; 

  if(digitalRead(inPin) != state){ 
    state =! state; 
    startTime = millis(); 
  }
  if(state == LOW){
    return millis() - startTime;
  }
  else{
    return 0;
  }
}

b) Related with the switchTime() function is the debounce code. It took me a long time to understand the debounce code by using booleans of state and previousState. I think it was especially hard to understand because the debounce does not actually give direct feedback. Switch codes worked without having to use the debounce code and therefore it was at first hard to understand what &quot;debouncing&quot; actually did to my code. Later did I find out it was just a check for a few milliseconds to see if the button was stable enough to input and output information. It was a comparison between the current state and previousState and to see if they were equal.]]></description>
		<content:encoded><![CDATA[<p>1. Which two exercises or code did you find most useful or valuable from the reading? Be as specific as possible.</p>
<p>a) The first code I found to be very useful was the case / break code. It was really interesting to get input from the serial monitor and make the LED blink.<br />
  if(Serial.available()){<br />
    char ch = Serial.read();<br />
    switch(ch){<br />
    case &#8217;1&#8242;:<br />
      Serial.println(&#8220;blink once!&#8221;);<br />
      for(int i = 0; i&lt;4; i++){<br />
        myBlink(i,70);<br />
      }</p>
<p>Using default, we can set the default input and by using the switch case, we can use any key on the keyboard to create an input and make, for example, an LED blink sequence. Just by using the case &#039;1&#039;:, case &#039;2&#039;:, etc. we can determine how many different types of sequences we want.</p>
<p>b) The second code I found very useful were using logical operators such as and (&amp;&amp;), or (||), and not (!). By using logical operators, we can determine diverse situations such as if both switches are pressed, both the switch and the tilt sensor are sending input, either the first button or the last button is pressed, etc. By including logical operators, there can be so many different types of situations with just four buttons. Instead of making one button do one thing, we can make a combination of one, two, three, or four buttons to something else. The logical operators are also good for setting up boundaries or giving certain conditions to inputs. </p>
<p>2.Which two exercises or code did you find most difficult or confusing from the reading? Be as specific as possible.</p>
<p>a) The first code that was really difficult to understand was calculating the amount of time using the switchTime() function. It was really hard to understand because whenever I tried it, the counter would increase rapidly or even decrease to a high negative number. I want to try using the &quot;long&quot; and &quot;millis()&quot; more so that I can understand its concept better. Because we used pullup resistors inside the Arduino, the HIGH and LOW was also a bit confusing to understand. The state should be inverted when using different resistors. </p>
<p>long switchTime(){<br />
  static unsigned long startTime = 0;<br />
  static boolean state; </p>
<p>  if(digitalRead(inPin) != state){<br />
    state =! state;<br />
    startTime = millis();<br />
  }<br />
  if(state == LOW){<br />
    return millis() &#8211; startTime;<br />
  }<br />
  else{<br />
    return 0;<br />
  }<br />
}</p>
<p>b) Related with the switchTime() function is the debounce code. It took me a long time to understand the debounce code by using booleans of state and previousState. I think it was especially hard to understand because the debounce does not actually give direct feedback. Switch codes worked without having to use the debounce code and therefore it was at first hard to understand what &quot;debouncing&quot; actually did to my code. Later did I find out it was just a check for a few milliseconds to see if the button was stable enough to input and output information. It was a comparison between the current state and previousState and to see if they were equal.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Arduino Cookbook Reading/Homework by Aneta Genova</title>
		<link>http://makingtoys.net/2011/10/08/reading-homework-from-arduino-cookbook/#comment-656</link>
		<dc:creator><![CDATA[Aneta Genova]]></dc:creator>
		<pubDate>Fri, 14 Oct 2011 16:27:26 +0000</pubDate>
		<guid isPermaLink="false">http://makingtoys.net/?p=4524#comment-656</guid>
		<description><![CDATA[I found most useful the array reading and exercise.It makes working with many variables extremely easy and certainly shortens the code. I developed a project about bouncing animals in a field and the array list was the easiest way to do them.

I found very easy the functions reading and exercise. The first exercise about blinking and delay was very familiar to sketches we&#039;ve done in class.

I found challenging the logical operators and logical comparisons and I definitely get confused when we get to compare strings. I was not able to do that assignment.]]></description>
		<content:encoded><![CDATA[<p>I found most useful the array reading and exercise.It makes working with many variables extremely easy and certainly shortens the code. I developed a project about bouncing animals in a field and the array list was the easiest way to do them.</p>
<p>I found very easy the functions reading and exercise. The first exercise about blinking and delay was very familiar to sketches we&#8217;ve done in class.</p>
<p>I found challenging the logical operators and logical comparisons and I definitely get confused when we get to compare strings. I was not able to do that assignment.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Arduino Cookbook Reading/Homework by mrcansler</title>
		<link>http://makingtoys.net/2011/10/08/reading-homework-from-arduino-cookbook/#comment-655</link>
		<dc:creator><![CDATA[mrcansler]]></dc:creator>
		<pubDate>Fri, 14 Oct 2011 16:27:19 +0000</pubDate>
		<guid isPermaLink="false">http://makingtoys.net/?p=4524#comment-655</guid>
		<description><![CDATA[The two readings I found most interesting were 2.10 (Functions), and 2.19 (Logical Operators).  Until this point, I was unaware that functions even existed within this programming environment, and they appear to be a useful resource when constructing larger sections of code later.  The logical operators sections was useful, as they are actually very basic concepts, but I was not particularly familiar with these basics.  Still feel like I&#039;m playing catchup with Syntax.

I had some difficulty with arrays, as I feel like I completely get them structurally, but whenever I try to implement them I always seem to mess up the for loops associated with counting through them.  I&#039;m also having a bit of trouble digesting 2.16 &quot;Switch&quot;, and figuring out when to use these vs if/else statements.  Is there a specific number of inputs before it&#039;s best to use SwitchCase?]]></description>
		<content:encoded><![CDATA[<p>The two readings I found most interesting were 2.10 (Functions), and 2.19 (Logical Operators).  Until this point, I was unaware that functions even existed within this programming environment, and they appear to be a useful resource when constructing larger sections of code later.  The logical operators sections was useful, as they are actually very basic concepts, but I was not particularly familiar with these basics.  Still feel like I&#8217;m playing catchup with Syntax.</p>
<p>I had some difficulty with arrays, as I feel like I completely get them structurally, but whenever I try to implement them I always seem to mess up the for loops associated with counting through them.  I&#8217;m also having a bit of trouble digesting 2.16 &#8220;Switch&#8221;, and figuring out when to use these vs if/else statements.  Is there a specific number of inputs before it&#8217;s best to use SwitchCase?</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Arduino Cookbook Reading/Homework by yonglee2011</title>
		<link>http://makingtoys.net/2011/10/08/reading-homework-from-arduino-cookbook/#comment-654</link>
		<dc:creator><![CDATA[yonglee2011]]></dc:creator>
		<pubDate>Fri, 14 Oct 2011 16:27:11 +0000</pubDate>
		<guid isPermaLink="false">http://makingtoys.net/?p=4524#comment-654</guid>
		<description><![CDATA[Two Exercise that I like or helpful:
The custom function for different Blinks are good sample of diverse options we can use. I wish the codes are more detailed, so it is easy to follow on the Arduino. I type the code from the book, but the code didn&#039;t work.

Conditional section show diverse conditional options. But I wish the conditional section has more sample codes.



Difficult exercise:

There are some samples of using arrays. I played with Arrays, and wish there are more samples to look up. I found the book is helpful, but it seems it doesn&#039;t have depth details. 

I really like what While and For Loop do, and wish there are more exercise to help a stater to understand the concepts and samples.]]></description>
		<content:encoded><![CDATA[<p>Two Exercise that I like or helpful:<br />
The custom function for different Blinks are good sample of diverse options we can use. I wish the codes are more detailed, so it is easy to follow on the Arduino. I type the code from the book, but the code didn&#8217;t work.</p>
<p>Conditional section show diverse conditional options. But I wish the conditional section has more sample codes.</p>
<p>Difficult exercise:</p>
<p>There are some samples of using arrays. I played with Arrays, and wish there are more samples to look up. I found the book is helpful, but it seems it doesn&#8217;t have depth details. </p>
<p>I really like what While and For Loop do, and wish there are more exercise to help a stater to understand the concepts and samples.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Arduino Cookbook Reading/Homework by dss49</title>
		<link>http://makingtoys.net/2011/10/08/reading-homework-from-arduino-cookbook/#comment-653</link>
		<dc:creator><![CDATA[dss49]]></dc:creator>
		<pubDate>Fri, 14 Oct 2011 16:26:07 +0000</pubDate>
		<guid isPermaLink="false">http://makingtoys.net/?p=4524#comment-653</guid>
		<description><![CDATA[I guess I neglected some of the reading although I found a very helpful tutorial online that sort of walked me through basic input/output using buttons and LED&#039;s.  (I&#039;ll be sure to stay on top of it in the future). The link can be found at http://www.ladyada.net/learn/arduino/lesson5.html.

Essentially they create a problem set starting with basic switch functions... helping build the code ground up for recognizing change in state and output controls. Towards the end they give you a series of problems involving a Bike company that needs help programming a new lighting system. The various stages of the prompt test your abilities and end with the creation of a light system which has 4-5 separate modes activated by the button. This piecemeal way of learning was personally very helpful.

There were a number of other tutorials that I found helpful, one of which explained the use of millis() instead of delay().  By using millis() as a timer instead of delay(), one is able to nest other functionality within conditionals that otherwise would not be able to run with delay() since delay() stops all processes within the Arduino. A notable example would be having one LED blink 500ms after another has started blinking, creating a sort of Lag effect.  Using delay() would prevent you from activating another LED while the former is being delayed.  Another use of millis() was creating a stopwatch which blinks as a timer begins... the push of a button turns the timer off, the start and end times are calculated as Serial.println spits out the time.]]></description>
		<content:encoded><![CDATA[<p>I guess I neglected some of the reading although I found a very helpful tutorial online that sort of walked me through basic input/output using buttons and LED&#8217;s.  (I&#8217;ll be sure to stay on top of it in the future). The link can be found at <a href="http://www.ladyada.net/learn/arduino/lesson5.html" rel="nofollow">http://www.ladyada.net/learn/arduino/lesson5.html</a>.</p>
<p>Essentially they create a problem set starting with basic switch functions&#8230; helping build the code ground up for recognizing change in state and output controls. Towards the end they give you a series of problems involving a Bike company that needs help programming a new lighting system. The various stages of the prompt test your abilities and end with the creation of a light system which has 4-5 separate modes activated by the button. This piecemeal way of learning was personally very helpful.</p>
<p>There were a number of other tutorials that I found helpful, one of which explained the use of millis() instead of delay().  By using millis() as a timer instead of delay(), one is able to nest other functionality within conditionals that otherwise would not be able to run with delay() since delay() stops all processes within the Arduino. A notable example would be having one LED blink 500ms after another has started blinking, creating a sort of Lag effect.  Using delay() would prevent you from activating another LED while the former is being delayed.  Another use of millis() was creating a stopwatch which blinks as a timer begins&#8230; the push of a button turns the timer off, the start and end times are calculated as Serial.println spits out the time.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

