I decided to restore the demo program in an Orangutan SV328 w/LCD.
I found this project:
It appears to work on LEDs and beeps (not tested on motors), but the millivolt display routines are displaying garbage. For example:
// Displays the battery voltage.
int bat = read_battery_millivolts_sv();
print_long(bat); print("mV"); delay_ms(100);
The pot demo also displays garbage, as does the VBAT display in the quick demo mode.
My instincts tell me that print_long() should not be passed an int, but there seems to be no other way to convert a number to a string in the lib, and it’s done consistently throughout the demo code. I have tried printing ints with values I have assigned, and they display correctly.
I’ve tried quite a few variations on the analog read functions, but all the print_long() statements result in garbage (e.g., “1?] 4V”).
Any insight into what I’m doing wrong would be much appreciated. Or perhaps a link to the latest demo source that’s preloaded into the controllers.
Thanks in advance,