Import the library, pick the camera mode
The first thing in the program tells the hub "I am using the SharpShot Vision library". Without it the hub does not know UniCam and stops with NameError.
- Download the library (save the file, keep its name): MBC_UniCam.py.
- In Pybricks Code press "Import a file" in the file list and import it into the same project (not a sub-folder).
- Plug the camera into any port A–F; the hub powers it. Green hub name on the camera screen = connected.
- Pick the camera mode: choose the camera mode and sub-option in the camera's MODE menu, and click the same mode number below (mode number = camera mode × 10 + sub-option).