Hackster is hosting Hackster Holidays, Ep. 7: Livestream & Giveaway Drawing. Watch previous episodes or stream live on Friday!Stream Hackster Holidays, Ep. 7 on Friday!
Luke Dutton
Published © GPL3+

Basic Arduino Blink Example

Ever wonder how to set up the Arduino? Follow this simple blink tutorial.

BeginnerProtip1 hour1,226
Basic Arduino Blink Example

Things used in this project

Hardware components

Elegoo Mega 2560 R3 Board Blue AT
×1

Software apps and online services

Arduino IDE
Arduino IDE

Story

Read more

Schematics

Arduino 2560 R3

This is the Arduino 2560 R3 with a built-in LED

Code

Basic Blink Sketch

Arduino
This is the basic Blink example code used to turn a light on and off that is on the board
// the setup function runs once when you press reset or power the board
void setup() {
  // initialize digital pin LED_BUILTIN as an output.
  pinMode(LED_BUILTIN, OUTPUT);
}

// the loop function runs over and over again forever
void loop() {
  digitalWrite(LED_BUILTIN, HIGH);   // turn the LED on (HIGH is the voltage level)
  delay(1000);                       // wait for a second
  digitalWrite(LED_BUILTIN, LOW);    // turn the LED off by making the voltage LOW
  delay(1000);                       // wait for a second
}

Credits

Luke Dutton
9 projects • 10 followers
I currently have a BAS in Information Technology with a certificate in Software Application Development

Comments