I am trying to display live video on ILI9341 SPI display. JPEG function of the camera is working properly. However I could not get any image when I configure the camera in RGB565 format.
Does anyone make such an implemantation ?
Or do you know a library which can display jpeg image on LCD display, In case I use the camera in JPEG mode ?
Or do you know a library which can convert jpeg to raw RGB565 format ?
Code: Select all
camera.init(0, format=camera.RGB565, fb_location=camera.PSRAM)
buf = camera.capture()
>> buf
>> False
Code: Select all
spi = SPI(baudrate=40000000, polarity=0, phase=0, sck=Pin(14), mosi=Pin(13), miso=Pin(12))
display = Display(spi, dc=Pin(2), cs=Pin(15), rst=Pin(0))
state = camera.init(0, format=camera.RGB565, fb_location=camera.PSRAM)
#state = camera.init(0, format=camera.JPEG, fb_location=camera.PSRAM)
print("Camera State: ",state)
camera.framesize(camera.FRAME_96X96)
while True:
buf = bytearray(2 * 96 * 96)
buf = camera.capture()
display.block(0,0,96,96,buf)
print("image")
display.draw_rectangle(0,0,96,96,255)