Control buzzer

API Introduction

Arm_Buzzer_On(delay=255)

Function: turn on the buzzer.

Parameter explanation:

delay: The input range of delay is 1~50. The larger the value, the longer the buzzer will sound. It will automatically turn off after timeout. The delay time is specified as: 1=100 milliseconds, 2=200 milliseconds, and so on. The longest delay is The time is 50=5 seconds. If delay does not pass in a value, or delay=255, it means that the buzzer beeps for a long time and needs to be turned off manually.

Return value: None.

 

Arm_Buzzer_Off()

Function explanation: Turn off the buzzer.

Parameter explanation: No parameters .

Return value: None

 

2.Code

Code path: /home/jetson/Dofbot/3.ctrl_Arm/2.beep.ipynb

Open the 2.beep.ipynb file from jupyter lab and click the Run entire notebook button on the jupyter lab toolbar.

You can hear the buzzer on the expansion board beeping three times in a row, and the sound from the back is longer than the sound from the front.

It will automatically exit after running code.