While (!Serial.available()) does not appear to work with 0.8.0-RC.27

I am debugging a Mesh comms only Xenon end node, I have it plugged in and powered via USB serial.

When I inserted in setup()

while(!Serial.available()) delay(10);

To wait for serial terminal input before continuing setup() it just stopped and did not continue once - searched for an error posting but can't find one for this issue. Am I missing something?

What terminal program are you using to send data to the device?

I think I know what you are going to say - is this some DTR issue with the terminal software?

SerialTools on a Mac

Edit: I just ticked DTR and CTS and things started to appear. Not required with the Photon, etc.


Are you sure your code is running?
I’ve read in the other thread you were investigating MANUAL mode.
I’ve tried this and I never actually see the output on my terminal


void setup() {
  pinMode(D7, OUTPUT);
  while(!Serial.available()) {
  digitalWrite(D7, HIGH);

void loop() {

So it could be that the line isn’t actually reached.

As it turns out the reason why it didn’t work for me was that my local build did not produce a correct binary :confused:

1 Like