User Tools

Site Tools


tutorials:arduino:controlling_led

Differences

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

Link to this comparison view

tutorials:arduino:controlling_led [2014/02/25 17:56]
sam
tutorials:arduino:controlling_led [2014/03/03 10:13] (current)
allen [Source Code]
Line 3: Line 3:
 <WRAP noprint><​WRAP left box 60%> <WRAP noprint><​WRAP left box 60%>
 //__About this Article__// //__About this Article__//
-  * **Author**: ​xxx --- xxx@cubietech.com --- 2014/02/25 14:41+  * **Author**: ​sam --- sam@cubietech.com --- 2014/02/25 14:41
   * **Copyrights**:​ [[http://​creativecommons.org/​licenses/​by-sa/​3.0/​|CC Attribution-Share Alike 3.0 Unported]]   * **Copyrights**:​ [[http://​creativecommons.org/​licenses/​by-sa/​3.0/​|CC Attribution-Share Alike 3.0 Unported]]
   * **Contributors**:​ [[http://​cubieboard.org/​|Cubieboard Community]] : ...   * **Contributors**:​ [[http://​cubieboard.org/​|Cubieboard Community]] : ...
 </​WRAP></​WRAP>​ </​WRAP></​WRAP>​
- 
-===== Abstract ===== 
- 
  
 ===== Make LED Lights flashing ===== ===== Make LED Lights flashing =====
 +{{:​tutorials:​arduino:​image.jpeg|400}}
 +===== Schematics =====
 +{{:​tutorials:​arduino:​xlzomm.jpg?​500|}}
  
 +===== Steps =====
  
-connect ​arduino ​and led.+1. you should install ​arduino ​idePlease refer to  
 +[[http://​docs.cubieboard.org/​tutorials/​arduino/​connecting|how to connect cubieboard and arduino]]
  
-{{:​tutorials:​arduino:​xlzomm.jpg?300|}}+2connect arduino and led as the Schematics
  
-Use usb to connect arduino and cubieboard .+3. Use usb to connect arduino and cubieboard .
  
-then we can start writing programs in arduino ide.+4. then we can start writing programs in arduino ide.
 we still make LED lights flashing, lit one second turns off one second we still make LED lights flashing, lit one second turns off one second
 +=====Source Code=====
 +
 +    int ledPin = 10;            //Defining Digital Interface 10
 +    void setup()
 +    {
 +    pinMode(ledPin,​ OUTPUT); ​   //​Definition of small lights interface output interface
 +    }
 +    void loop()
 +    {
 +    digitalWrite(ledPin,​ HIGH); //Lit lamp
 +    delay(1000); ​               //Delay 1 second
 +    digitalWrite(ledPin,​ LOW);  //​Extinguish ​ lamp
 +    delay(1000); ​               //Delay 1 second
 +    }
 +    ​
 +
 +
  
-{{:​tutorials:​arduino:​img_20140225_160749.jpg?​300|}} 
  
  
  
-===== Headline ===== 
  
-=== See Also === 
  
 <WRAP noprint> <WRAP noprint>
 {{tag>​Cubieboard Cubietruck}} {{tag>​Cubieboard Cubietruck}}
 </​WRAP>​ </​WRAP>​
tutorials/arduino/controlling_led.1393322172.txt.gz · Last modified: 2014/02/25 17:56 by sam