-->
Page 1 of 3

Echo

PostPosted: Thu Dec 04, 2014 9:32 pm
by scargill
I have no idea if this is a bug, if I'm missing something or if I should be requesting a feature.

I can't seem to find any way to stop the Lua interpreter echoing the serial input. So for example let's say I make some code to go get the time - I might want to call this from a separate processor talking to the ESP01, for example - I just want the time back - but of course what I get is an echo of all the commands I've sent?

Am I missing something?

Pete.

Re: Echo

PostPosted: Fri Dec 05, 2014 1:24 am
by zeroday
Yes, when Lua read from serial, it echo chars back. acts like readline.
0~9, Aa~Zz, echo back exactly the same char.
'\b' or 'del', echo '\b', ' ', '\b' to delete the previous char show in terminal.
'\n' or '\r' will be the end of line.
Can't turn this off right now.

Re: Echo

PostPosted: Fri Dec 05, 2014 5:14 am
by scargill
Thanks Zeroday.

I wonder if I can ask you to consider this seriously. The Lua interpreter is getting to the point where it is starting to look like a very good tool - but to use this with another processor, we need to be able to fire commands at the board and get results. Right now it is very hard to do this because of the echoed characters. I suggest possibly one way would be a paire of commands or control characters to stop the echo. My friend who is also following your project is also concerned about this. There is not enough memory to do larger projects and so in some cases it will be necessary to use the board as simply a peripheral.

Keep up the great work.

Pete

zeroday wrote:Yes, when Lua read from serial, it echo chars back. acts like readline.
0~9, Aa~Zz, echo back exactly the same char.
'\b' or 'del', echo '\b', ' ', '\b' to delete the previous char show in terminal.
'\n' or '\r' will be the end of line.
Can't turn this off right now.

Re: Echo

PostPosted: Sat Dec 06, 2014 10:55 am
by GeoNomad
Is there some other way to read and write stdin and stdout?

io.read and write?

I am looking for the way to print without the \r\n at the end...