Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
JavanXD committed Apr 19, 2020
1 parent 115ae6d commit 28302e4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion read_ds18b20.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def measure_temperature(sensor):
print("GPIO" + str(gpio_3V) + " is defined as 3.3V power source for Ds18b20 '" + sensor["device_id"] + "'")
setup_gpio(gpio_3V)

if (os.path.isdir("/sys/bus/w1/devices/" + sensor["device_id"]) == False) and sensor["device_id"] != "undefined":
if not os.path.isdir("/sys/bus/w1/devices/" + sensor["device_id"]):
error_log("Info: Resetting 3.3V GPIO" + str(gpio_3V) + " because Ds18b20 with device-id '" + sensor["device_id"] + "' was missing.")
reset_ds18b20_3V(gpio_3V)

Expand Down

0 comments on commit 28302e4

Please sign in to comment.