# How can uart1 of M7 OPENMV work?

**URL:** <https://forums.openmv.io/t/how-can-uart1-of-m7-openmv-work/236>\
**Category:** OpenMV Boards\
**Created:** [April 15, 2017, 9:20am UTC](https://forums.openmv.io/t/how-can-uart1-of-m7-openmv-work/236 "2017-04-15T09:20:32Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![mlw931](https://avatars.discourse-cdn.com/v4/letter/m/53a042/32.png) [@mlw931](https://forums.openmv.io/u/mlw931)\
**Post date:** [April 15, 2017, 9:20am UTC](https://forums.openmv.io/t/how-can-uart1-of-m7-openmv-work/236/1 "2017-04-15T09:20:32Z")

</div>

My openMV M7 's uart3 can work well,but uart1 not.  
Is the problem in firmware?  
How can i get it work well?  
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:** [April 15, 2017, 8:58pm UTC](https://forums.openmv.io/t/how-can-uart1-of-m7-openmv-work/236/2 "2017-04-15T20:58:54Z")

</div>

The microptyhon firmware code probably just needs to be updated so UART one connects to the right pins on the M7.

Ibrahim, can you fix this?

---

<div class="post-metadata">

**Author:** ![iabdalkader](https://yyz1.discourse-cdn.com/flex029/user_avatar/forums.openmv.io/iabdalkader/32/1169_2.png) [@iabdalkader](https://forums.openmv.io/u/iabdalkader)\
**Post date:** [April 15, 2017, 9:17pm UTC](https://forums.openmv.io/t/how-can-uart1-of-m7-openmv-work/236/3 "2017-04-15T21:17:27Z")

</div>

Hi,

It’s not enabled in the firmware, I’ll enable it in the next release.

---

<div class="post-metadata">

**Author:** ![mlw931](https://avatars.discourse-cdn.com/v4/letter/m/53a042/32.png) [@mlw931](https://forums.openmv.io/u/mlw931)\
**Post date:** [April 18, 2017, 4:35am UTC](https://forums.openmv.io/t/how-can-uart1-of-m7-openmv-work/236/4 "2017-04-18T04:35:07Z")

</div>

OK，Thanks you!  
And Can I use this in my commercial product？  
😆

---

<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:** [April 18, 2017, 12:54pm UTC](https://forums.openmv.io/t/how-can-uart1-of-m7-openmv-work/236/5 "2017-04-18T12:54:36Z")

</div>

Nothing is stopping you from buying an OpenMV Cam and putting it into a product.

---

<div class="post-metadata">

**Author:** ![rommel](https://yyz1.discourse-cdn.com/flex029/user_avatar/forums.openmv.io/rommel/32/18_2.png) [@rommel](https://forums.openmv.io/u/rommel)\
**Post date:** [November 16, 2017, 9:29pm UTC](https://forums.openmv.io/t/how-can-uart1-of-m7-openmv-work/236/6 "2017-11-16T21:29:56Z")

</div>

Camera: OpenMV M7  
Firmware: v2.5.0

It says that in  
2.4 (2017-05-30)

Enable UART1 on OpenMV3/M7

I was able to verify UART3 like original poster, however, I still am unable to verify UART1 is functional.  
Below is the code I used to verify UART3/ and tried on UART1

```python
# UART Control
#
# This example shows how to use the serial port on your OpenMV Cam. Attach pin
# P4 to the serial input of a serial LCD screen to see "Hello World!" printed
# on the serial LCD display.

import time, sensor, pyb
from pyb import UART

sensor.reset() # Reset and initialize the sensor.
sensor.set_pixformat(sensor.GRAYSCALE) # Set pixel format to RGB565 (or GRAYSCALE)
sensor.set_framesize(sensor.QQVGA2) # Set frame size to QVGA (320x240)
# Always pass UART 3 for the UART number for your OpenMV Cam.
# The second argument is the UART baud rate. For a more advanced UART control
# example see the BLE-Shield driver.
uart = UART(1, 9600)
led = pyb.LED(3)

while(True):
    #uart.write("xA")
    #time.sleep(1000)
    if (uart.any()):
        c = uart.readchar()
        print(chr(c))
        if (c == 0xAA):
            led.on()
        if (c == 0xAB):
            led.off()
        if (c == 0xD):
            led.on()

```

🤓 ![:ugeek:](https://canada1.discourse-cdn.com/flex029/uploads/openmv1/original/1X/60aa0bc609d6c1cf1242a151e9c1410e4f9e6e44.gif "Uber Geek")

---

<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:** [November 17, 2017, 4:59am UTC](https://forums.openmv.io/t/how-can-uart1-of-m7-openmv-work/236/7 "2017-11-17T04:59:28Z")

</div>

Ibrahim, can you take a look at this?

---

<div class="post-metadata">

**Author:** ![iabdalkader](https://yyz1.discourse-cdn.com/flex029/user_avatar/forums.openmv.io/iabdalkader/32/1169_2.png) [@iabdalkader](https://forums.openmv.io/u/iabdalkader)\
**Post date:** [November 17, 2017, 12:59pm UTC](https://forums.openmv.io/t/how-can-uart1-of-m7-openmv-work/236/8 "2017-11-17T12:59:10Z")

</div>

Hi, please try the [latest firmware release](https://github.com/openmv/openmv/releases/latest) (2.6)

---

<div class="post-metadata">

**Author:** ![rommel](https://yyz1.discourse-cdn.com/flex029/user_avatar/forums.openmv.io/rommel/32/18_2.png) [@rommel](https://forums.openmv.io/u/rommel)\
**Post date:** [November 20, 2017, 6:24pm UTC](https://forums.openmv.io/t/how-can-uart1-of-m7-openmv-work/236/9 "2017-11-20T18:24:00Z")

</div>

Thanks, I have verified UART1 working with v2.6.0

🤓 ![:ugeek:](https://canada1.discourse-cdn.com/flex029/uploads/openmv1/original/1X/60aa0bc609d6c1cf1242a151e9c1410e4f9e6e44.gif "Uber Geek")
