This program reads the temperature from a BMP280 sensor connected to an ESP32 board and publishes it to an MQTT broker. The ESP32 will go to sleep for a specified amount of time and wake up periodically to read the temperature and publish it to the broker.
2022
- Install the Arduino IDE and the ESP32 core for Arduino.
- Clone this repository.
- Open the esp32-bmp280-mqtt.ino file in the Arduino IDE.
- Modify the ssid, password, and mqtt_server variables to match your Wi-Fi network and MQTT broker settings.
- Upload the sketch to your ESP32 board.
- Connect the BMP280 sensor to the ESP32 according to the wiring diagram in the code.
- Power on the ESP32 board.
- The ESP32 will connect to Wi-Fi and MQTT, collect temperature data from the BMP280 sensor, and publish it to the "esp32/temp3" topic on the MQTT broker.
- The ESP32 will then go into deep sleep mode for the specified amount of time before waking up to collect and publish data again.
This program is licensed under the MIT License - see the LICENSE.md file for details.