2.4 Import library files

In order to facilitate calling various hardware on the control board, we encapsulate various functions into library files. When using, you only need to call the corresponding functions to quickly realize the corresponding functions. Here we introduce how to import the library files into PICO. .

1. The import of library files is similar to the establishment of self-starting files in the previous section. First, open the small garage file Pico Robot supporting materials -> Appendix -> Library -> pico_car.py.

image-20220305115417261

2. Select File - Save As.

image-20220305115432683

3. Select Raspberry Pi Pico.

image-20220305115441373

4. Enter pico_car.py in File name, note that the file name of pico_car.py must be called here, and then click OK.

image-20220305115518571

5. At this point, the pico_car.py file becomes [pico_car.py], where [ ] means that the file exists in PICO, and the library file is imported successfully.

image-20220209101817627