User control/input/switches/etc.

I’m not sure if this belongs in the technical forum, but at any rate, what is the best way to get a little bit of user control over the board? I would like to be able to influence the board’s behavior a bit. The simplest example would be a “camera shutter button” that captures a photo at the current moment to the SD card. But that’s an absolutely minimal example (a single binary input). I’m asking more generally. I think minimal pushbutton switches could be applied to the I/O lines (can any line be configured this way?), but that isn’t much input (one binary input per line, and there aren’t many lines). Plus, with the LCD shield in place, three of those lines are taken up for “LCD Reset”, “SPI Command”, and “Backlight Control”. So that leaves P9 (the third servo line) and P4 and P5 (the I2C/UART lines). That’s it, correct? (presumably MISO couldn’t be used, even though the LCD doesn’t use it, since the entire SPI interface probably takes over all four SPI lines).

I’m just curious what other people have done toward similar goals. Are people attaching serial UART or I2C based input devices to the M7? How has that worked out? I’d love to hear about other people’s user control and input solutions with OpenMV.


Mmm, if just buy an I2C I/O expander:

Just use the machine I2C module to talk to it. There are might already be a driver if you Google MicroPython I2C expander.

Done: GitHub - ShrimpingIt/micropython-mcp230xx: Micropython I2C-based manipulation of the MCP series GPIO expander, derived from Adafruit_MCP230xx

Note that this driver is for a different board than above.

Cool. There’s so much stuff out there and I’m not much of an electronics tinkerer, so I’m generally unaware of all these options.