I have a sketch where I want to check my nRF24L01's and they work great.
However, due to Serial.print(ln) statements I noticed there is a lot of delay. Is this normal?
I mean, is it better not to user Serial.print at all during speed checks? (probably not).
What other options would be best? Some I can think off:
- Put all debugging info in an array and print it later (downside: more programming needed, probably special logging class)
- Print less (bad solution I think, also makes logging more difficult to read)
- Use another Arduino (so sending it by other means, via Wire or so? Never tried this, but I think this might be the best solutions.
- I couldn't find any print that does not wait until ready sending (which would cause minimal 'downtime' for the running sketch.
I did not try the third option but I think that would be ideal (but cost another Arduino). Since in my project I eventually use multiple AVRs (mostly Arduino's), I was thinking about sending all logging info to one Arduino and let that Arduino print out everything, that means, only one serial monitor, and no delays (or barely) for all others (where it matters).
Do you think this is the best for logging/debugging? Or are there better methods for use with an Arduino?