ESP-NOW Mac Address compile error
Posted: Sun Feb 14, 2021 12:07 pm
Hello,
Trying to run the samples from https://randomnerdtutorials.com/esp-now ... duino-ide/ Getting Started with ESP-NOW (ESP32 with Arduino IDE), but keep running into compile error. The board I am using is the ESP-WROON-32 dev board.
If I run the sketches with, everything runs as expected.
However, if I replace the broadcast address with the Mac Address of the receiver, I get the following error message.
I have read some posts that suggest removing one of the instances of "WiFI.h", but that doesn't fix the issue.
Any suggestions?
Thanks
Trying to run the samples from https://randomnerdtutorials.com/esp-now ... duino-ide/ Getting Started with ESP-NOW (ESP32 with Arduino IDE), but keep running into compile error. The board I am using is the ESP-WROON-32 dev board.
If I run the sketches with
- // REPLACE WITH YOUR RECEIVER MAC Address
- uint8_t broadcastAddress[] = {0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF};
However, if I replace the broadcast address with the Mac Address of the receiver
- // REPLACE WITH YOUR RECEIVER MAC Address
- uint8_t broadcastAddress[] = {AC:67:B2:26:5D:78};
- Arduino: 1.8.13 (Windows 10),
- Board: "ESP32 Dev Module,
- Disabled,
- Default 4MB with spiffs (1.2MB APP/1.5MB SPIFFS),
- 240MHz (WiFi/BT),
- QIO, 80MHz,
- 4MB (32Mb),
- 921600,
- None"
- sketch_feb14a:16:36: error: expected '}' before ':' token
- uint8_t broadcastAddress[] = {AC:67:B2:26:5D:78}; ^
- sketch_feb14a:16:36: error: name 'AC' used in a GNU-style designated initializer for an array
- sketch_feb14a:16:36: error: expected ',' or ';' before ':' token
- sketch_feb14a:16:48: error: expected declaration before '}' token
- uint8_t broadcastAddress[] = {AC:67:B2:26:5D:78}; ^
- Multiple libraries were found for "WiFi.h"
- Used: C:\Users\name\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.4\libraries\WiFi
- Not used: C:\Program Files (x86)\Arduino\libraries\WiFi
- exit status 1
- expected '}' before ':' token
Any suggestions?
Thanks