Environmental

Python Library for Bosch Sensortec BME280 Environmental Sensor.

Python Library

Turta_Env_280 library is responsible for reading temperature, humidity, and pressure data from the BME280 sensor.

Initialization

Add the following statement to the top of your Python code.

from turta_sensoruhat import Turta_Env_280

Then, create an instance of the Turta_Env_280 class.

env = Turta_Env_280.EnvironmentalSensor()

Now you're ready to access the library by calling its instance.

Basic Members

Read Temperature

Reads the temperature in Celsius.

float read_temperature()
  • Parameters

    • None

  • Returns

    • Float: Temperature reading.

Read Humidity

Reads the relative humidity.

float read_humidity()
  • Parameters

    • None

  • Returns

    • Float: Relative humidity reading.

Read Pressure

Reads the pressure in Pa.

float read_pressure()
  • Parameters

    • None

  • Returns

    • Float: Air pressure in Pa.

Read Altitude

Reads the altitude from the sea level in meters.

float read_altitude(meanSeaLevelPressureInBar)
  • Parameters

    • Float meanSeaLevelPressureInBar: Mean sea level pressure in bar.

  • Returns

    • Float: Altitude from the sea level.

Finalizer

When exiting from the program, the library stops the sensor.

Last updated