A simple way to turn two ESP8266 devices into interactive communication devices using ESP-NOW. This project includes a built-in web server to pre-make phrases and is built for the LCD1602 with an I2C backpack.
- Real-time communication between two ESP8266 devices
- Web server for pre-saving phrases
- LCD display for message viewing
- Built-in message saving and deletion
- Simple and intuitive user interface
- Efficient, low-power communication using ESP-NOW
- Retransmission: If a message is sent and the peer is not within reach, the device will keep retransmitting the message until it is acknowledged (persists reboots).
- LoRa: LoRa for extended range.
- Keypad_I2C: Support for 4x3 Matrix Keypads via an I2C expander like PCF8574.
- Two ESP8266 devices
- LCD1602 with I2C backpack
- Push buttons (4)
- LEDs (2)
Function | Pin |
---|---|
LCD SDA | D1 |
LCD SCL | D2 |
Display Button | D3 |
Up Button | D5 |
Down Button | D6 |
Enter Button | D7 |
Blue LED | D8 |
Red LED | D4 |
- ESP8266 board package installed in Arduino IDE
- Arduino IDE installed
- ESP8266WiFi library
- ESP8266WebServer library
- espnow library
- Wire library
- LiquidCrystal_PCF8574 library
- FS library
Device MAC Addresses
1: 0xA0, 0x20, 0xA6, 0x1A, 0xA3, 0x13 (AP1 TARGET MAC)2: 0x8C, 0xCE, 0x4E, 0xCB, 0x0A, 0xF0 (AP2 TARGET MAC)
- Upload the following code to your ESP8266 devices to identify their MAC addresses:
#include <ESP8266WiFi.h>
void setup() {
Serial.begin(115200);
Serial.println();
Serial.print("ESP Board MAC Address: ");
Serial.println(WiFi.macAddress());
}
void loop() {
}
- Open the serial monitor: Tools > Serial Monitor or
Ctrl + Shift + M
- Copy the MAC address and take note.
Tip: Label your devices to keep track of them.
- Copy the MAC address of the peer device into
Line 68
of the main code file in this repository. - Change SSID and Password on lines
10 and 11
.
Tip: Set a unique SSID for each device.
- Power on your ESP8266 devices.
- Connect to the WiFi network created by the devices.
- Access the web interface by going to
http://192.168.4.1
. - Use the web interface to save or send messages.
- Ensure both devices are powered on and within range.
- Check the serial monitor for error messages.
- Verify that the MAC addresses are correctly configured.
This project is licensed under the MIT License - see the LICENSE file for details.
- Rui Santos & Sara Santos - Random Nerd Tutorials
Happy building!