User Tools

Site Tools


tutorials:arduino:controlling_led

This is an old revision of the document!


Controlling Led

About this Article

Make LED Lights flashing

400

Schematics

Steps

1. you should install arduino ide. Please refer to how to connect cubieboard and arduino

2. connect arduino and led as the Schematics

3. Use usb to connect arduino and cubieboard .

4. then we can start writing programs in arduino ide. 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/controlling_led.1393812196.txt.gz · Last modified: 2014/03/03 10:03 by allen