You can convert a char type simply by assigning to an int.
If you can't live with a const char* then you better copy the char array like
A char in C is already a number (the character's ASCII code), no conversion required. If you want to convert a digit to the corresponding character
ASCII data is most often stored in a char variable. If the C environment is using ASCII encoding, the following all store the same value into the integer variable.
Example(s): i_char shall look like "001" for i=1, "011" for i=11 or "101" for i=101.
Читаем Serial и записываем в int [B]Получение целого однозначного числа(1..9)[/B] IntVar=(Serial.read() - '0')
Вы можете преобразовать тип char, просто назначив int.
char toInsert = (num % 10) + 48
C# doesn't support implicit conversion from type 'int' to 'char' since the conversion is type unsafe and risks potential data loss. However, we can do explicit conversion using the cast operator ().