LAB 001
Onboard LED: First Blink
Upload a sketch that switches the LED already on the Uno on and off.
01
What you will build
A one-second on, one-second off built-in LED blink.
Why it matters
The board responds to instructions you write and upload.
What you will learn
- sketch, setup and loop
- digital output and HIGH/LOW
- timing with delay
02
Parts per station
- 1 each An independently programmable Uno R3 per simultaneous station.
- 1 each Availability unconfirmed. One working USB-A to USB-B DATA cable for upload; cable length need not be 10 feet. This canonical item is procurement-only, so existing cable stock must be verified, not assumed.
Station planning and software
Three counted Uno boards support at most three independently programmed concurrent core stations before checking extra kit boards and USB data cables. Five stations unconfirmed.
- Arduino IDE or Arduino CLI with Arduino AVR Boards core; select Arduino Uno and the connected serial port.
Arduino IDE is the only required development environment. Arduino CLI is optional.
03
Assembly
Use only the built-in LED for the core; unplug USB before any later rewiring.
- 01
Connect an Uno with a verified USB data cable; select Arduino Uno and its port.
- 02
Open the core sketch; predict its LED pattern, then verify and upload.
- 03
Watch the onboard LED marked L; change one delay value and upload again.
Predict before you run
- Before upload, will the LED marked L be on continuously or alternate?
- What changes if the first delay doubles?
LED marked L alternates on and off, about one second each.
- Watch two complete on/off cycles.
- Change a delay and confirm the period changes after upload.
04
Code
LED_BUILTIN names the onboard LED pin; OUTPUT lets the sketch drive it.
// Blink the LED already wired onto the Uno.
void setup() {
pinMode(LED_BUILTIN, OUTPUT);
}
void loop() {
digitalWrite(LED_BUILTIN, HIGH);
delay(1000);
digitalWrite(LED_BUILTIN, LOW);
delay(1000);
}
About this version
core · Arduino Uno R3 · beginner
First complete sketch: configure built-in LED and blink.
Same core wiring.
Hardware and wiring for this sketch
- arduino uno r3 · 1 eachAn independently programmable Uno R3 per simultaneous station.
- 10 foot usb a to usb b cable · 1 eachOne working USB-A to USB-B DATA cable for upload; cable length need not be 10 feet. This canonical item is procurement-only, so existing cable stock must be verified, not assumed.
How the code works
Lines 4–4
LED_BUILTIN names the onboard LED pin; OUTPUT lets the sketch drive it.
Sets the pin direction before switching it.
How it works
The board responds to instructions you write and upload.
A digital output changes physical voltage; loop() repeats your instructions.
Experiments & challenges
- Change the on delay only, then restore it.
- Measure roughly how long three complete cycles take.
Scale it up
Try faster, slower, heartbeat and SOS patterns with the same onboard LED; compare repetition with a helper function.
Challenge
Design a recognizable four-flash signal without adding hardware.
Advanced implementation
Open an advanced sketch in the code selector above. Compare its structure, hardware, and annotated lines with the core sketch.
- Named timing variables: Change named timing values in one place.
Check your understanding
Which line tells the board which LED to use?
Why does the pattern repeat without copying loop() repeatedly?
Learning summary
A digital output changes physical voltage; loop() repeats your instructions.
Lab 2 builds the output circuit yourself on a breadboard.
Troubleshooting
No visible blink
Check the LED marked L rather than the power indicator; confirm upload success, board and port.
No upload or no power
Check USB data cable, selected Uno board and serial port; verify the power LED.