I notice that in some of the coding you have a ! in front of Serial
ie- While (!serial);
my question is what is the exclamation mark there for.
thanks
Kevin
The explanation mark is the NOT operator. It inverts true to false and false to true.
while (! Serial); "ensures that there is something at the other end of the USB connection for the Arduino to talk to before it starts sending messages. Otherwise, the message might be sent, but not displayed. This line is actually only necessary if you are using an Arduino Leonardo, (and apparently the Nano 33 IoT?) because the Arduino Uno automatically resets the Arduino board when you open the Serial Monitor, whereas this does not happen with the Leonardo."
Hi thank you for your reply
It does make sense and I now understand why it is so.
This side of Arduino is new to me.
Regards
Kevin