ESPnow adding a second peer
Posted: Wed Jan 09, 2019 5:21 pm
Hi
How does one go about adding a second peer to receive data?
No go....am i missing something?
Thanks
How does one go about adding a second peer to receive data?
No go....am i missing something?
Thanks
Code: Select all
I duplicated the existing slave and changed the mac by one digit:
uint8_t mac[] = {0x37, 0x33, 0x33, 0x33, 0x33, 0x33}; //was 0x36, 0x33, 0x33, 0x33, 0x33, 0x33
I added the following addition to the master:
uint8_t remoteMac[] = {0x36, 0x33, 0x33, 0x33, 0x33, 0x33}; //Address of slave1
uint8_t remoteMac2[] = {0x37, 0x33, 0x33, 0x33, 0x33, 0x33}; //Added slave2
esp_now_add_peer(remoteMac, ESP_NOW_ROLE_SLAVE, WIFI_CHANNEL, NULL, 0);
esp_now_add_peer(remoteMac2, ESP_NOW_ROLE_SLAVE, WIFI_CHANNEL, NULL, 0); //added slave2