🔌General-Purpose Input/Output (GPIO)
Also known as GPIO, GPIO Pin, Digital Pin, I/O Pin
A chip pin your code can use to switch things on or read a button.
Think of it like
It is like a light switch your code can flip, or a bell your code can hear.
Example
On a Raspberry Pi, Lucy sets GPIO 17 as an output. When her code sets it high, an LED on that pin lights up.
Why it matters
It is how code reaches the real world. Every light, button and buzzer on a board goes through one.
Definition
Common mistake
Key takeaways
- 1In or out. Code picks the pin's job.
- 2High or low. On or off, nothing between.
- 3Check the volts. Each board has a safe level.