User adjustments (simple menu + few buttons)

I have a H7 OV7725 + LCD combo, which will go into a box, I2C-connected to a master Arduino controller.

I need the user to be able to manually adjust focus (easy with lens rotation), lens distortion compensation (could even swap to a better lens) and most importantly, gain. A few buttons such as [SELECT] [+] [-] would do.

I’m only left with 1 free I/O pin P9/Servo3. Would a 16-ch MCP23S17 (10 MHz) I/O expander on the SPI bus with pin P9 set as CS work? Any other ideas?

Reading a bit more… sharing the SPI bus with the LCD at 10 MHz might be OK since it does not go over 20 MHz. In another post, ~5 fps @ 2 MHz is possible so a decent >20 fps might be attainable with a 10 MHz SPI bus.

Seems like that would work.

The RT1062 has more pins also. But, it cannot be an I2C slave yet as the machine module doesn’t have support. You could, though, use the UART interface.

But if UART1 and CAN2 is taken by SPI, UART3 by SPI I’m only left with P9. How about the DS2413 1-wire to 2 I/O ports? Multiple DS2413s could be attached to the same 1-wire bus as needed. Is there any support for 1-wire?

There’s no support for 1 wire at this time.

I did a search of MicroPython libraries for the STM32 and didn’t find any.

There is MicroPython support for the MCP23S17 so I’ll get a few chips & give that a try.