Your new topic does not fit any of the above??? Check first. Then post here. Thanks.

Moderator: igrr

User avatar
By Zim
#79977 Hi
How does one go about adding a second peer to receive data?
No go....am i missing something?
Thanks


Code: Select allI 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