Skip to content

getFloat()

CreateiveRobotics edited this page Mar 7, 2020 · 2 revisions

bool getFloat(float &myFloat)

Try and convert the next item in the payload into a float. If the attempt was sucesfull the result will be written to the myFloat variable, and the method will return true.

example:

int myFloat; if(cmd.getFloat(myFloat)){ cmd.print("Success, my float is: "); cmd.println(myFloat); }

Clone this wiki locally