Temperature example script (phyduino.py) Prints the temperature from the shield's LMT84 sensor once a second.
- Connect
- JP4 on 5 V, JP1 on INT and JP2 on EXT (A3). With JP2 on INT, use set_output_pin("A0").
- Uses
- set_output_pin(), temperature(); mcu.analog_averaging()
import time
import analog_shield as shield
import phyduino as mcu
shield.set_output_pin("A3")
mcu.analog_averaging(16)
while True:
print("%.1f C" % shield.temperature())
time.sleep(1)