Z
@k5r1 # Untitled - By: 49053 - 周四 5月 12 2022
import sensor, image, time
from pyb import UART
uart = UART(3, 9600)
hzdata=[0xfd,0x00,15,0x01,(0x01|(1<<4)),0xC2,0xCC,0xC2,0xEB,0xBB,0xB6,0xD3,0xAD,0xB3,0xCB,0xB3,0xB5];
hzdata_n=[0xD7,0xB4,0xCC,0xAC,0xD2,0xEC,0xB3,0xA3];
ecc=0
for i in hzdata:
ecc=ecc^i
hzdata_y=[0xfd,0x00,15,0x01,(0x01|(1<<4)),0xC2,0xCC,0xC2,0xEB,0xBB,0xB6,0xD3,0xAD,0xB3,0xCB,0xB3,0xB5,ecc]
sensor.reset()
sensor.set_pixformat(sensor.RGB565)
sensor.set_framesize(sensor.QVGA)
sensor.skip_frames(time = 2000)
clock = time.clock()
while(True):
clock.tick()
img = sensor.snapshot()
print(clock.fps())
uart.write(bytearray(hzdata_y))
time.sleep(3)
print(bytearray(hzdata_y))
其中0xC2,0xCC,0xC2,0xEB,0xBB,0xB6,0xD3,0xAD,0xB3,0xCB,0xB3,0xB5就是要说的话