Pages: [1]   Go Down
Author Topic: Convert serial hex to decimal  (Read 607 times)
0 Members and 1 Guest are viewing this topic.
Sweden, Malmö
Offline Offline
Full Member
***
Karma: 2
Posts: 200
Rooky
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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  :-/
« Last Edit: September 13, 2008, 02:15:49 am by HULK » Logged

Pages: [1]   Go Up
Jump to: