Import the library
The first thing in a block program is a red "from … import …" block under the yellow "set up". It tells Pybricks to use the WRO edition library.
Pick one library (the blocks are the same; only the name after from is different):
- Download the library (save the file and keep its name): MBC_hue12.py (only this sensor) or MBC_sensors.py (the all-in-one library). You picked
MBC_hue12.py. - In Pybricks Code, press "Import a file" in the file panel on the left and import it into the same project. Do not rename the file.
- Press "+" to add a new file and choose blocks.
- Drag the red "from … import …" block from the block list, attach it under "set up" and pick the two names.
The hub needs Pybricks firmware v4.0.0b5 or newer. Older firmware cannot read the WRO edition (all 12 points stay at 255).