devinaconley/arduino-plotter

NaN on vertical axis

Closed this issue · 1 comments

Using V2.3.3 downloaded today (ZIP file).
I'm not sure if this is the same problem reported before (#19) but it relates to my previous issue #23.
If I only change the loop() code from this:-

void loop() 
{
 Vout=5.0*analogRead(SIG)/1023.0;
 p.Plot();
}

To this:-

void loop() 
{
 float Vnew=5.0*analogRead(SIG)/1023.0;
 if (Vout==Vnew) Vout=Vnew+.0001;
 p.Plot();
}

Then Listener.exe shows NaN on the vertical axis and no values are plotted. This was done to try to avoid consecutive values being the same (in case the NaN was caused by the previously reported bug #19)

I've done similar things in loop lately and they all worked so maybe this was a glitch.