Sending Sensor Data Over WiFi CONTRIBUTORS: ROB-24601

In the code there are two mistakes:

  1. the transmitter and receiver Sketch do not have the same number of variables transmitted. Both should have 3 variables

  2. Transmitter code:

// Register peer

esp_now_peer_info_t peerInfo;

memcpy(peerInfo.peer_addr, broadcastAddress, 6);

peerInfo.channel = 0;

peerInfo.encrypt = false;

Line: esp_now_peer_info_t peerInfo; must be moved just befor void setup - then the programm works.

best regards

Hermann

Hope sparkfun will look into this matter. There should be no confusion in example codes.