-->
Page 3 of 3

Re: Simplified Arduino ADC - ESP8266 (nodemcu lua) communica

PostPosted: Fri Mar 27, 2015 6:39 pm
by fixingthingsguy
Thanks for your patience.
I think my problem was one of timing;
If I first let the dofile do its thing as below AND then initiate the Ard sketch, things work just fine.
dofile("serial.lua")
uart.setup(0,9600,8,0,1) finished
waiting for serial data....
> cmd_2(78)
cmd_2(78) received

Anyway, the serial messaging set up by Stefan is working for me just as it was for him in my setup. I'll have to play with the timing to make sure that's taken care of in my case at least, ie I don't send stuff in before the ESP8266 is fine and ready. I think this was pointed out in Musti's post.
Anyway, happy tinkering, I'll be back when I extend this serial messaging communication module to serve my needs for sending measurements to my webserver at Grovestreams.com

Re: Simplified Arduino ADC - ESP8266 (nodemcu lua) communica

PostPosted: Wed Jul 15, 2015 12:13 am
by Gus Smith
Hello,

I got this working from Arduino to ESP8266.

On Arduino I use SoftwareSerial.
On ESP8266 I have this test function:

Code: Select alluart.setup(0, 9600, 8, 0, 1, 0 )
 
function hello(data)
    print("ok " .. data)
end


From Arduino I send this:

Code: Select allespSerial.println("hello('test')");


In the console I see this everytime:

Code: Select allok test>


Where does this ">" character come from and how can I suppress from being sent from Lua to Arduino?

Re: Simplified Arduino ADC - ESP8266 (nodemcu lua) communica

PostPosted: Sat May 21, 2016 1:40 am
by gkbhat
Is it possible to connect to a GSM module and send data to thingspeak using lua?

Regards
Bhat

Re: Simplified Arduino ADC - ESP8266 (nodemcu lua) communica

PostPosted: Sun Sep 04, 2016 9:37 am
by javo
Gus Smith wrote:Hello,

I got this working from Arduino to ESP8266.

On Arduino I use SoftwareSerial.
On ESP8266 I have this test function:

Code: Select alluart.setup(0, 9600, 8, 0, 1, 0 )
 
function hello(data)
    print("ok " .. data)
end


From Arduino I send this:

Code: Select allespSerial.println("hello('test')");


In the console I see this everytime:

Code: Select allok test>


Where does this ">" character come from and how can I suppress from being sent from Lua to Arduino?


The
Code: Select all>
is no more than the Lua prompt symbol that is printed immediately next to your string as it lacks of
Code: Select all\n
character. So actually it is not being sent to Arduino.

Note that in your case, ESP is just printing out the string and not executing as you expect.