Light shield on the RT1062 using pyb

For the RT1062 built-in examples, the light shield example is using pyb which is not supported by the RT1062.

Steps to reproduce the behavior:

  1. Connect the RT1062 board.
  2. Click File->Examples->Light Shield->Light.py
  3. Run script.
  4. See error “ImportError: no module named ‘pyb’”

The expected behavior is for the script to not use pyb and possibly use machine instead.

Script modifications will be needed to support the change.

  • IDE version: 4.1.5
  • Firmware version: 4.5.6
  • Board: RT1062
  • OS: Windows

Code link in the repo: openmv/scripts/examples/50-OpenMV-Boards/60-Shields/68-Light-Shield/light.py at 60df3e61fce74715be785a4b41677b630f1d4784 · openmv/openmv · GitHub

I created a github issue (assuming it is one): openmv/openmv: OpenMV Camera Module (github.com)

1 Like

Having the same issue here and with any other older script that uses pyb

pyb doesn’t work on the RT1062 as it’s not STM32 based.

So how do we make the light shield work on the RT1062?

You can just do high or low via P6 and you need to add VIN power to the camera for it to work.

1 Like

Got it working, thanks Kwabena