That one would have probably had me stumped for hours. But then, not used to using BASIC, and having it all handed to me on a plate with sprintf() in C, these things aren't upper-most in my debugging mind
Re: Debugging my Power Monitor Code
6 years 7 months ago #12929
Using padding in the DecimalToStr command did indeed correct the conversion problem. No more of the glitch problems but also what I thought was just measurement noise is gone too. Below is a plot similar to those that had the glitches. This plot shows a battery discharge curve; the plot shows data taken every second for nearly an hour - over 3000 measurements. Man is the curve pretty!
The curve has a bit of inflection at the right side, caused by my LM-317-based constant current load falling off below around 3 volts. If the same load had continued, the line would be nearly vertical; the battery is just about dead at that point.