Arduino, IoT made simple

Lesson 1: Blink

On this, our first lesson on Arduino, we'll make our debut by telling our microprocessor to blink a light in a constant pattern. It's a very simple code that is ideal for beginners to see how their instructions written on a screen can have consequences in the "real world".

For this lesson we'll need our Arduino microprocessor and an LED light (the color is irrelevant). We could even do it with the built in LED of the Arduino board.

Arduino montage

The code:

/*
void setup() {//This action will be executed once
pinMode(13,OUTPUT);//This tells the arduino that it will use its pin number 13 as a digital output.
}
void loop() {//This action will be executed in a loop, perpetually
digitalWrite(13,HIGH);//Turns on the signal sent from the digital output in pin 13.

delay(100);//This tells the arduino to wait for a while (100 milliseconds, to be precise).
digitalWrite(13,LOW);//This turns off the signal sent from the digital output in pin 13
delay(100);//Wait again.
}