What is the most resource efficient way of waiting for user input from a serial connection? Currently, I am using:
while (Serial.available()==0){}
and was wondering if this is the best option. The Arduino could be waiting for hours on battery power in an autonomous vehicle for a command so I am interested in using as little power as possible.