星瞳实验室APP,快速收到回复
  • 每一个新的提问,单独发一个新帖子
  • 帖子需要目的,你要做什么?
  • 如果涉及代码,需要报错提示全部代码文本,请注意不要贴代码图片
  • 必看:玩转星瞳论坛了解一下图片上传,代码格式等问题。
  • OSError:Sleep Failed



    • 0_1555313189920_b707affe-4e1d-444a-93a9-625893feef0e-image.png

      # Sensor Sleep Mode Example.
      # This example demonstrates the sensor sleep mode. The sleep mode saves around
      # 40mA when enabled and it's automatically cleared when calling sensor reset().
      
      import sensor, image, time
      
      sensor.reset()                      # Reset and initialize the sensor.
      sensor.set_pixformat(sensor.RGB565) # Set pixel format to RGB565 (or GRAYSCALE)
      sensor.set_framesize(sensor.QVGA)   # Set frame size to QVGA (320x240)
      sensor.skip_frames(time = 3000)     # Capture frames for 3000ms.
      sensor.sleep(True)                  # Enable sensor sleep mode (saves about 40mA).
      


    • 我运行这个代码不会出错,建议你返厂维修。