AWOL:
Have you thought about using "atoi"?
(Hint: You're not the first person to ask this question, just the first this week)
I tried before, but no luck....
Arduino says:
error: invalid conversion from 'char' to 'const char*'
error: initializing argument 1 of 'int atoi(const char*)'
char recievedChar;
int value;
void setup()
{
Serial.begin(115200);
Serial2.begin(115200);
}
void loop()
{
if (Serial2.available()){
recievedChar = Serial2.read();
value = atoi(recievedChar);
Serial.print(value);
}
}