| | IR problems
|
| Hi, I was having some problems in a program I'm writing in PbForth and it seems that it could be related to the way I communicate thru IR. I use the Lego remote control. I joined the following code to demonstrate. I use the word 'getHeader' from (...) (21 years ago, 9-Jan-04, to lugnet.robotics.rcx.pbforth)
| | | | Re: IR problems
|
| (...) snip snip (...) ===...=== Ralph, any idea on this? Thanks (21 years ago, 23-Jan-04, to lugnet.robotics.rcx.pbforth)
| | | | RE: IR problems
|
| Hmmm The blip and LCD clearing, while useful for debugging may be messing things up. The characters are coming in way faster than the blip time, so you may not be reading the buffer fast enough. I would put code at the end of getHeader that (...) (21 years ago, 24-Jan-04, to lugnet.robotics.rcx.pbforth)
| | | | Re: IR problems
|
| (...) Thanks Ralph. I'll try this. I might have followed the wrong track but I got to this 'test program' trying to solve the problem I have in my 'real' program: I'm writing a PbForth version of the Trailerbot (Luis Villa, Extreme Mindstorms). The (...) (21 years ago, 28-Jan-04, to lugnet.robotics.rcx.pbforth)
| | | | Re: IR problems
|
| (...) Ralph, one more question. Are there conditions where the word EKEY would wait for input (like KEY)? It seems to happen in my program. Thanks (21 years ago, 29-Jan-04, to lugnet.robotics.rcx.pbforth)
| | | | RE: IR problems
|
| (...) EKEY always waits for input. Use EKEY? to see if anything is available... Looking at the source, I see that there is a possiblity that in the time between checking for a character with EKEY? and actually reading it with EKEY, that an error can (...) (21 years ago, 30-Jan-04, to lugnet.robotics.rcx.pbforth)
| | | | Re: IR problems
|
| (...) I did not explain my problem properly but you got it anyway! I do use EKEY? before EKEY, but sometimes EKEY seems to block. Thanks for taking your time to look into this. As for the new word (wow!), in Forth-79, there was a word called ?KEY (...) (21 years ago, 31-Jan-04, to lugnet.robotics.rcx.pbforth)
| |