Stop motor/buzzer when pressing the mechanical switch
I have a coin motor connected to my board and I am already able to start the motor / buzzer for a predefined time with startMotor(float dutyCycle, short pulseWidth) / startBuzzer(short pulseWidth).
Now I would like to be able to stop the motor / buzzer as soon as the user presses the mechanical switch on the board. However, the Android API for the haptic module does not offer a method for stopping a running motor / buzzer. Is there a way how I can achieve this?
Now I would like to be able to stop the motor / buzzer as soon as the user presses the mechanical switch on the board. However, the Android API for the haptic module does not offer a method for stopping a running motor / buzzer. Is there a way how I can achieve this?
This discussion has been closed.
Comments
@Laura, I would be very grateful if you could add this functionality in later versions! We are planning to conduct an experiment with the device for which it is essential that the user can terminate the buzzer.