I am trying to display my power expander battery voltage onto my LCD screen, with this code:
clearLCDLine(0); //Clear LCD Lines
clearLCDLine(1);
//Display (Primary) Battery Voltages
displayLCDString(0, 0, "ShooterBat:");
sprintf(ShooterBat,"%1.2f%c", (SensorValue[Expander]/70), 'V'); //Builds Value Displayed
displayNextLCDString(ShooterBat);
//Short delay for refresh rate
wait1Msec(100);
However, RobotC tells me that there is an error in my code. When I switched out
sprintf(ShooterBat,"%1.2f%c", (SensorValue[Expander]/70), 'V');
to
sprintf(ShooterBat,"%1.2f%c", (nImmediateBatteryLevel/1000), 'V');
the code works fine. Any ideas why the code for power expander isn’t working?
Thanks