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:1015 minDemo
Tour of the Uno
Keep it short: the power pins and USB versus VIN, the ~ PWM pins and A0-A5. Measure the 5 V and 3.3 V rails live with a meter on the projector. Leave buses and board variants to the reading.
- 0:2545 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. Nobody moves on until every board in the room uploads - pairs help each other and you fix cables and ports.
- 1:1035 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.
- Two lessons is a lot for one session, so some sections are reference only - students read them if curious and you do not teach them: in L02, Microcontroller versus microprocessor, Clone Uno R3 boards (CH340), Digital pins, analogue pins and buses, and the R4 Minima appendix; in L03, Clone boards and the CH340 driver and Library Manager (preview). Come back to the CH340 driver only if a clone board will not appear as a port.
- Name badge (Code Along 1.2) is not done in class here - it is already S1 homework.