You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Cai Biesinger edited this page Jul 10, 2018
·
3 revisions
GPIO (General-purpose Input/Output) is just a hardware pin that can be used to send or receive a digital signal. It is not meant for high-speed communications, just a simple way to show a state, kind of like an electronics version of bool.
Interrupts are a way to trigger the processor to run certain code when the state of a GPIO pin changes in a desired way. For example, a falling-edge interrupt will trigger code execution when the digital input transitions from high/true to low/false.
Pull-up/-down resistors are resistors that you can connect from the input pin to either Vcc (3.3V) or GND. These are fairly high resistance, usually 10k-100k, and simply act as a way to bias the pin to a certain state if nothing else is acting on it, giving you a reliable default. If a pin is leaft "floating", i.e. disconnected, it is not guaranteed which state will be read, which is undesirable.