Below I have a really simple code that is supposed to loop and delay while no data is sent. Once data is sent however, the code should leave the while loop and print. However, this does not happen at all!
What did I do wrong? Thanks!
void setup()
{
Serial.begin(9600);
// prints title with ending line break
Serial.println("ASCII Table ~ Character Map");
// wait for the long string to be sent
delay(100);
}
int number = 33; // first visible character '!' is #33
void loop()
{
// prints value unaltered, first will be '!'
while(Serial.available()==0){
delay(100);
}
Serial.print("AT+BTRNM=123456789ABC");
delay(100); // allow some time for the Serial data to be sent
}