This document provides instructions for setting up a test of an LED connected to an Arduino board. It explains that libraries allow code to be reused across sketches to perform specific functions. It then lists the steps to connect an LED to pin 13 and ground on the Arduino, with the positive leg in pin 13 and negative/cathode in ground. Finally, it provides a simple code example to blink the LED by setting pin 13 high and low with a 1000ms delay between each state change.
This document provides instructions for setting up a test of an LED connected to an Arduino board. It explains that libraries allow code to be reused across sketches to perform specific functions. It then lists the steps to connect an LED to pin 13 and ground on the Arduino, with the positive leg in pin 13 and negative/cathode in ground. Finally, it provides a simple code example to blink the LED by setting pin 13 high and low with a 1000ms delay between each state change.
This document provides instructions for setting up a test of an LED connected to an Arduino board. It explains that libraries allow code to be reused across sketches to perform specific functions. It then lists the steps to connect an LED to pin 13 and ground on the Arduino, with the positive leg in pin 13 and negative/cathode in ground. Finally, it provides a simple code example to blink the LED by setting pin 13 high and low with a 1000ms delay between each state change.
Like any program, sketches are a vey strict set of
instructions, and very sensitive to errors.
In the Arduino world, a library is a small piece of code that
carries out a specific function. Rather than enter this same code repeatedly in your sketches, you can add a command that borrrows code from library. Follow these steps to set up your test: Insert the long positive leg (also known as +5v or anodes) of the LED into pin 13 on the Arduino. Connect the short negative leg (cathode) to the GND pin next to pin 13 int led = 13; void setup() { pinMode(led, OUTPUT) } void loop() { digitalWrite(led, HIGH); delay(1000); digitalWrite(led, LOW); delay(1000); }