I used availableForWrite() function as below in my code. When I compile it for nano 33 IoT, everything is OK and compiles perfectly. However, when I change the board to nano 33 BLE, I end up with two scenarios: 1. using Arduino IDE as compiler > gives no error but the board doesn't after programming. 2. using the web-based compiler in Arduino website > give the following error:
error: 'class Arduino::USBSerial' has no member named 'availableForWrite'; did you mean 'available'?"
my code:
NoreplyTime=millis();
TimePassed= millis()-NoreplyTime;
while(!Serial.availableForWrite()){
TimePassed= millis()-NoreplyTime;
if (TimePassed>1000){
return false;
}
}
even simply having:
while (!Serial.availableForWrite());
generates error ONLY for nano 33 BLE board!
Thoughts?