This metronome helps you when the sound distracts you training music. Soon: You can turn on and off both LED and buzzer, you choose what to use.
ver 2.0 - Now with a interactive menu to choose between 2/4, 3/4, 4/4 and 4/8 times, still in 60bpm.
ver 1.0 - It’s set to 4/4 60bpm. Working on new features.
The GPIO.setmode(GPIO.BCM)
declared means that you need to use the port name, not its physical number.
To know both just execute pinout
on your pi’s terminal and use the GPIO(x)
number.
If you want to use the physical, change this line to GPIO.setmode(GPIO.BOARD)
.
I’m using RGB LED but you can use 1 simple LED or more to simulate the higher tempo.
“Thanks for passing by.”