We are trying to get the power expander to show us the battery level and we need help to wire it and how to program it we use easy c
The Status port on the Power Expander plugs into a Analog port on the cortex. After plugging it into a port and using that same port in your program, program it like any other sensor only it should be the analog type (potentiometer type might work as a substitute if easyC doesn’t have the generic analog option).
I use RobotC so sorry if that’s not very helpful,
hopefully someone who uses easyC can fill in the blanks I’m leaving.
Not sure how to do it in easyc but you basically nead to plug it in to an analog port as above. Then, in your program you need to read the value from the analog port and then divide it by a specific constant depending on the revision of power expander that you have. The constant values should be around somewhere on the internet.
Use the GetAnalog function, and then you can print the value divided by the PCIM of the expander.