Go Down

Topic: Convert serial hex to decimal (Read 689 times) previous topic - next topic

HULK

Sep 13, 2008, 09:14 am Last Edit: Sep 13, 2008, 09:15 am by HULK Reason: 1
Is there a command that can convert a serial reply from hex to a decimal number?
I have tried the search function and it seems as a code is needed, no direct arduino command.

A typical reply from my serial device will be XXXXOF28, first four signs are of no interest but also in hex form.
So actually i need to filter out the last four digits and then convert to one decimal number.
Is it also possible to control the amount of signs to be converted from the right hand side of the hex number reply so only two,four or three signs are read if needed and allways ignore the amount of signs in the start of the hex number reply?

Simple questions for some of you, but for me  :-/

Go Up