Hello
I was wondering if anyone could post working code for displaying the power expander battery level on the LCD display…
I know that this has been asked before, but I couldn’t find any working codes in the forum.
Thanks
Just do a google search for something like “power expander lcd site:www.vexforum.com”.
For example here’s one:
sprintf(backupBattery, "%1.2f%c", (((float)SensorValue[in1]/280.0)), 'V');
Depending on your expander version you may need to use different divisors. The product page has divisors, but apparently those are still for 10 bit analog readings and the cortex/RobotC are now 12 bit, so you need to multiple them by 4. Power Expander - VEX Robotics