Switch

From Sketching with Hardware at LMU Wiki
Jump to navigation Jump to search

Description[edit]

With this switch we can select which of the two sides are connected to the middle. If we move the switch right then the right pin is connected to the middle. If we move the switch left then the left pin is connected to the middle,

How to connect it electrically[edit]

How to control it in MicroPython[edit]

from machine import Pin
in26 = Pin(26, Pin.IN)
print(in26.value())


Related Tutorial Videos[edit]

Digital Input