"I got an error"
What kind of error? We are not psychic...
Often, when dealing with the serial library, data is prefixed or postfixed with spaces.
Try:
int number = int(trim(string));
What kind of error? We are not psychic...
Often, when dealing with the serial library, data is prefixed or postfixed with spaces.
Try:
int number = int(trim(string));