-->
Page 2 of 3

Re: serial2input

PostPosted: Sat Feb 25, 2017 1:19 pm
by Lagnus
Is there an other way to read the serial input? A binary mode for example?

Re: serial2input

PostPosted: Sat Feb 25, 2017 1:45 pm
by Electroguard
Yes, you can read numeric data into an integer variable instead of reading it as ascii characters into a string variable (which I believe is being forced by using $).

If you read the docs you'll see that serial can also be read byte by byte if you wish.

Re: serial2input

PostPosted: Sun Feb 26, 2017 12:08 pm
by Lagnus
Sorry, but in which documentation have you read this?
Do you mean : Serial.read.int()
It seems that this is not working on serial2.

Re: serial2input

PostPosted: Sun Feb 26, 2017 1:02 pm
by Lagnus
I wired it to serialport 1.
With Serial.read.int() it works and also no problem with zero's.
Thank you Electroguard