Open antoinepetty opened 4 years ago
They have a serialEvent
function defined in the source, is that different from the Arduino source for the function?
From my experience I haven't ever needed an explicit call for this function when it was defined in the source. Try running the example and you'll see what I mean: https://www.arduino.cc/en/Tutorial/SerialEvent
The documentation says it's called when new data is received, but this thread says it's called at the end of each loop: https://forum.arduino.cc/index.php?topic=449625.0
Ah interesting, I didn't know it was somewhat of a "magic" function.
Thanks for those links, it's nice to see what happens under the hood!
I think SerialEvent() is called by the Arduino firmware at the start of each loop anyway. I don't think you need to explicitly call this function anywhere.