Converting Battery Voltage Hex

17 years 2 weeks ago #10575518 by Adamj12b
Converting Battery Voltage Hex was created by Adamj12b
i am working on a program in visual basic to get the data from my ax1500 controller, and i am sucessful in receiving the string of characters that the controller puts out when it is in rc mode, and i can seperate them into sets of 2 for each hex set, but i dont know how to convert the hex so that it is a decimal for the voltage. the hex that i am getting is 39, but when i convert it with the table in the manual I get a decimal of 57. And when i go into roborun it tells me that i have 12.5 volts on the main batteries. Any help would be much appreciated. - Adam

Please Log in or Create an account to join the conversation.

17 years 1 week ago #10653280 by cosma
Replied by cosma on topic Re:Converting Battery Voltage Hex
<P style="MARGIN: 0px">Converting an HEX string into a decimal value is done as follows:
<P style="MARGIN: 0px">
<P style="MARGIN: 0px">DecimalValue = Val("&amp;H" + HexString)

Please Log in or Create an account to join the conversation.

Moderators: tonysantoni
Time to create page: 0.067 seconds