I bought three Nano Every's from the Arduino store. I foolishly assumed that my existing Nano code would run on it. OK, I can see that, since it is a different processor, has more memory. But some of the things should be the same.
The most curious one is the extra CR\LF. In order to debug, I print out single characters to indicate the state of various routines. [ Serial.print('x'); ] I have a 40 second delay [unsigned long i= millis();while(millis()-i<40000); ]to simulate the unit powering down. When the delay is complete, I print [ Serial.println("Awake"); ] I get a blank line where there should be none.
Here's the really curious thing: Only on two of the Nano Every's, the other is as expected, as it is on the other five Nano's I'm running.
I have carefully looked at my code and I have only 1 println() and no \r\n's in all the statements that are executed in loop().
This is disturbing because it makes me think that there are other quirks in the Every.
Good question about delay(). It is my understanding that delay() uses a timer and an interrupt. From reading the various projects of TMRh20, interrupts will interfere with the code written for the radio. This implementation of a blocking delay does not block interrupts.
Yeah, UKHeliBob, it should be easy. I wrote a very simple bit of code as you suggested and the anomaly did not present itself.
So it would appear that there is something about my code, though the anomaly only appears on the two Every's , not the third one I have, nor on five other older Nanos, nor a Uno.
Not really worth pursuing at this point, I just thought that someone else might have seen something like it. Maybe it's just me.