Get the temperature, humidity and pressure with the OpenMote Sensor Board
Check the temperature, humidity and pressure with the openmote B sensor board and the BME280 microcontroller
25 February, 2022 by
Get the temperature, humidity and pressure with the OpenMote Sensor Board
Boot & Work Corp. S.L., Fernandez Queralt Martinez

Introduction

When we talk about air variations on the atmosphere, there are three factors that mainly influence:

  1. Temperature

  2. Relative humidity

  3. Atmospheric pressure

So, would you like to know what a sensor is, how it can be used and how we can use the openmote B sensor board to measure temperature, humidity and atmospheric pressure? 

Latest Posts

A sensor is a device that detects and responds to a physical stimulus

Most sensors work by converting a physical input into an electrical signal, by processing the input signal by a circuit or microprocessor to provide a meaningful output.

Sensors can be found in a variety of applications, from automotive systems to medical devices.

Openmote B sensors - Get the temperature, humidity and pressure with the OpenMote Sensor Board

BME280 - Get the temperature, humidity and pressure with the OpenMote Sensor Board

BME280

As described in its webpage, the BME is a humidity sensor specially developed for mobile applications and wearables where size and low power consumption are key design parameters. 

The unit combines high linearity and high accuracy sensors and is perfectly feasible for low current consumption, long-term stability and high EMC robustness. 

The humidity sensor offers an extremely fast response time and therefore supports performance requirements for emerging applications such as context awareness, and high accuracy over a wide temperature range.

Download openmote B files

To be able to program the openmote with the BME280 microcontroller from the openmote sensor board, we will first have to download the openmote files which contain all the files needed.

1. So, we are going to visit this URL >>>

2. Click on the openmote-fw-20220225.tar.bz2 

3. Once clicked, the files should be downloaded.

4. Extract the files.

5. In the openmote-fw/test/test-bme280/src/main.cpp you will find the main code that you will be able to run.

6. And in the openmote-fw/drivers/bme280 you will be able to see the driver for the temperature, humidity and pressure sensor.

Index of openmote B - Get the temperature, humidity and pressure with the OpenMote Sensor Board
Temperature, humidity and pressure sensor - Openmote

Run the code

In order to run the openmote codes, install docker-compose and run any openmote test for testing different modules. In this case, we are going to make the test-bme280 run.

So, from the openmote-fw/ directory and once the docker-compose is installed, run the following command:

docker-compose run --rm openmote test-bme280

Visualize the data

What the code above does, is get the temperature, humidity and pressure values and send them to the serial port. So now, we are going to visualize that data by using the screening tool. So:

1. Update the package manager.

sudo apt update

2. Install screen.

sudo apt install screen

3. Check which is the serial port that you want to check.

ls /dev/ttyUSB*


4. In our case, we have just one openmote connected. Since when you connect an openmote to the USB, two USB ports are created and the one from which we can get the data is the highest, we are going to open the screen from that serial port. Finally, the baud rate is also needed, and it has to be the same as specified in the main code. By default: 115200.

screen /dev/ttyUSB1 115200

5. Receive the data. Exit with: Ctrl, \, and y 

Receiving the data - Openmote

Troubleshooting

  • It can be that you get an ERROR: Timeout waiting for ACK/NACK after 'Synch (0x55 0x55)' when running the code for the first time. Just upload it again, it should work when you upload the code again.

ERROR - Openmote B

Find what you are looking for
Search in our Blog

Get the temperature, humidity and pressure with the OpenMote Sensor Board
Boot & Work Corp. S.L., Fernandez Queralt Martinez
25 February, 2022
Share this post
Archive

Looking for your ideal Programmable Logic Controller?

Take a look at this product comparison with other industrial controllers Arduino-based. 

We are comparing inputs, outputs, communications and other features with the ones of the relevant brands.


Industrial PLC comparison >>>

Do you want more information?

Just fill the form!

Tell me more!