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,

code: [select]
void setup(){
 
  serial.begin(9600);
}

void loop(){

        if (serial.available() > 0) {
 
                    int val= serial.read();
 
                    serial.println(val, char);
 
                    }
   
}

i use serial.write() , lowbyte function low byte of int.

code: [select]
serial.write(lowbyte(val));



Arduino Forum > Using Arduino > Programming Questions > Return as char


arduino

Comments

Popular posts from this blog

Thread: PKI Client 5.00 install (for eToken Pro)

ATmega2560-Arduino Pin Mapping

Crossfader Arduino Tutorial