arduinoprocessing

NaN error while converting float value to string


I am trying to rotate the box via processing along with arduino and accelerometer. But when i ran println statement in processing ,it shows " NaN". ARDUINO CODE

Processing code


Solution

  • You can go with one function which is there in arduino library named as

    isnan(yourNumber)

    for that you have to include

    math.h

    I have taking this reference from

    https://www.arduino.cc/en/Reference/MathHeader

    Thank you!