Push button: Difference between revisions
		
		
		
		Jump to navigation
		Jump to search
		
| No edit summary | |||
| Line 1: | Line 1: | ||
| = Description = | = Description = | ||
| With  | With a button we can select which of the two sides are connected to the middle. It is similar to a [[switch]] but it only stays in the state as long as it is pressed. | ||
| [[File: | [[File:Button02.PNG|x200px]] | ||
| = How to connect it electrically = | = How to connect it electrically = | ||
Revision as of 23:05, 29 August 2020
Description
With a button we can select which of the two sides are connected to the middle. It is similar to a switch but it only stays in the state as long as it is pressed.
How to connect it electrically
How to control it in MicroPython
from machine import Pin
in26 = Pin(26, Pin.IN)
print(in26.value())
Related Tutorial Videos
Digital Input