In the example labeled "Get temperature when there is only one 1-wire device on the bus", there is a typo and TemperatureSensor() call does not match the signature for this class and therefore fails.
Example
from digitemp.master import UART_Adapter
from digitemp.device import TemperatureSensor
sensor = TemperatureSensor(UART_Adapter('/dev/ttyS0') # <- missing ')'
sensor.info()
print(sensor.get_temperature())
Signature
def TemperatureSensor(bus, rom): # rom must be passed
Maybe you were thinking of OneWireTemperatureSensor() ?
In the example labeled "Get temperature when there is only one 1-wire device on the bus", there is a typo and
TemperatureSensor()
call does not match the signature for this class and therefore fails.Example
Signature
Maybe you were thinking of
OneWireTemperatureSensor()
?Thank you for sharing your library btw!