Go Down

Topic: serialEvent with software serial (Read 715 times) previous topic - next topic

groundfungus

Is there a way to use serialEvent (or something like that) with a software serial port or is polling necessary? 

Charlie

PaulS

All that serialEvent() does is register a callback to be called at the end of loop. In that function, you still need to call Serial.available() to see how much data, if any, there is to process.

The end result is that it really offers no benefit over polling.

groundfungus

Thanks for the answer.  I was thinking that serialEvent was more like an interrupt.

Charlie

tuxduino

I think serialEvent() is tied to hardware serial port(s).

Go Up
 


Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy