mirror of
https://github.com/supleed2/ELEC60013-ES-CW1.git
synced 2024-11-10 01:35:50 +00:00
Correct Active Setter Usage
This commit is contained in:
parent
540c3e44ef
commit
d758ed6f97
2
main.py
2
main.py
|
@ -14,7 +14,7 @@ print(temphumsensor.humidity) # read the humidity and print
|
||||||
|
|
||||||
print("========== Testing TMP006 ==========")
|
print("========== Testing TMP006 ==========")
|
||||||
irtempsensor = tmp006.TMP006(bus, 0x41, tmp006.SAMPLERATE_4HZ) # set up TMP006 sensor
|
irtempsensor = tmp006.TMP006(bus, 0x41, tmp006.SAMPLERATE_4HZ) # set up TMP006 sensor
|
||||||
irtempsensor.active(1) # turn on the sensor
|
irtempsensor.active = 1 # turn on the sensor
|
||||||
sleep(1) # wait for sensor to turn on
|
sleep(1) # wait for sensor to turn on
|
||||||
print(irtempsensor.manID) # read the manufacturer ID and print
|
print(irtempsensor.manID) # read the manufacturer ID and print
|
||||||
print(irtempsensor.devID) # read the device ID and print
|
print(irtempsensor.devID) # read the device ID and print
|
||||||
|
|
Loading…
Reference in a new issue