class Onboard Sensors

The Datalogger is equipped with onboard sensors to provide temperature, humidity and coincell battery information.

Constructor

class omc048.onboard_sensors

Create a onboard sensors object associated with the data logger.

Methods

onboard_sensors.temp() float

Read the onboard temperature in degrees celcius.

onboard_sensors.hum() float

Read the onboard relative humidity in percent (0-100).

onboard_sensors.vbat() float

Read the Coincell battery voltage in volt.

Attention

Attention, the vsup monitor functinality is only compatible with BL: 1.03B0 and upwards!

onboard_sensors.vsup() float

Read the supply voltage in volt.

Example

The following example returns the loggers temperature, relative humidity and coincell voltage

import omc048

board_info = omc048.onboard_sensors()

temperature = board_info.temp()
humidity = board_info.hum()
battery = board_info.vbat()
#Will only work on loggers with BL: 1.03B0 and upwards
supply = board_info.vsup()

print("Temperature: {}\r\nHumidity: {}\r\nBatteryVoltage: {}\r\nSupplyVoltage: {}".format(temperature, humidity, battery,supply))