Current News

Moderator: Mmiscool

User avatar
By Electroguard
#45815 I can't get the serial port interupt example to work, but I'm not sure if it's because of a bug or whether it's just me not knowing what I'm doing.

I tried using an 'out-of-the-box' download of teraterm 4.90 but every key press returned...

"Failed to reach end of input expression, likely malformed input"
"errorhcausex" (x being the key pressed)

I wasn't expecting any key presses to even be sent until pressing <BR>, so I tried using arduino serial monitor instead, but even though a character now needed a <BR> to send it, it still caused the same input error to be returned.

I copied and pasted from the posted example (included below), so it's not because of a typing error.

I was expecting key presses to be printed rather than interpreted?


Code: Select allmemclear
print ramfree()
serialbranch [serialin]
wait

[serialin]
serialinput zz$
Serialprint “received:”
serialprintln zz$
return
User avatar
By Mmiscool
#45817 looks like the error is occurring because of the quotation marks used. Looks closely at them.

The input command still requires a cr-lf to complete the input.

Code: Select allmemclear
print ramfree()
serialbranch [serialin]
wait

[serialin]
serialinput zz$
Serialprint "received:"
serialprintln zz$
return
User avatar
By Electroguard
#45819 How on earth did you spot that Captain - it took me several minutes with my nose pressed to the screen (and feeling a bit of a fool) until I gave up and got out a magnifying glass, and even then I could only just see that one lot had slight extra curves (presumably females?).

I copied and posted though, so presumably the local font must somehow make a difference!

All I can say is... your eyesight is as sharp as your mind, sir.