你这个rtc我看着不知道什么意思,如果要录制15小时, 可以用millis()判断. import sensor, image, time, mjpeg, pyb RED_LED_PIN = 1 BLUE_LED_PIN = 3 sensor.reset() # Initialize the camera sensor. sensor.set_pixformat(sensor.RGB565) # or sensor.GRAYSCALE sensor.set_framesize(sensor.QVGA) # or sensor.QQVGA (or others) sensor.skip_frames(time = 2000) # Let new settings take affect. clock = time.clock() # Tracks FPS. pyb.LED(RED_LED_PIN).on() sensor.skip_frames(time = 2000) # Give the user time to get ready. pyb.LED(RED_LED_PIN).off() pyb.LED(BLUE_LED_PIN).on() m = mjpeg.Mjpeg("example.mjpeg") print("You're on camera!") start = pyb.millis() while (pyb.millis()-start) < 15*60*60*1000: clock.tick() m.add_frame(sensor.snapshot()) print(clock.fps()) m.close(clock.fps()) pyb.LED(BLUE_LED_PIN).off() print("Done! Reset the camera to see the saved recording.")