main.c
// send a broadcast message to all the nodes specifying the new animation mode for all of them
send a broadcast message to all the nodes specifying the new animation mode for all of them
send a broadcast message to all the nodes specifying the new animation mode for all of them
void sendMessage(String *msg) {
  String currentTime = String(mesh.getNodeTime());
  String json_msg;
  if (*msg == "KEYFRAME") {
    json_msg = "{\"msg\":\"KEYFRAME\",\"timestamp\":" + currentTime +"}";  
    Serial.printf(">> CONTROLLER KEYFRAME - broadcast message sent: %s\n", json_msg.c_str());
  }
  else {
    json_msg = "{\"msg\":" + String(displayMode) +",\"timestamp\":" + currentTime +"}";
  }
  mesh.sendBroadcast(json_msg);
}
void sendMessage ( String * msg ) { String currentTime = String ( mesh . getNodeTime ( ) ) ; String json_msg ; if ( * msg == " " ) { json_msg = " \" \" \" \" \" \" " + currentTime + " " ; Serial . printf ( " \n " , json_msg . c_str ( ) ) ; } else { json_msg = " \" \" " + String ( displayMode ) + " \" \" " + currentTime + " " ; } mesh . sendBroadcast ( json_msg ) ; }
send a broadcast message to all the nodes specifying the new animation mode for all of them
send a broadcast message to all the nodes specifying the new animation mode for all of them