Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 4282

General • Re: Toggle switch to act as a single button press - HID

$
0
0
You can wire a slide switch or toggle switch to a single GP input with pull-up enabled ...

Code:

    |_    | |   _| |-o     .---> GPn  | | |-o )---'  |_| |-o )---.    |_|       `---> 0V / GND    |
When the pin changes from being high to low it can send one command, when changing from low to high it can send another.
Smart idea, thanks. Could I then use micropython for the HID part? Could you possibly direct me to some documentation which could help me with programming this? Thanks!

Statistics: Posted by RammerCZ — Sun Mar 24, 2024 9:25 pm



Viewing all articles
Browse latest Browse all 4282

Trending Articles