camera.init() on ESP32-CAM disables PCD8854 from showing pixel data

All ESP32 boards running MicroPython.
Target audience: MicroPython users with an ESP32 board.
Post Reply
intercalate
Posts: 1
Joined: Thu Nov 18, 2021 3:27 pm

camera.init() on ESP32-CAM disables PCD8854 from showing pixel data

Post by intercalate » Thu Nov 18, 2021 6:15 pm

Greetings,

I was planning to use OV2640 from ESP32-CAM in tandem with PCD8544. While using PCD8544 to display a framebuf buffer data works, calling camera.init() erases the LCD display leaving blank. The blank persists even if I try to use lcd.data(buffer) again.

I m assuming some possible causes:
- there is a same pin used on PCD8854 and camera module.
- camera.init() clashes with the PCD8854 output.
-----my inference is when using camera.init() the PCD8854 blanks.
-----using camera.deinit() after camera.init() doesn't solve the problem
-----using camera.deinit() only, however doesn't cause the LCD to blank.

I use https://github.com/lemariva/micropython-camera-driver for Micropython and https://github.com/mcauser/micropython-pcd8544 for display.

The pins assigned for display are:

Code: Select all

spi = SPI(1)
spi.init(baudrate=2000000, polarity=0, phase=0)
cs = Pin(2)
dc = Pin(15)
rst = Pin(0)
bl = Pin(12, Pin.OUT, value=1)

lcd = pcd8544.PCD8544(spi, cs, dc, rst)

import framebuf
buffer = bytearray((pcd8544.HEIGHT // 8) * pcd8544.WIDTH)
framebuf = framebuf.FrameBuffer(buffer, pcd8544.WIDTH, pcd8544.HEIGHT, framebuf.MONO_VLSB)
Thank you in advance

Post Reply