Convert string to float occurs NaN error in Processing
问题 I meet a problem in the Processing, and when i convert the value(string) into float, the first value is good, but the rests are all NaN . I could not find a way to solve this. And i print the string value for test. And it is correct, but after i convert it into float. It will be NaN . ps: the value is from the serial, i connected my Arduino with Proceesing. following is a part of codes while(myport.available() > 0) { myString = myport.readString(); //read the string from serial num = float