coral.enviro.board

class coral.enviro.board.EnviroBoard

An interface for all input and output modules on the Environmental Sensor Board.

temperature

Gets the current temperature, in Celsius.

humidity

Gets the current relative humidity, in percentage.

ambient_light

Gets the ambient light, in lux.

pressure

Gets the current atmospheric pressure, in kPa.

grove_analog

Gets a raw value from a device connected to the board’s analog Grove connector.

Note

ADC is set to +/- 6V range, independent of supply voltage (selected by jumper).

display

Gets an instance of luma.core.device.device representing the board’s OLED display.

For example, you can write to the display using luma.core.render.canvas as follows:

enviro = EnviroBoard()

update_display(enviro.display, "Hello world")

def update_display(display, msg):
    with canvas(display) as draw:
        draw.text((0, 0), msg, fill='white')