Subsection 1.3.3 Part 3: Stretch Challenges
-
External LEDs on the breadboard, a delay_ms() function that takes a time in milliseconds instead of a loop count, and measuring voltages with the multimeter.
-
You’ll start Lab 1 at the end of that class.
If your ramp is working on the board and you still have time, make the LED do something of your own design. Each of these uses only the on-board LED and the tools you already have. Try them in the simulator or straight on the Nucleo. The link below opens the simulator with a plain Blinky, so paste in your
blinkySlowToFast.c and build on it.
Open in the board simulator (new tab)
Activity 1.3.2. Stretch Challenges.
Pick one to build; if you finish, try another.
(a)
-
Ping-pong ramp. After the LED reaches fast, have it slow smoothly back down to slow, then speed up again, a continuous back-and-forth with no hard reset.
-
Heartbeat. Two quick blinks close together, then a longer pause, repeating like a pulse.
-
Morse code. Blink your initials in Morse: a short blink for a dot, a long one for a dash, with gaps between letters. Define constants for the dot, dash, and gap lengths.
(b)
Whatever you pick, keep every delay in a named constant so a reader can see the timing at a glance.