# UI & Controller connections with H7 OV7725 + LCD shield

**URL:** <https://forums.openmv.io/t/ui-controller-connections-with-h7-ov7725-lcd-shield/9636>\
**Category:** OpenMV Boards\
**Created:** [May 29, 2024, 6:13pm UTC](https://forums.openmv.io/t/ui-controller-connections-with-h7-ov7725-lcd-shield/9636 "2024-05-29T18:13:54Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![rothere](https://avatars.discourse-cdn.com/v4/letter/r/e5b9ba/32.png) [@rothere](https://forums.openmv.io/u/rothere)\
**Post date:** [May 29, 2024, 6:13pm UTC](https://forums.openmv.io/t/ui-controller-connections-with-h7-ov7725-lcd-shield/9636/1 "2024-05-29T18:13:54Z")

</div>

Hi,

**I’m trying to revive a project and I’m trying to do the following:**

- Connect to main controller via UART (since the cam has a harder time being a I2C slave)
- Simple UI with 5-way switch (Incr, decr, prev, next, OK) to adjust several parameters displayed on the tiny LCD with a MCP23008 (8-bit I/O expander) via I2C.

**Looking at the H7 and LCD shield pinout, I only have pins P1, P4, P5 and P9 unused.**

- Should I use P4 & P5 as UART’s TX & RX to main controller to pass data back and forth?
- Can P5 & P9 be defined as a slow I2C port to the MCP23008 I/O expander? Or is there a better way to do this… like sharing the SPI bus with the LCD and a MCP23S08 instead?

Thanks

---

<div class="post-metadata">

**Author:** ![kwagyeman](https://yyz1.discourse-cdn.com/flex029/user_avatar/forums.openmv.io/kwagyeman/32/4_2.png) [@kwagyeman](https://forums.openmv.io/u/kwagyeman)\
**Post date:** [May 29, 2024, 7:16pm UTC](https://forums.openmv.io/t/ui-controller-connections-with-h7-ov7725-lcd-shield/9636/2 "2024-05-29T19:16:01Z")

</div>

> - Should I use P4 & P5 as UART’s TX & RX to main controller to pass data back and forth?

Yes, you can do this.

> - Can P5 & P9 be defined as a slow I2C port to the MCP23008 I/O expander? Or is there a better way to do this… like sharing the SPI bus with the LCD and a MCP23S08 instead?

Use SoftI2C: [class I2C – a two-wire serial protocol — MicroPython 1.22 documentation (openmv.io)](https://docs.openmv.io/library/machine.I2C.html#machine.SoftI2C)

---

<div class="post-metadata">

**Author:** ![rothere](https://avatars.discourse-cdn.com/v4/letter/r/e5b9ba/32.png) [@rothere](https://forums.openmv.io/u/rothere)\
**Post date:** [May 29, 2024, 9:04pm UTC](https://forums.openmv.io/t/ui-controller-connections-with-h7-ov7725-lcd-shield/9636/3 "2024-05-29T21:04:16Z")

</div>

Thanks! I can start wiring everything now!
