This project implements the use of a BME280 breakout board interfacing with the Micro RP2040. BME280 breakout board has an I2C communication interface to communicate. With this project, we try to extract the Digital Humidity, pressure, and temperature sensor data generated by BME280 controlled by the master Micro RP2040 board.
Users can process the data as per their needs.
2. HARDWARE SETUPAs mentioned in the figure, we require 2 major components Micro RP2040 & BME280 breakout board, some jumper wires, and a USB to connect with the PC.
1) Micro RP2040
The Micro RP2040 - is a small and compact version of the popular Raspberry Pi Pico.
With 22 multifunction GPIO pins and a Type-C port, the Micro RP2040 has all the functionality of the Raspberry Pi Pico but in a smaller size. With its breadboard-friendly design, you can easily integrate it into your prototyping setup and explore endless possibilities for creating interactive and innovative projects.
2) BME280 Breakout Board
The BME280 sensor is widely used in various applications such as weather monitoring, indoor climate control, altitude tracking, Indoor navigation (change of floor detection, elevator detection), outdoor Navigation, and IoT projects requiring environmental sensing.
3) Jumper Wires
- Jumper Wires are required for connecting the BME280 sensor board to the micro RP2040 board.
- We have used 4 jumper wires.
4) USB
Use C type USB to connect the Micro RP2040 board to the PC.
2.2.PIN to PIN MappingFree Wired Connection Setup
Bread Board Setup
3. SOFTWARE SETUP
To develop the firmware for the above setup, follow the given steps:
- Connect the Micro RP2040 board to the PC using C-type USB.
- Download and install Thonny IDE from the official site.
- Ensure that you have installed Boot the firmware. If not then follow the procedure attached in the given link:
After installing the boot firmware follow the given procedure:
1) Open the Thonny IDE.
2) After connecting your board ensure that you have selected the Micro Python RP2040 as provided in the given figure.
3) You have successfully set up the environment for the firmware programming.
4) Proceed with the code mentioned in the snippets.
STEP 1: Import the library file for the BME280 sensor to the RP2040 board and give it a suitable name e.g. : bme280.py. This library consists of various information like slave addresses, Functions to retrieve the data, etc.
STEP 2: Using the library that has been imported in Step 1, we write the main code-named main.py.
STEP 3: Save the file and now your code is ready to run. Click on the run Button.
You will get the result of temperature, pressure, and humidity on the console of Thonny or if you want to run standalone then import the main.py file in RP2040 and run the file, you will get the result on any serial monitor e.g. Tera term, etc. by choosing suitable port.
Comments
Please log in or sign up to comment.