
18.2K
NVMini How To 13: Out of GPIO Pins? Here’s What To Do
If you’ve ever run out of GPIO pins halfway through a project (we’ve all been there), there are some handy tricks and components you can use to keep building without redesigning everything from scratch.
Shift Registers
For extra outputs, try a shift register like the 74HC595. It lets you control up to 8 LEDs or other outputs with just three microcontroller pins. Some models, like the 74HC165, are designed for reading extra digital inputs. You can chain these chips together to control even more devices, but you can’t mix inputs and outputs on the same register.
I²C GPIO Expanders
A chip like the MCP23017 or PCF8574 can give you 8 or 16 extra digital pins using just two I²C lines. Super useful if you need more buttons or sensors, especially when your I²C devices have conflicting addresses and can’t all be connected directly. You can also find I²C bus expanders (like the TCA9548A), which let you use multiple devices with the same address on separate I²C channels.
Voltage Divider Button Trick
My favourite: with a handful of resistors, you can connect several buttons to a single analogue pin by creating unique voltage levels for each button press. It’s a simple way to use basic electrical laws for something clever, and you don’t need any extra chips, just the resistors you probably already have.
#electronics #3dprinting #diyprojects #arduino #esp32 #raspberrypi #minihowto #microcontroller #maker #gpio #tutorial
@nvkv.makes










