Buzzer
Run the program
Enter the following command in the terminal to test buzzer.
If the terminal displays the directory as below (where test.py is located). You can directly execute the test.py
command.
1 If not, execute the cd command:
cd ~/Freenove_4WD_Smart_Car_Kit_for_Raspberry_Pi/Code/Server
2 Execute test.py command:
sudo python test.py Buzzer
Result:
The buzzer will be turned on and last for 3s. Then the program will automatically end or you can press "Ctrl
+ C" to end the program.
The code is as below: