Import the library
The first thing in a block program is a red "from … import …" block under the yellow "set up" block. It tells Pybricks to use the Servo6 library.
- Download the library (save the file and keep its name): MBC_servo6_Lib.py. The file name is
MBC_servo6_Lib.py. - In Pybricks Code, click "Import a file" in the file area on the left. Add it to the same project, and do not rename the file.
- Click "+" to add a new file, and choose blocks.
- Drag the red "from … import …" block from the block list and attach it under "set up". Pick
MBC_servo6_LibandMBC_SERVO6.