Serial.read()
into a string so I can do if x 'testing statements'
, etc.?Serial.readString()
and Serial.readStringUntil()
to parse strings from Serial on the Arduino.Serial.parseInt()
to read integer values from serial.my stringn5
and the result would be str = 'my string'
and x = 5
String
type, to be more efficient and to avoid memory problems. It also avoids using the readStringUntil()
function, to not timeout before the input arrives.Serial.begin(9600);
int
datatype) coming in from your potentiometer: int sensorValue = analogRead(A0);
Serial.println(sensorValue)