Comparing two strings
ryfitzger227
Posts: 99
I've been doing a lot of work in the propeller and its probably been over a year since I've done anything with the stamp. I'm doing something that should be pretty simple. I'm sending out a string of "A," from my computer via serial port. What I'm wanting the stamp to do is simple - check to see if the input equals "A," and then light an LED.
Here's what I have so far..
This may look stupid, but it's the only thing I could think of! Haha! Any ideas?
Here's what I have so far..
serialInput VAR Byte Main: SERIN 16, 16780, [STR serialInput\1] IF serialInput(0) = "A" AND serialInput(1) = "," THEN ' IF serialInput = "A," '-- produces an error HIGH 15 ENDIF GOTO Main
This may look stupid, but it's the only thing I could think of! Haha! Any ideas?
Comments
But, you may be able to use the "WAIT" modifier of the SERIN command to watch for a string of up to 6 characters. See the Helpfile under SERIN.
Cheers,
I completely overlooked this! It works now. Thank you.
I've marked your thread as "solved".