Arduino: Controlling the Onboard LED: Part 1

Introduction: 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.

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

    • Water Contest

      Water Contest
    • Fix It! Contest

      Fix It! Contest
    • Tiny Home Contest

      Tiny Home Contest

    Discussions

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