When I started connecting my Arduino Uno for first project: LED to pin 13, resistor, breadboard, USB connected to Windows Laptop, the orange on-board LED flashes every second and the LED on the breadboard did the same. What program is driving this? I had NOT uploaded any program. Please explain.
Asked
Active
Viewed 40 times
1 Answers
0
It is a preloaded sketch and will be overwritten when you upload your first sketch into the Arduino.
Typically it's the Arduino Blink sketch which can be found here:
https://www.arduino.cc/en/Tutorial/Blink
Which has the following (functional) content:
// the setup function runs once when you press reset or power the board
void setup() {
// initialize digital pin LED_BUILTIN as an output.
pinMode(LED_BUILTIN, OUTPUT);
}
// the loop function runs over and over again forever
void loop() {
digitalWrite(LED_BUILTIN, HIGH); // turn the LED on (HIGH is the voltage level)
delay(1000); // wait for a second
digitalWrite(LED_BUILTIN, LOW); // turn the LED off by making the voltage LOW
delay(1000); // wait for a second
}
Michel Keijzers
- 13,014
- 7
- 41
- 58