Using the monitor input to trigger a function

How can I use the monitor input to trigger a function? That is, if there is an input from the serial monitor a function is called but otherwise the loop continues.

To be clear, I don't want to wait for an input but if one is given a function is called.

Give us an example.

You can check if data is received with if(Serial.available() >0).

Your question does not srem to be related to IDE2.x and hence is moved to a more suitable location on the forum.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.