Description
For this project, I was introducted to Arduino by performing a basic example of a blinking light. I used the example code provided by Arduino and modify the delay time to 100 to get a more rapid blinking effect. I connected a 220-ohm resistor and a LED light in series from port 13 and all the way back to ground. The circuit is powered through the USB port from my macbook.
After the initial setup, I also tried to have all three lights in parallel to if there's enough power in the curcuit. It turned out that there's not suffcient energy but it works fine with two LED lights in parallel.
Components Used
1 - Arduino Uno
1 - 220-ohm Resistor
1 - Breadboard
1- LED Light
Code
/*
Blink
Turns on an LED on for one second, then off for one second, repeatedly.
This example code is in the public domain.
*/
// Pin 13 has an LED connected on most Arduino boards.
// give it a name:
int led = 13;
// the setup routine runs once when you press reset:
void setup() {
// initialize the digital pin as an output.
pinMode(led, OUTPUT);
}
// the loop routine runs over and over again forever:
void loop() {
digitalWrite(led, HIGH); // turn the LED on (HIGH is the voltage level)
delay(100); // wait for tenth of a second
digitalWrite(led, LOW); // turn the LED off by making the voltage LOW
delay(100); // wait for tenth of a second
}
- Login to post comments