This example shows how to use the new BOSCH - API 'BMP2' with a BMP280 - Sensor.
Set the Bord which you are using: e.g. Run `idf.py set-target esp32c3'
Note: For ESP32 - Board you can now user Platformio - since the ide supports the functions.
Open the project configuration menu (idf.py menuconfig
).
In the Example Configuration
menu:
- Set the connected PINs in the configuration.
- Set
I2C_MASTER_SCL
. - Set
I2C_MASTER_SDA
.
- Set
Optional: If you need, change the other options according to your requirements.
Build the project and flash it to the board, then run the monitor tool to view the serial output:
Run idf.py -p PORT flash monitor
to build, flash and monitor the project.
(To exit the serial monitor, type Ctrl-]
.)
See the Getting Started Guide for all the steps to configure and use the ESP-IDF to build projects.
- ESP-IDF Getting Started Guide on ESP32
- ESP-IDF Getting Started Guide on ESP32-S2
- ESP-IDF Getting Started Guide on ESP32-C3
Note that the output, in particular the order of the output, may vary depending on the environment.