Hi i am writing to the digital line on the mega.
and when i use a single character it works but when my characters get longer it no longer works
is issue in part becuase im not using the ascii table correctly?
example :
if(labview == '1')my led works
labview is declared as a single char and you read a single character into it. Can you see why there will never be a match with a multi byte expression ?
To add to the problem single quotes are used to denote that the value is a single char
That was not helpful.
It did not describe the double brackets and the example was nothing like what im trying to do.
From what your saying "labview is declared as a single char and you read a single character into it. --just how do i change that so i can read more than one characters.
i can see it does not work and you explained whats wrong but i cannot fix it if i dont have an example.
and
To add to the problem single quotes are used to denote that the value is a single char, i need an example. ive searched but found poor examles
I'm a total amateur hobbyist here: what @UKHeliBob speaks is the truth: the referenced thread is legend imo, I live by the sword of @Robin2 's incredible and well explained examples. I was lost before I took the 45 minutes it takes to learn what's there. No joke.
Your wording is a bit odd but have a look at the functions in the Serial reference.
Note that Robin's tutorial provides a very good approach and is non-blocking code. Please don't complain if the functions in the reference cause your code to slow down (block) or, when using functions with String (capital S) objects, cause your code to crash. Note that the latter is not a bug in Serial implementation but caused by your incorrect use of String objects.