As the title says... Chat on...

User avatar
By Gawan
#34054 Hi,
I am totally new on this whole topic but I bought the ESP8266 SP12E just for fun to get in touch with the arduino world a bit.
My first plan was to connect a temp-sensor to it and send temperature to a webservice.
The idea was to handle everything in Arduino IDE.

Now I found out that this device is much easier to handle with LUA (at least many people say so)

Do I have to make an "either or" decision between LUA and Arduino IDE now ?
Can I combine both worlds ?
Is there an equivalent software that supports LUA ?

Hope you can give me some hints ...

BR
Gawan
User avatar
By JeremiahLandi
#35398 Gawan,

I believe it is what you are looking to do.

I highly suggest going with Arduino if you are a beginner. A lot more people doing a lot more projects with a lot more sample code.

I find that the LUA community can be hard to find stuff on unless it is a specific project that is partially built out by someone. If you are an advanced coder I would say dive on into LUA.

And from what I have been reading I don't think there is a way to combine the two, well atleast easily.
User avatar
By Mmiscool
#35400 If you are comfortable with c/c++ I would use arduino.

If you are a lua wiz I would use lua.

If you are starting out I would highly suggest the arduino environment. It is by far one of the most pleasant development experiences and as JeremiahLandi said there is a much larger code base to glean from.
User avatar
By JeremiahLandi
#36317 @GAWAN

I might have taken this as Black oir White. I was just surfing Stack Overflow and came accross this:

How can I control the arduino interface using lua
http://stackoverflow.com/questions/22175020/how-can-i-control-the-arduino-interface-using-lua/22176575#22176575

I hadn't really thought of running Lua on top of Arduino! Poof all the quandries have been solved. ;) Not really but lesto does a great job explaining:

what you want to do is similar to the Firmdata; it is a processing and arduino sketch that will use arduino as a mere "executor" of a pseudo language over serial. That means many arduino command are mapped to a specific serial command, for example 'aX' may means do a digitalRead, where X is the pin number, 'bX' do an analogRead and so, obviusly arduino will then send back the reading to your host.

Drawback are that you are limited by serial (or any other bus) throughput. That means, if you want to just fast-prototipe something, it it a good solution, but when you need to code time-sensistive (or specialized) code, then you need to create your own function, called by your own command, witch probabily as a custom response.. pratically you are writing a custom program, and the ardiuno (and LUA) sketch become a mere string parser.

On galileo, the arduino is connected by serial port, as it is needed for sketch upload, so as long as LUA give you some library to manipulate serial port, you are good to go for this solution.