Example scripts for the Phyduino Pico that use the Arduino-style functions in arduino.py (from arduino import *), in examples/arduino/. Each script has the shape of an Arduino sketch: setup() runs once, then loop() runs over and over, using pinMode(), digitalWrite(), analogRead() (0-1023), analogWrite() (0-255), delay() and millis(). The main() at the end of each file starts them; leave it as it is.
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 phyduino.py are on the phyduino.py examples page.
With the Phyduino Pico firmware on the board, run a script from PyCharm, or with mpremote run examples/arduino/<folder>/<name>/main.py. To have it run every time the board starts, copy its main.py to the board: mpremote cp examples/arduino/<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.