RPi_Cam_Web_Interface icon indicating copy to clipboard operation
RPi_Cam_Web_Interface copied to clipboard

Is it possible to run the userbuttons as long as pressing?

Open fth1906 opened this issue 2 years ago • 1 comments

I created 4 button for directions but the buttons only run when i click.

I want to run a dc motor as long as pressing button. Is it possible ? or is there any event to run the motor like this?

fth1906 avatar Jun 07 '22 12:06 fth1906

There is no built in support for this, but it would be possible to alter the code supporting the user buttons to make it work like this.

Basic technique would be to use onmousedown event to detect when the button pressing starts. This would be used to run a script starting the motor. The onmouseup event or the onclick event would then be used to stop the motor.

The code controlling the user buttons is in index.php in the function user_buttons()

roberttidey avatar Jun 08 '22 07:06 roberttidey