Raspberry Pi practice problem · LEDs & PWM
Seventy-three
MediumBudget $2Python · gpiozero
Radio operators sign off with 73 ("best regards"). Send it in Morse on an LED on GPIO17, forever.
Digits are five elements long: 7 is --... and 3 is ...--. Timing, with a unit of 0.2 s:
- dot = 1 unit on, dash = 3 units on
- 1 unit off between the elements of a digit
- 3 units off between the two digits
- 7 units off after the message, then start again (so the message repeats every 7.2 s)
The first dash starts at 0 s.
Tip: store the code in a dict ({"7": "--...", "3": "...--"}) and write one function that flashes a string of dots and dashes.