Hacker News new | ask | show | jobs
by vesrah 20 days ago
How are you getting GPIO?
2 comments

Most likely he doesn't use GPIO, if it's just a tailscale/pi-hole client or something like that.

If you REALLY need GPIO then just add a USB-C OTG MCU board like a ESP32, or even the ancient Arduino Uno works as USB GPIO via serial TTY on Android.

Or just use a ESP32 by itself, if you don't need a full Linux OS, just to toggle some GPIO pins via the internet.

Possibilities are endless. Just use your imagination, or ask some LLM.

How to control the gpio?
Several methods. You can run a MQTT server, Lightweight HTTP Server or even just serial over USB. Literally the world is your oyster. Extra special points if you do HTTP over ethernet
Flash the MCU with a program that takes a text protocol over the UART from the host and uses it to control its GPIOs
Use something like this:

Adafruit FT232H Breakout - General Purpose USB to GPIO, SPI, I2C https://www.adafruit.com/product/2264

(or even more cheaply a CH347T board which are dirt cheap on Aliexpress)

Both have decent Python support.