need a bit of itoa help
hi all,
need advice on converting series of ascii ints number make (e.g. 49 48 48 >> 100). i'm reading data digital compass (heading, pitch, & roll) using newsoftserial. i've been passing data uart tx , that's that. want use data onboard processing. packet compass 3 floats, separated commas, ending in both carriage return , line feed. heading positive (0. - 360.), pitch , roll positive or negative (-90. +90, -180. +180., respectively). breaking packet isn't difficult commas , line feed. hurdle converting "49 49 48 46 53" "110.5", , using float in other calculations on arduino. itoa use on mac side...and seems should use on arduino side, i'm not finding info, , attempts far won't compile. advice on references or example code...or different method?
thanks in advance!
david
need advice on converting series of ascii ints number make (e.g. 49 48 48 >> 100). i'm reading data digital compass (heading, pitch, & roll) using newsoftserial. i've been passing data uart tx , that's that. want use data onboard processing. packet compass 3 floats, separated commas, ending in both carriage return , line feed. heading positive (0. - 360.), pitch , roll positive or negative (-90. +90, -180. +180., respectively). breaking packet isn't difficult commas , line feed. hurdle converting "49 49 48 46 53" "110.5", , using float in other calculations on arduino. itoa use on mac side...and seems should use on arduino side, i'm not finding info, , attempts far won't compile. advice on references or example code...or different method?
thanks in advance!
david
i believe you're looking [glow]atof[/glow]. it's in [glow]stdlib.h[/glow].
good luck,
brian
good luck,
brian
Arduino Forum > Forum 2005-2010 (read only) > Software > Syntax & Programs > need a bit of itoa help
arduino
Comments
Post a Comment