Example scripts for the Phyduino Pico that use phyduino.py (import phyduino as mcu), in examples/phyduino/, written the usual MicroPython way: the set-up code at the top of the file runs once, then a while True: loop runs over and over. Analogue readings are 12-bit (0-4095) and PWM duty is 0-65535.
The examples are in folders named after the Arduino IDE's example categories, with board-specific ones in phyduino_pico/. Each example is a main.py in its own folder, because MicroPython runs main.py each time the board starts. Each page below explains what the script does, how to wire it and what it prints, followed by its source. The same examples written with arduino.py are on the arduino.py examples page.
With the Phyduino Pico firmware on the board, run a script from PyCharm, or with mpremote run examples/phyduino/<folder>/<name>/main.py. To have it run every time the board starts, copy its main.py to the board: mpremote cp examples/phyduino/<folder>/<name>/main.py :, then press RESET.
- 01_basics
-
- 02_digital
-
- 03_analog
-
- 04_communication
| Example | What it shows |
| ASCII Table | Characters with their decimal, hex, octal and binary values |
| Graph | Sending readings to a serial plotter |
| I2C Scanner | Finding the devices on the I2C bus |
| Physical Pixel | Switching the LED from the computer |
| UART Loopback | Sending and receiving on UART0 |
- phyduino_pico
- Features of this board that the Arduino examples have no match for.