UART on Nicla Vision not working

Hi,
I'm trying to send some data over UART from the Arduino Nicla Vision. My current setup looks like this:

I tried the OpenMV example, without success. (Examples > Arduino Boards > Nicla Vision > Board Control > uart_control.py)

# UART Control
#
# This example shows how to use the serial port on your OpenMV Cam.

import time
from pyb import UART

# Init UART object.
uart = UART(4, 19200)

while(True):
    uart.write("Hello World!\r")
    time.sleep_ms(1000)

Any help is appreciated. Thanks.

If I see this correctly, the Arduino Nicla Vision has no UART at all. But then I find the pinout picture very confusing, where pins PA_10 and PA_9 are marked as UART_RX and UART_TX. Additionally, it is confusing that there is also an example script specifically for the Nicla Vision even though there is no UART at all.
image

Hi @joschadev,
currently, UART(4) is mapped on pins 1 | PB_9 | SDA and 2 | PB_8 | SCL, respectively as TX and RX.

The upcoming version (4.3.4) of the microPython firmware for the Nicla Vision will allow using pins 3 | TX and 4 | RX also as UART.

1 Like

Hi @joschadev,
While waiting for the next official version, you may want to try the development version of the firmware.

You can install it from the OpenMV IDE by selecting "Tools > Install the Latest Development Release" from menu.

Alternatively, download it from the Development Release page.

  • Download and extract the firmware_NICLAV.zip file
  • Open the "Tools > Run Bootloader" and point it to the firmware_NICLAV/firmware.bin bin

With the new firmware installed, connect your TX and RX pin to pins 3 and 4 and load the following script:

import time
from pyb import UART

# Init UART object.
# Nicla Vision's UART (TX/RX pins) is on "LP1"
uart = UART("LP1", 115200)

while(True):
    uart.write("Hello World!\r\n")
    time.sleep_ms(1000)

Please, note the new UART is available as "LP1".