Quantcast
Viewing all articles
Browse latest Browse all 1768

Re : String to number, serial port?

"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));

Viewing all articles
Browse latest Browse all 1768

Trending Articles