Go Down

Topic: problem sending correct format data from pc to arduino board (Read 1 time) previous topic - next topic


hi, friends i am trying to send data in form of numbers from my pc to arduino board using the serial monitor, but on echoing back i receive different no. corresponding to each digit. like if i send 100, i get back 49 48 48. plz help me out.


May 05, 2011, 07:24 pm Last Edit: May 05, 2011, 07:27 pm by Grag38 Reason: 1
It's good !!!

Because 49 is the ascii code for the character '1' and 48 for '0'.

So from, arduino is receiving '100'.

You just have to store it in his decimal value or use a function like atoi(), strtol() or strtoul().


Thanks so much Grag8, for the prompt reply. i ll  be sure to use these functions.

Go Up