Normally, if we wanted to program an Arduino (or any other computer for that matter) we would have to write some code to tell it what to do. This code has to be written in a very specific way so that the Arduino understands exactly what you want it to do.
This is what the code to blink an LED on and off looks like :
1 void setup()
2 {
3 pinMode(13, OUTPUT); // Set pin 13 up as an output.
4 // Pin 13 has an LED built in.
5 }
6
7 void loop()
8 {
9 digitalWrite(13, HIGH); // turn the LED on (HIGH is the voltage level)
10 delay(1000); // wait for a second
11 digitalWrite(13, LOW); // turn the LED off by making the voltage LOW
12 delay(1000); // wait for a second
13 }
This is a bit of a confusing place to start if you have never done any programming, but luckily for us some clever folks in Spain have made a tool called S4A (or Scratch for Arduino) that let’s us control the Arduino using custom blocks that they have added to Scratch.