Adding GPIO over USB

Hello,

I would like to have some GPIOs on my OpenWRT device, without the need to open the device and gain access to the onboard GPIOs. So I would like to have some GPIOs over an USB Adapter. But I can't find anything usable.

It would be perfekt to have an USB to GPIO + UART Adapter / IC which is working well with OpenWRT.

Maybe anyone knows a good solution for that?

Thanks!

There is a firmware (whose name I cannot remember) that makes an Arduino act as an external GPIO controller, through the USB connection, and can easily be programmed from a library that you install on the router. And an Arduino nano can be fed from the same USB connection.

EDIT: It's called "firmata": http://firmata.org/wiki/Main_Page

1 Like

FT232H should do what you want, but I would think twice before going that way.

Having done this already on a Raspi, I see these downsides:

  • costly ($14,95 @adafruit; maybe cheaper than an arduino, but still not cheap)
  • adafruit library documentation is not the best. Be prepared for some confusion.
  • no clue if this works flawlessly and on first shot on OpenWrt. Be prepared for some work.

I think, that cp2112 will be the best choice:
https://aliexpress.ru/item/32819605284.html