Sensors
General
The senseBox contains various environmental sensors. In this chapter, we will initially focus on the sensors that are already built into the senseBox MCU or can be connected via I2C cables.
To read and display measurements, it's best to use the display. In this chapter, we will use a minimal example to display measurements on the screen.
Accelerometer (BMX055)
The accelerometer is already built into the senseBox MCU. It can provide you with the acceleration along the X, Y, and Z axes, as well as the total acceleration. You can select the measurement range between 2g, 4g, 8g, and 16g.
The average acceleration due to gravity is denoted by g and is approximately 9.81 m/s2.
Button
A button is already built into the senseBox MCU. Additional buttons can be connected via the three digital Ports. In the dropdown menu, you can select different modes for the button:
- is pressed: With this mode, you can check if the button is currently pressed. You will receive either the value TRUE or FALSE.
- was pressed: With this mode, you can check if the button was pressed. You will receive TRUE only after the button has been pressed and released.
- as switch: When using this mode, you can use the button like a light switch. The status will be saved until the button is pressed again.
Temperature and Humidity Sensor (HDC1080)
The temperature and humidity sensor is connected to one of the five I2C/Wire ports. It can provide you with the temperature in °C and the relative humidity in %.
Temperature and Pressure Sensor (BMP280)
The temperature and pressure sensor is connected to one of the five I2C/Wire ports. It can provide you with the temperature in °C, the air pressure in Pa, and the altitude above sea level in meters.