Hello World for Arduinos

It is tradition that whenever you learn a new language or turn on a new computer, the first command you send is “hello world”.  It started with Brian Kernighan in 1978 when he introduced the C language.

In Arduino speak, instead of printing the words “hello world” to announce to the world our Arduino is alive, we’re going to give it a heartbeat.

We’re going to make the LED on-board blink like the thump-thump…thump-thump of a heart beat.

Think about how you want the LED to stay on, then off, then on, then off, then a long pause before it starts over again.

Remember to use the Tools/Auto Format trick to clean up your code.

Here is what I wrote to make a heart beat and bring life to my Arduino.

void setup() {
  // put your setup code here, to run once:
  pinMode(13, OUTPUT);
}

void loop() {
  // put your main code here, to run repeatedly:
  digitalWrite(13, HIGH);
  delay(100);
  digitalWrite(13, LOW);
  delay(100);
  digitalWrite(13, HIGH);
  delay(100);
  digitalWrite(13, LOW);
  delay(500);
}