# Untitled - By: Administrator - Fri Apr 12 2024
import sensor, image, time
import display
from pyb import UART, Pin,Timer
sensor.reset()
sensor.set_pixformat(sensor.RGB565)
sensor.set_framesize(sensor.QQVGA)
sensor.skip_frames(time = 2000)
lcd = display.SPIDisplay()
light = Timer(4, freq=50000).channel(1, Timer.PWM, pin=Pin("P7"))
light.pulse_width_percent(10) # 控制亮度 0~100
clock = time.clock()
while(True):
clock.tick()
lcd.write(sensor.snapshot())
print(clock.fps())