Quantcast
Channel: Processing Forum
Viewing all articles
Browse latest Browse all 1768

Re : String to number, serial port?

$
0
0
"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