# DIsplay to Nicla Vision

**URL:** <https://forums.openmv.io/t/display-to-nicla-vision/10128>\
**Category:** Arduino Boards\
**Created:** [October 22, 2024, 11:22pm UTC](https://forums.openmv.io/t/display-to-nicla-vision/10128 "2024-10-22T23:22:45Z")\
**Posts on this page:** 18\
**Page:** 1

<div class="post-metadata">

**Author:** ![thonybossa](https://avatars.discourse-cdn.com/v4/letter/t/85e7bf/32.png) [@thonybossa](https://forums.openmv.io/u/thonybossa)\
**Post date:** [October 22, 2024, 11:22pm UTC](https://forums.openmv.io/t/display-to-nicla-vision/10128/1 "2024-10-22T23:22:45Z")

</div>

Hello, how to connect a display to nicla vision. I have a project running in OpenMV IDE, basically it’s a machine learning model for classifying tomatoes. My project is running without problems, but I want to connect a display to see the same thing that the openmv ide camera shows me.

I was watching this tutorial ([https://youtu.be/21gAfCXcHSk](https://youtu.be/21gAfCXcHSk)) and they are using an LCD Display but I’m not sure if it is compatible with arduino nicla vision.

---

<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:** [October 22, 2024, 11:44pm UTC](https://forums.openmv.io/t/display-to-nicla-vision/10128/2 "2024-10-22T23:44:51Z")

</div>

Yes, you can use a display with the system.

[LCD Shield – OpenMV](https://openmv.io/collections/openmv-cam-shields/products/lcd-shield?variant=16525320513)

You need to hook the SPI pins to these: [openmv/src/omv/boards/ARDUINO\_NICLA\_VISION/omv\_boardconfig.h at master · openmv/openmv (github.com)](https://github.com/openmv/openmv/blob/master/src/omv/boards/ARDUINO_NICLA_VISION/omv_boardconfig.h#L290)

You can get the Nicla Pinout here: [ABX00051-full-pinout.pdf (arduino.cc)](https://docs.arduino.cc/resources/pinouts/ABX00051-full-pinout.pdf)

And the LCD shield pinout here: [https://openmv.io/cdn/shop/files/lcd-pinout\_2048x.png?v=1613516978](https://openmv.io/cdn/shop/files/lcd-pinout_2048x.png?v=1613516978)

There’s 6 data pins and power/ground you have to hookup. Then you can use the SPI Disiplay module to send images to the screen.

---

<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:** [October 23, 2024, 4:04am UTC](https://forums.openmv.io/t/display-to-nicla-vision/10128/4 "2024-10-23T04:04:58Z")

</div>

See the LCD Examples. Here’s the class here: [class SPIDisplay – SPI Display Driver — MicroPython 1.23 documentation (openmv.io)](https://docs.openmv.io/library/omv.display.spidisplay.html)

Note, the pins mentioned in the class aren’t the same the Nicla uses. Please follow my links above for that.

---

<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 16, 2024, 5:55am UTC](https://forums.openmv.io/t/display-to-nicla-vision/10128/6 "2024-11-16T05:55:06Z")

</div>

Hi, I don’t know how the LCD shield you show above works. Please provide the datasheet for it.

---

<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 16, 2024, 6:57pm UTC](https://forums.openmv.io/t/display-to-nicla-vision/10128/8 "2024-11-16T18:57:16Z")

</div>

Hi, so, that display looks like the same display we use for the OpenMV Cam normally. However, there are strap pins on these displays which change the read-out order and etc. Since you are not using the hardware we sell I can only provide limited help. If you need to modify the driver you’ll need to do it yourself in Python. That said, other customers have done this and it’s not impossible.

Anyway, as described in this post: [DIsplay to Nicla Vision - #2 by kwagyeman](https://forums.openmv.io/t/display-to-nicla-vision/10128/2)… you have the wiring correct as far as I can tell. It’s not clear that the A0 pin is equal to the RS pin and that SDA is equal to MOSI. Assuming this is right then it should work.

LED being set to 3.3V should light the display.

Anyway, run the LCD shield example on the Nicla and you should get some sort of image. The bytes may be reversed, if so, then you can turn on a flag to fix that. [class SPIDisplay – SPI Display Driver — MicroPython 1.23 documentation](https://docs.openmv.io/library/omv.display.spidisplay.html#display.SPIDisplay)

---

<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 16, 2024, 10:33pm UTC](https://forums.openmv.io/t/display-to-nicla-vision/10128/10 "2024-11-16T22:33:04Z")

</div>

[firmware.zip](https://forums.openmv.io/uploads/short-url/b1Gh0QEnIHYLsXxtDJr7xf5Fg3A.zip) (1.0 MB)

Sorry, it’s not enabled by default. Here’s a firmware snapshot with it enabled.

---

<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, 2024, 3:06am UTC](https://forums.openmv.io/t/display-to-nicla-vision/10128/12 "2024-11-17T03:06:28Z")

</div>

```auto
import sensor, time, ml, uos, gc, display

sensor.reset() # Reset and initialize the sensor.
sensor.set_pixformat(sensor.RGB565) # Set pixel format to RGB565 (or GRAYSCALE)
sensor.set_framesize(sensor.QVGA) # Set frame size to QVGA (320x240)
sensor.set_windowing((160, 160)) # Set 160x160 window.
sensor.skip_frames(time=2000) # Let the camera adjust.

net = None
labels = None

lcd = display.SPIDisplay()

try:
    # load the model, alloc the model file on the heap if we have at least 64K free after loading
    net = ml.Model("trained.tflite", load_to_fb=uos.stat('trained.tflite')[6] > (gc.mem_free() - (64*1024)))
except Exception as e:
    print(e)
    raise Exception('Failed to load "trained.tflite", did you copy the .tflite and labels.txt file onto the mass-storage device? (' + str(e) + ')')

try:
    labels = [line.rstrip('\n') for line in open("labels.txt")]
except Exception as e:
    raise Exception('Failed to load "labels.txt", did you copy the .tflite and labels.txt file onto the mass-storage device? (' + str(e) + ')')

clock = time.clock()
while(True):
    clock.tick()

    img = sensor.snapshot()
    predictions = net.predict([img])[0].flatten().tolist()
    predictions_list = list(zip(labels, predictions))

    # Encontrar la clase con el porcentaje más alto
    top_class = max(predictions_list, key=lambda x: x[1])
    top_label, top_score = top_class

    # Mostrar la clase clasificada en el buffer de OpenMV
    #img.draw_string(0, 0, f"{top_label}: {top_score:.2f}", color=(255, 0, 0), scale=1)
    # Mostrar la clase clasificada en el buffer de OpenMV
    img.draw_string(0, 10, f"{top_label}", color=(255, 0, 0), scale=0.9) # Nombre de la clase
    img.draw_string(0, 20, f"{top_score:.2f}", color=(255, 0, 0), scale=1) # Porcentaje en la línea de abajo

    # Imprimir resultados en la consola
    for label, score in predictions_list:
        print(f"{label} = {score:.2f}")
    print(f"Clasificación: {top_label} = {top_score:.2f}")
    print(clock.fps(), "fps")
    lcd.write(img)

```

---

<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, 2024, 3:52am UTC](https://forums.openmv.io/t/display-to-nicla-vision/10128/15 "2024-11-17T03:52:27Z")

</div>

Hi, I’d recommend adding a physical switch to just remove battery or USB-C power. The RT1062 has an on off button. The Nicla does not.

---

<div class="post-metadata">

**Author:** ![BDN](https://avatars.discourse-cdn.com/v4/letter/b/c37758/32.png) [@BDN](https://forums.openmv.io/u/BDN)\
**Post date:** [April 28, 2025, 12:54pm UTC](https://forums.openmv.io/t/display-to-nicla-vision/10128/16 "2025-04-28T12:54:30Z")

</div>

Hi @kwagyeman , I am trying to use Nicla Vision and OpenMV LCD Shield for display.

I have used the LCD shield pinout and the Nicla pinout you mentioned and below are the combinations of pins

OpenMV LCD Shield \>\> Nicla Vision  
SPI Data In - to LCD \>\> COPI  
SPI Clock \>\> SCLK  
SPI Chip Select \>\> CS  
Backlight Control + 3.3V Rail \>\> (OUT) VDDIO\_EXT  
SPI Command \>\> D0/LPIO0  
LCD Reset \>\> D3/LPIO3  
GND Rail \>\> GND

Following the code i have used in openmv is

```auto
import sensor, display
# Setup camera.
sensor.reset()
sensor.set_pixformat(sensor.RGB565)
sensor.set_framesize(sensor.LCD)
sensor.skip_frames()
lcd = display.SPIDisplay()

# Show image.
while(True):
    lcd.write(sensor.snapshot())

```

I have also flashed the firmware you attached before. The code runs without any errors, but the display does not show the images (display just glows white). Could you provide any insights on what might be wrong?

---

<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 28, 2025, 11:04pm UTC](https://forums.openmv.io/t/display-to-nicla-vision/10128/17 "2025-04-28T23:04:39Z")

</div>

Hi, it’s these pins:

 ![image](https://canada1.discourse-cdn.com/flex029/uploads/openmv1/original/2X/c/c3eecffd2e374c1a4e355f240c1b0a2fcc8044ab.png)

I just hooked it up and it totally works. However, if your wires are bad this will cause it not to work.

Note that you have to enable the display module on the nicla:

> <https://github.com/openmv/openmv/blob/master/boards/ARDUINO_NICLA_VISION/omv_boardconfig.mk#L31>

---

<div class="post-metadata">

**Author:** ![BDN](https://avatars.discourse-cdn.com/v4/letter/b/c37758/32.png) [@BDN](https://forums.openmv.io/u/BDN)\
**Post date:** [April 29, 2025, 11:04am UTC](https://forums.openmv.io/t/display-to-nicla-vision/10128/18 "2025-04-29T11:04:11Z")

</div>

Thanks @kwagyeman for your reply.

 ![image](https://canada1.discourse-cdn.com/flex029/uploads/openmv1/original/2X/8/816d416bfb2906fe052fe40190ff44ab8c2fdc58.png)

Currently i have downloaded the firmware you provided in previous post (shown in screenshot)  
and flashed it on nicla vision using OpenMV IDE, but i am not sure after updating this `MICRO_PY_DISPLAY` , how i can flash this. Can you please provide any source or provide guidance for doing it.

---

<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 29, 2025, 5:17pm UTC](https://forums.openmv.io/t/display-to-nicla-vision/10128/19 "2025-04-29T17:17:59Z")

</div>

[firmware.zip](https://forums.openmv.io/uploads/short-url/4yEGH8qsJc4ZUQCbjY1ggHIpTwB.zip) (1007.3 KB)

Here’s the firmware attached.

---

<div class="post-metadata">

**Author:** ![BDN](https://avatars.discourse-cdn.com/v4/letter/b/c37758/32.png) [@BDN](https://forums.openmv.io/u/BDN)\
**Post date:** [May 1, 2025, 4:36pm UTC](https://forums.openmv.io/t/display-to-nicla-vision/10128/20 "2025-05-01T16:36:26Z")

</div>

Hi @kwagyeman , I have tried using this firmware the code runs but it still shows just white screen.

Can you please verify my connections with yours. I am providing a diagram below.

 ![connections](https://canada1.discourse-cdn.com/flex029/uploads/openmv1/original/2X/c/c12e06d2bd40f4a2a5748acdaba792ba56d25367.jpeg)

I also checked for voltage output of each pin from nicla vision to LCD Shield

COPI to SDI is 1.7V  
SCLK to SPI CLK is 1.5 to 1.6V  
CS to SPI CHP Select 0V  
PG12 to RS(SPI command) 3.3V  
PG1 to RST 3.3V

---

<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 1, 2025, 5:44pm UTC](https://forums.openmv.io/t/display-to-nicla-vision/10128/21 "2025-05-01T17:44:51Z")

</div>

Hi, that pinout is correct. When I hooked it up and ran the code with that firmware, it just worked.

Note that you don’t need to connect LED to VCC as it’s already that way internally on the LCD screen. However, this wouldn’t cause it not to work.

If you have a multimeter or a scope, you may wish to check if there’s a signal toggling. The 1.7V and 1.5V to 1.6V imply there’s a data waveform on the COPI and SPI pins.

---

<div class="post-metadata">

**Author:** ![dkxavi](https://avatars.discourse-cdn.com/v4/letter/d/c77e96/32.png) [@dkxavi](https://forums.openmv.io/u/dkxavi)\
**Post date:** [May 6, 2025, 6:23pm UTC](https://forums.openmv.io/t/display-to-nicla-vision/10128/22 "2025-05-06T18:23:15Z")

</div>

Hi @kwagyeman.

I have enabled MICROPY\_PY\_DISPLAY\_DISPLAY = 1 in the Nicla Vision source, but I have an error when building the firmware. Is it necessary to modify something else in the source code? I am working on WSL - Ubuntu 24.04.2 LTS , following the instructions of this repository: [openmv/docs/firmware.md at master · openmv/openmv · GitHub](https://github.com/openmv/openmv/blob/master/docs/firmware.md)

I have multiple “undefined reference to…”

 ![firmware_nicla](https://canada1.discourse-cdn.com/flex029/uploads/openmv1/original/2X/1/16ee3754a0a2005216d02910edb4c4ccf174c77d.png)

---

<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 6, 2025, 6:41pm UTC](https://forums.openmv.io/t/display-to-nicla-vision/10128/23 "2025-05-06T18:41:19Z")

</div>

Are you using the docker build? [openmv/docs/firmware.md at master · openmv/openmv · GitHub](https://github.com/openmv/openmv/blob/master/docs/firmware.md#docker-build)

---

<div class="post-metadata">

**Author:** ![dkxavi](https://avatars.discourse-cdn.com/v4/letter/d/c77e96/32.png) [@dkxavi](https://forums.openmv.io/u/dkxavi)\
**Post date:** [May 6, 2025, 8:03pm UTC](https://forums.openmv.io/t/display-to-nicla-vision/10128/24 "2025-05-06T20:03:22Z")

</div>

No, I’m using the Linux Build.

1. Install build dependencies.
2. Install GNU ARM toolchain.
3. Clone the repository.
4. Build the firmware.

---

<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 6, 2025, 8:50pm UTC](https://forums.openmv.io/t/display-to-nicla-vision/10128/25 "2025-05-06T20:50:09Z")

</div>

Yeah, it looks like micropython is missing… those are all linker errors that imply the micropython base wasn’t built.

The docker build may be easier to follow, it’s integrated into github actions so it’s tested on each commit that it works.
