Dear all, how can I convert from ascii to integer??
Is there any formula?
Tnx
Dear all, how can I convert from ascii to integer??
Is there any formula?
Tnx
standard C funtion called atoi
int atoi ( const char * str );
This question comes up all the time. Why isn't in the Reference section I wonder?
atoi() is a function that is part of the AVR libc library The Reference homepage provides the following info:
The Arduino language is based on C/C++. It links against AVR Libc and allows the use of any of its functions; see its user manual for details.
with links to the Libc reference and user manual.
So, in short, it is in the Reference section.
Another more flexible option is strtol() http://avr-libc.nongnu.org/user-manual/group__avr__stdlib.html#gaf8ce3b8dae3d45c34c3b172de503f7b3