Mock.GPIO icon indicating copy to clipboard operation
Mock.GPIO copied to clipboard

Simulate pressing a button

Open beachbumbob opened this issue 11 months ago • 2 comments

Simulate input

This make it possible to simulate input to a GPIO pin, e.g. pressing a button.

echo "[PINNUMBER]:[HI|LOW]" > /dev/tcp/{host}/{port}

The port is hardcoded to 5566

example: echo "18:LOW" > /dev/tcp/192.168.122.143/5566

For this to work you have to have python script that activate the GPIO, e.g GPIO.add_event_detect({pinnumber}, GPIO.FALLING, handle, bouncetime=1500)

beachbumbob avatar Dec 21 '24 15:12 beachbumbob

If you like it, go ahead and merge. If think it is rubbish, delete it, you wont hurt my feelings.

beachbumbob avatar Dec 21 '24 15:12 beachbumbob

Please rebase this pull request.

This branch has conflicts that must be resolved.

cclauss avatar Sep 29 '25 06:09 cclauss