File tree Expand file tree Collapse file tree 2 files changed +28
-0
lines changed Expand file tree Collapse file tree 2 files changed +28
-0
lines changed Original file line number Diff line number Diff line change
1
+ import time
2
+ import board
3
+ import busio
4
+ import adafruit_pct2075
5
+ i2c = busio .I2C (board .SCL , board .SDA )
6
+
7
+ pct = adafruit_pct2075 .PCT2075 (i2c )
8
+ pct .high_temperature_threshold = 35.5
9
+ pct .temperature_hysteresis = 30.0
10
+ pct .high_temp_active_low = False
11
+ print ("High temp alert active low? %s" % pct .high_temp_active_low )
12
+
13
+ # Attach an LED with the Cathode to the INT pin and Anode to 3.3V with a current limiting resistor
14
+
15
+ while True :
16
+ print ("Temperature: %.2f C" % pct .temperature )
17
+ time .sleep (0.5 )
Original file line number Diff line number Diff line change
1
+ import time
2
+ import board
3
+ import busio
4
+ import adafruit_pct2075
5
+ i2c = busio .I2C (board .SCL , board .SDA )
6
+
7
+ pct = adafruit_pct2075 .PCT2075 (i2c )
8
+
9
+ while True :
10
+ print (pct .temperature )
11
+ time .sleep (0.5 )
You can’t perform that action at this time.
0 commit comments