User Tools

Site Tools


tutorials:learn:arduino:lesson3.html

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
tutorials:learn:arduino:lesson3.html [2010/10/22 14:48]
daigo
tutorials:learn:arduino:lesson3.html [2010/11/05 20:02]
daigo
Line 12: Line 12:
 |{{  http://​www.ladyada.net/​images/​parts/​clear5mmled_t.jpg?​nolink&​200x85 ​ |}}| \\ LEDs \\ For this lesson, a red, green and blue LED are best. Make sure you get a "​5mm"​ or "​3mm"​ LED, with two legs, as shown in the example image. "​Ultrabright"​ LEDs (1000 mcd rating or higher) are preferred \\ |Any electronics supply store | |{{  http://​www.ladyada.net/​images/​parts/​clear5mmled_t.jpg?​nolink&​200x85 ​ |}}| \\ LEDs \\ For this lesson, a red, green and blue LED are best. Make sure you get a "​5mm"​ or "​3mm"​ LED, with two legs, as shown in the example image. "​Ultrabright"​ LEDs (1000 mcd rating or higher) are preferred \\ |Any electronics supply store |
 |{{ http://​www.ladyada.net/​images/​parts/​resleft_t.gif?​nolink&​61x87 |}}{{ http://​www.ladyada.net/​images/​parts/​rBrown_t.gif?​nolink&​10x87 |}}{{ http://​www.ladyada.net/​images/​parts/​rBlack_t.gif?​nolink&​10x87 |}}{{ http://​www.ladyada.net/​images/​parts/​rRed_t.gif?​nolink&​10x87 |}}{{ http://​www.ladyada.net/​images/​parts/​spacer_t.gif?​nolink&​8x87 |}}{{ http://​www.ladyada.net/​images/​parts/​rGold_t.gif?​nolink&​10x87 |}}{{ http://​www.ladyada.net/​images/​parts/​resright_t.gif?​nolink&​66x87 |}}|Three 1KΩ Resistors (brown black red gold) \\ Any values from 300 Ω to 2KΩ are probably OK. | \\ Any electronics supply store  \\ $1 \\ | |{{ http://​www.ladyada.net/​images/​parts/​resleft_t.gif?​nolink&​61x87 |}}{{ http://​www.ladyada.net/​images/​parts/​rBrown_t.gif?​nolink&​10x87 |}}{{ http://​www.ladyada.net/​images/​parts/​rBlack_t.gif?​nolink&​10x87 |}}{{ http://​www.ladyada.net/​images/​parts/​rRed_t.gif?​nolink&​10x87 |}}{{ http://​www.ladyada.net/​images/​parts/​spacer_t.gif?​nolink&​8x87 |}}{{ http://​www.ladyada.net/​images/​parts/​rGold_t.gif?​nolink&​10x87 |}}{{ http://​www.ladyada.net/​images/​parts/​resright_t.gif?​nolink&​66x87 |}}|Three 1KΩ Resistors (brown black red gold) \\ Any values from 300 Ω to 2KΩ are probably OK. | \\ Any electronics supply store  \\ $1 \\ |
-|{{  http://​www.ladyada.net/​images/​pshield/​miniproto_t.jpg?​nolink&​339x250 ​ |}}|Arduino Prototyping Shield with tiny breadboard ​ \\         | \\ [[http://​www.adafruit.com/​index.php?​main_page=product_info&​cPath=17&​products_id=51|Adafruit ​\\ ]]$15 \\ + \\ [[http://​www.adafruit.com/​index.php?​main_page=product_info&​cPath=18&​products_id=65|Adafruit]]$7.50 \\ |+|{{  http://​www.ladyada.net/​images/​pshield/​miniproto_t.jpg?​nolink&​339x250 ​ |}}|Arduino Prototyping Shield with tiny breadboard ​ \\         | \\ [[http://​www.adafruit.com/​index.php?​main_page=product_info&​cPath=17&​products_id=51|Adafruit]]$15 \\ + \\ [[http://​www.adafruit.com/​index.php?​main_page=product_info&​cPath=18&​products_id=65|Adafruit]]$7.50 \\ |
 |[[http://​www.ladyada.net/​images/​parts/​breadboard-half.jpg|{{ ​ http://​www.ladyada.net/​images/​parts/​breadboard-half.jpg?​nolink&​332x241 ​ |}}]] | \\ Standard solderless breadboard ​ \\ If you dont have a protoshield,​ this is a substitute| \\ [[http://​www.adafruit.com/​index.php?​main_page=product_info&​cPath=18&​products_id=64|Adafruit]] \\ $5 \\ Many hobby shops and electronics stores will have these | |[[http://​www.ladyada.net/​images/​parts/​breadboard-half.jpg|{{ ​ http://​www.ladyada.net/​images/​parts/​breadboard-half.jpg?​nolink&​332x241 ​ |}}]] | \\ Standard solderless breadboard ​ \\ If you dont have a protoshield,​ this is a substitute| \\ [[http://​www.adafruit.com/​index.php?​main_page=product_info&​cPath=18&​products_id=64|Adafruit]] \\ $5 \\ Many hobby shops and electronics stores will have these |
 |{{  http://​www.ladyada.net/​images/​tools/​100ftsolid_t.jpg?​nolink&​150x150 ​ |}}| \\ Hookup Wire \\ Get 22  gauge solid-core wire in red, black and some other color. Make sure its //not// stranded wire! \\ |Any hardware store | |{{  http://​www.ladyada.net/​images/​tools/​100ftsolid_t.jpg?​nolink&​150x150 ​ |}}| \\ Hookup Wire \\ Get 22  gauge solid-core wire in red, black and some other color. Make sure its //not// stranded wire! \\ |Any hardware store |
Line 296: Line 296:
 OK sure you've had plenty of practice messing around with LEDs. It's time to go full color! Find a red, green and blue LED. If you have the Arduino Starter Pack they will be the three clear LEDs. You can't tell which one is which until they are lit so just build the circuit and then rearrange them if needed. ​ OK sure you've had plenty of practice messing around with LEDs. It's time to go full color! Find a red, green and blue LED. If you have the Arduino Starter Pack they will be the three clear LEDs. You can't tell which one is which until they are lit so just build the circuit and then rearrange them if needed. ​
  
-{{  http://​www.ladyada.net/​images/​arduino/​lesson3sch7.jpg?​nolink&​399x262 ​ |}} \\ //Red, green and blue LED schematic//+{{  http://​www.ladyada.net/​images/​arduino/​lesson3sch7.jpg?​nolink&​399x262 ​ |}}  
 +<class center> ​//Red, green and blue LED schematic//</​class>​
  
 In this schematic we will have three LEDs connected to three different pins: #10, #11 and #12. In this schematic we will have three LEDs connected to three different pins: #10, #11 and #12.
Line 322: Line 323:
   digitalWrite(greenPin,​ LOW);    // sets the Green LED off   digitalWrite(greenPin,​ LOW);    // sets the Green LED off
   delay(500); ​                    // waits for half a second   delay(500); ​                    // waits for half a second
-}</​code>​//You can just copy and paste this text into your Arduino software ​window.//+}</​code>​ 
 +<class center>You can just copy and paste this text into your Arduino software ​</class>
  
 **Quick quiz** ​ \\  **Quick quiz** ​ \\ 
Line 355: Line 357:
  
  
-<class white> 
 <​code>​ <​code>​
 void loop() ​                      // run over and over again  void loop() ​                      // run over and over again 
Line 373: Line 374:
  }  }
 </​code>  ​ </​code>  ​
-</​class>​+
  
 ==== Full color adventures! ​ ==== ==== Full color adventures! ​ ====
Line 400: Line 401:
   digitalWrite(greenPin,​ LOW);    // sets the Green LED off   digitalWrite(greenPin,​ LOW);    // sets the Green LED off
   delay(500); ​                    // waits for half a second   delay(500); ​                    // waits for half a second
-}</​code>//​You can just copy and paste this text into your Arduino software window.//+}</code
 +<class center>//You can just copy and paste this text into your Arduino software window.//</​class>​
  
  
Line 428: Line 430:
  
  
-{{ http://​www.ladyada.net/​learn/​proj1/​AdditiveColorMixing.png?​nolink&​236x236 |}} \\ //A additive (light) color mixing diagram// ​    +{{ http://​www.ladyada.net/​learn/​proj1/​AdditiveColorMixing.png?​nolink&​236x236 |}}  
 +<class center>//A additive (light) color mixing diagram// ​    </​class>​
  
  ​According to this diagram, if we have both red and blue light mixed together we should get a violet light. ​     ​  ​According to this diagram, if we have both red and blue light mixed together we should get a violet light. ​     ​
/home/ladyada/public_html/wiki/data/pages/tutorials/learn/arduino/lesson3.html.txt · Last modified: 2016/01/28 18:05 (external edit)