top of page

ROBOT MAGIC

CHAPTER Two: Getting Started with Arduino

DOWNLOAD THE
FREE ARDUINO SOFTWARE:

Make_RobotMagic_Cover_01jb.jpg
Watercolor Stain
arduinoeyeball.png

/*

  Blink

  Turn on an LED for one second, then off for one 

  second, repeatedly.

 

  This example code is in the public domain.

*/

 

int led = 13;  // “led” can be changed to any name 

 

// the setup routine only runs once

 

void setup() {                

  // Here we set up our “led” digital pin as an output. 

  pinMode(led, OUTPUT);     

}

 

// the loop below runs over and over again 

 

void loop() {

  digitalWrite(led, HIGH);    // turn the LED on 

//(HIGH is the voltage level)

 

  delay(1000);                // wait for a second

 

  digitalWrite(led, LOW);     // turn the LED off by 

// making the voltage LOW

  delay(1000);                // wait for a second

}

Copy + Paste this code to your Arduino Sketch:

bottom of page