For the complete documentation index, see llms.txt. This page is also available as Markdown.

Digital Input

3.3V and Gnd bus rails, a toggle switch on D4, and a momentary switch on D6.
Blue bus rail connected to gnd with an orange jumper wire. Red bus rail connected to 3.3V with a yellow jumper wire.
Center pin of toggle switch connected directly to D4. Normally-open momentary switch connects D6 to Gnd when pushed.
Toggle switch in "On" possition, conecting D4 to 3.3V.
Toggle switch in "Off" possition, conecting D4 to Gnd.
Momentary switch unpushed, internal pull-up resistor connects D6 to 3.3V.
Momentary switch pusshed, pulls D6 down to Gnd.

Circuit Python Library

https://docs.circuitpython.org/en/latest/shared-bindings/digitalio/index.html

Pull-Up Resistors

https://en.wikipedia.org/wiki/Pull-up_resistor

Code

Last updated