Temperature.md
December 28, 2021 ยท View on GitHub
Temperature
The temperature of the battery (in Celsius) can be easily retrieved from the hub.
from pylgbst.hub import MoveHub
from pylgbst.peripherals import Temperature
hub = MoveHub()
for port, device in hub.peripherals.items():
if isinstance(device, Temperature):
print("Battery temperature:", device.temperature)