he everyone, so i made a UDP connection between two Arduino,
and i want to control the LED in the Second Arduino From the First by Sending a letter 'O'
and make it off by Sending a letter 'F'
Udp.read(packetBuffer, UDP_TX_PACKET_MAX_SIZE);
Serial.println("Contents:");
// if(strcmp(packetBuffer,"Crestron connect"==0)){
if ( packetBuffer == 'O') {
digitalWrite(LED, HIGH);
Serial.println("ON");
}
else if ( packetBuffer == 'F') {
digitalWrite(LED, LOW);
Serial.println("OF");
}
Serial.println(packetBuffer);
}
am I comparing the incoming chart the right way?
cuz it doesn't go inside the if