Loading...
Searching...
No Matches
phyduino.py examples

Example scripts for the Analog Shield that use phyduino.py (import phyduino as mcu) with analog_shield.py, in examples/phyduino/analog_shield/, 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. The same examples written with arduino.py are on the arduino.py examples page.

With analog_shield.py on the board, run a script from PyCharm, or with mpremote run examples/phyduino/analog_shield/<name>/main.py. To have it run every time the board starts, copy its main.py to the board: mpremote cp examples/phyduino/analog_shield/<name>/main.py :, then press RESET.

Example What it shows
Blink LEDs Blinking the green and red LEDs in turn
Encoder Counter Counting the encoder's clicks; a press sets it back to 0
Encoder LED Brightness Setting the green LED's brightness with the encoder
Read Pot The potentiometer's reading on A5
Temperature The LMT84's temperature through the amplifier
Amplifier Chain The voltage at each stage of the amplifier