Session 2: The Uno and a first reliable upload
Learning outcomes
- Identify the Uno's power, digital, PWM and analogue pins and their limits
- Select the board and port in Arduino IDE 2 and upload reliably
- Change the Blink sketch and predict the effect
- Read the first compiler error and fix the line it points to
Kit and components
- Uno and USB data cable
- Lab PC with Arduino IDE 2
- The D8 LED circuit from session 1
- Multimeter and oscilloscope
Pre-reading about 25 min
Students read these on their phones before class. They are listed on the student Before class page.
Session plan
- 0:0010 minRecap
Quiz: resistors and safety
Five quick questions from the Check your understanding section of lesson 1.
- 0:1025 minDemo
Tour of the Uno
Power pins, USB versus VIN, the ~ PWM pins, A0-A5 and A4/A5 as I2C. Measure the 5 V and 3.3 V rails live with a meter on the projector.
- 0:3530 minBuild
IDE set-up and Blink
Students select Board and Port, verify, upload Blink to LED_BUILTIN, then edit it to drive D8. Show a failed upload once so students recognise it.
- 1:0540 minCode Along
Sketch structure and Serial
setup() versus loop(), Serial.println and fixing compile errors. For the three-bug exercise students read only the first error, fix it, then run again.
- 1:4515 minWrap-up
Predict, change, measure
Each student changes one delay value, predicts the scope period, uploads and checks it.
Checkpoint: ready to move on?
Every student can upload to their own board without help, has changed Blink to drive D8, and has passed the three-bug exercise.
Extension for fast finishers
Add a Serial trace and flash an S in Morse code; compare the Uno R3 and R4 Minima sections of the lesson.
Catch-up path
Upload problems: work through the Board and port section with a known-good data cable. Repeat the Blink edit at the start of S3.
Homework and practice
Code Along 1.5 and 1.6, and the pre-reading for S3.
Facilitator notes
- Charge-only USB cables cause most failed uploads. Keep a box of known-good data cables.
- Install IDE 2 on the lab PCs before the session; the lesson's Library Manager section is only a preview.