Return as char
hello,
i'm trying echo input serial monitor. returns dec, doesn't echo. want return character. try code below doesn't work. error @ : serial.println(val, char);. wrong?
thnx,
i'm trying echo input serial monitor. returns dec, doesn't echo. want return character. try code below doesn't work. error @ : serial.println(val, char);. wrong?
thnx,
code: [select]
void setup(){
serial.begin(9600);
}
void loop(){
if (serial.available() > 0) {
int val= serial.read();
serial.println(val, char);
}
}
Arduino Forum > Using Arduino > Programming Questions > Return as char
arduino
Comments
Post a Comment