Any idea how I can implement reading the pin state and changing the mode whilst also monitoring the serial input?
Do them independently. Read the switch state. Then, read the serial data, if any.
Any idea how I can implement reading the pin state and changing the mode whilst also monitoring the serial input?
Do them independently. Read the switch state. Then, read the serial data, if any.