• 星瞳实验室APP,快速收到回复。扫描二维码或者点击 https://singtown.com/app/
  • 必看:玩转星瞳论坛了解一下图片上传,代码格式等问题。
  • 每一个新的提问,单独发一个新帖子
  • 描述一定要详细 描述一定要详细 描述一定要详细
  • 请贴出具体的的目的,就是你要做什么。
  • 请贴出具体的代码,与报错提示
  • 代码一定要让别人可以运行的文本,不要贴图片
  • Value error sensor control failed 是怎么回事?



    • import pyb
      import sensor, image, time,utime
      import car
      from pid import PID
      from pyb import UART
      from code_123 import code_123
      from code_132 import code_132
      from code_213 import code_213
      from code_231 import code_231
      from code_321 import code_321
      from code_312 import code_312
      from Read import uart_read
      from red import find_red
      from blue import find_blue
      from green import find_green
      from Test import wave_distance_process
      
      sensor.reset()
      sensor.set_vflip(True)
      sensor.set_hmirror(True)
      sensor.set_pixformat(sensor.RGB565)
      sensor.set_framesize(sensor.QQVGA)
      sensor.skip_frames(10)
      sensor.set_auto_whitebal(False)
      clock = time.clock()
      uart = UART(3, 115200)
      m = [0,0,0]
      while(True):
          car.run(50,50)
          img = sensor.snapshot()
          img.lens_corr(1)
          for code in img.find_qrcodes():
              uart.write(code.payload()+'\0')
              m=list(code.payload())
              if(m!=[0,0,0]):
                  print(m)
                  if m[0]=='1' and m[1]=='2' and m[2]=='3':
                      find_red()
                      wave_distance_process()
                      while(wave_distance_process()>=6.0 and wave_distance_process()<=9.0):
                          find_red()
                      find_green()
                      while(wave_distance_process()>=6.0 and wave_distance_process()<=9.0):
                          find_green()
                      find_blue()
                      while(wave_distance_process()>=6.0 and wave_distance_process()<=9.0):
                          find_blue()
      


    • 你的程序我没有办法运行,不是全部的源码