Arduino: Controlling the Onboard LED: Part 1

About: My hobbies are electronics and photography. I have an Arduino which I like to program, and I make stop motion videos with my camera. I also have a great interest in DIY.

Intro: Arduino: Controlling the Onboard LED: Part 1

In this instructable, I will show you how to control the onboard LED on an Arduino.

Step 1: Arduino IDE and the Uno

Step 2: LED

Plug the Arduino in and open the program. Its onboard LED should start blinking. This is normal, as this is the pre-loaded program. Type in or copy the following:

void setup() {
pinMode(LED_BUILTIN, OUTPUT); }

void loop() {

digitalWrite(LED_BUILTIN, LOW); }

Upload the program and the yellow LED should turn off.

Change the LOW to HIGH and the yellow LED should turn on.

Congratulations! you now know how to turn the onboard LED of the Arduino on or off.

Share

    Recommendations

    • Plastics Contest

      Plastics Contest
    • Electronics Tips & Tricks Challenge

      Electronics Tips & Tricks Challenge
    • Audio Contest 2018

      Audio Contest 2018

    Discussions

    0
    None
    Techno_Bot01

    5 months ago

    One thing: The board I have is not the Uno. I have the Mega.