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_EV3.py.
- EV3 MicroPython (VS Code): put it in the project folder next to
main.py. Pybricks (code.pybricks.com): use "Import a file" in the same project. - Plug the camera into port 1–4 with an EV3 cable; the hub powers it. The EV3 sees it as an infrared sensor.
- 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).