OpenMV驱动1.8寸液晶屏(st7735驱动IC,4线SPI驱动,128*160分辨率,TFT高亮色)
接线关系:
LCD端 | OpenMV端 |
GND | GND |
VCC | 3.3V |
SCL | P2 |
SDA | P0 |
RES | P7 |
DC | P8 |
CS | P3 |
BLK | P6 |
使用OpenMV官方代码测试
# LCD Example
#
# Note: To run this example you will need a LCD Shield for your OpenMV Cam.
#
# The LCD Shield allows you to view your OpenMV Cam's frame buffer on the go.
import sensor, image
import lcd
sensor.reset() # Initialize the camera sensor.
sensor.set_pixformat(sensor.RGB565) # or sensor.GRAYSCALE
sensor.set_framesize(sensor.QQVGA2) # Special 128x160 framesize for LCD Shield.
lcd.init() # Initialize the lcd screen.
#lcd初始化
while(True):
lcd.display(sensor.snapshot()) # Take a picture and display the image.
#将图像显示在lcd中
图像显示结果: