toggle switch

CircuitPython on hardware including Adafruit's boards, and CircuitPython libraries using Blinka on host computers.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
errorflash
 
Posts: 6
Joined: Sun Jul 25, 2021 10:30 am

toggle switch

Post by errorflash »

Hello
tin
is there in circuit python an equal funktion like "wait_for_edge()" ?? i have an toggle switch and need a code for an RPI Pico that react only with status change.

can everyone help my with these Problem ?

User avatar
dastels
 
Posts: 15608
Joined: Tue Oct 20, 2015 3:22 pm

Re: toggle switch

Post by dastels »

Use the debouncer module. See https://learn.adafruit.com/debouncer-li ... ns-sensors.

Dave

User avatar
errorflash
 
Posts: 6
Joined: Sun Jul 25, 2021 10:30 am

Re: toggle switch

Post by errorflash »

Thanks!!

It works! That is my solution.

User avatar
dastels
 
Posts: 15608
Joined: Tue Oct 20, 2015 3:22 pm

Re: toggle switch

Post by dastels »

Awesome!

Dave

Locked
Please be positive and constructive with your questions and comments.

Return to “Adafruit CircuitPython”