Package rpitemp :: Module rpitemp :: Class W1Bus
[hide private]
[frames] | no frames]

Class W1Bus

source code

Class for accessing the onewire bus of the Raspberry Pi

Instance Methods [hide private]
 
__init__(self) source code
str
filename(self, device_id)
Return the filename of the given sensor.
source code
float
read_value(self, device_id)
Return the temperature of the sensor with the given id.
source code
Instance Variables [hide private]
list devices
list of the connected devices, the index is the device id
Method Details [hide private]

read_value(self, device_id)

source code 

Return the temperature of the sensor with the given id.

Parameters:
  • device_id (int) - sensor id in the device list
Returns: float