Project 44: |
||||||
Arduino IDE v2.3.4: ESP-NOW "Master" on left sends two ESP-NOW "Slaves" (Click to enlarge)
Overview: An ESP32-C3 microcontroller uses ESP-NOW in "Master" mode to transmit its BME280 sensor readings to WiFi MAC address "broadcast". Two "Slaves" receive and display the "Master" data in their Arduino Serial Monitors.
Note: If the ESP32-C3 devices are too close together when testing in the lab, the receiver(s) will appear to not work. That's most likely because the transmitter's signal is too strong given the receivers' proximity. Either move them far apart (not likely during testing!) or add the code snippet below to the transmitter C3. This setup() code will alter and show the TX strength.
WiFi.setTxPower(WIFI_POWER_2dBm);
// 2 = 8dBm, 5 = 20dBm. 0 to 20.5 in 0.5 increments. 2,5,7,19 work
with ESP32-C3.
Microcontroller & Docs: ESP32-C3 Dev Board: https://github.com/sidharthmohannair/Tutorial-ESP32-C3-Super-Mini/.
ESP32-C3 Arduino Code: My modified code is from Random Nerd Tutorials course, Learn_ESP32_with_Arduino_IDE_V3_0
Testing: Use the BME280 sensor and run the Adafruit test file bme280test.ino
ESP-NOW Reference: https://demo-dijiudu.readthedocs.io/en/latest/api-reference/wifi/esp_now.html
|
Updated 2025-04-19