Skip to main content

Subsection 1.3.3 Part 3: Stretch Challenges

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.

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.