Go Down

Topic: Software serial help (Read 443 times) previous topic - next topic

vitoAM

Hi, i´m having some problems with this.
I controling a serial lcd, and I need to set character position, in hardware serial I use Serial.write(254);  Serial.write(202);   to write special characters, but this is not suported by software serial, how can I write this as a single byte and not "254" in text


Tanks :)

Anachrocomputer

Could you make a two-character string, set the first character (byte) to the value you need, and print a string?

Code: [Select]
char str[2];

str[0] = 254;
str[1] = '\0';

// Send 'str' to the LCD

TeamMCS

...That or you should be able to define the data type as per the reference manual matey


Serial.write(mydata,datatype[DEC|BYTE|etcetc]);

Go Up
 


Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy