Computers, Development Boards & Shields
Educational & Robotics Kits
Electronic Sensors
Motors & Controllers
Communication & Display
Electronic Components
Soldering & Lab Tools

Arduino Compatible Bareduino328: LED Hello World Coding and Wiring Guide

Back to the Bareduino programming guide

Now that you have a working Bareduino, and you have everything prepped for programming, let’s get it ready for the first program; the obligatory hardware equivalent of “Hello World” with an LED.

These are really handy, don't forget to use them!

The Two Steps:

1. Connect an LED between pin 13 and ground as shown in the image below.

2. Program the Chip with the following code:

int myLED = 13;

void setup()
{
Serial.begin(9600);
pinMode(myLED, OUTPUT); //turn myLED pin to output (IMPORTANT!)
digitalWrite(myLED, HIGH); //turn the LED on.
Serial.println(“Hello World, I Live to Serve… Well, I blink at least”);
}

void loop()
{
delay(1000); //delays 1 second (1000 milliseconds)
digitalWrite(myLED, LOW); //turn the LED off.
delay(1000); //delays 1 second (1000 milliseconds)
digitalWrite(myLED, HIGH); //turn the LED on.
}

 

If you follow all of the steps correctly you should set open up your serial monitor and ensure that it is set to 9600 baud, the chip should initially pass you “Hello World”, and then begin blinking once every second.

Back To Top

No comments yet.

Leave a Reply