Sonsivri

Electronics => Hardware and Tools => Topic started by: Poty on April 03, 2021, 12:51:05 00:51



Title: Wifi, nodemcu, lua and another language to learn
Post by: Poty on April 03, 2021, 12:51:05 00:51
Hello.
A few day ago, I happily decided to buy another wifi module, and being heard too much nodemcu and LUA, and being so stupid, I bought one of those, a Nodemcu with LUA ESP8266 programmable. (and because of its price, of course). I havenŽt got it yet (probably near the end of the next week, thank you Easter..  :)), but I decided to become serious, and... Surprise!!!! Docs says that I have to learn a script language named LUA, made by some guys from Brazil...
Sincerely, I understand why they created a script language...  but IŽm not ready to spend time in another new script language... IŽm too old and lazy for that (means that if I have to do this IŽll curse the module, the chip, the script language, and my self stupidity, and still cursing, IŽll start to learn LUA).
But, of course, if anyone know the way to modify that firmware to avoid using LUA and only work with pure C functions and libraries, will make me really happy.
The trap was the availability of the direct USB programming through an USB cable and a CH340 chip. And my lazyness in checking info before buy something...
Regards,


Title: Re: Wifi, nodemcu, lua and another language to learn
Post by: medik on April 03, 2021, 06:05:55 06:05
I have used nodeMCU for projects without knowing a syntax in LUA script.

You may want to start off with Arduino and write C code there.

I also recommend ESP32 using ESP-IDF where you write C.


Title: Re: Wifi, nodemcu, lua and another language to learn
Post by: pickit2 on April 03, 2021, 10:34:50 10:34
Yes I would go with Arduino lots of how to on youtube & other sites.


Title: Re: Wifi, nodemcu, lua and another language to learn
Post by: gan_canny on April 03, 2021, 04:06:52 16:06
An upload of compiled C code from say Arduino will overwrite the compiled code that currently executes the LUA script. The ESP already  board has all the hardware you need to upload the code via a com to usb port. LUA is fine as an interpretive language as is Python but many stick to C/C++ for these Esp devices in simple IoT designs.


Title: Re: Wifi, nodemcu, lua and another language to learn
Post by: Checksum8 on April 03, 2021, 06:53:33 18:53
I made some wifi projects using Annex Wifi RDS. Is's pretty painless and free with lots of examples.

https://sites.google.com/site/annexwifi/home

A little more complicated

https://www.b4x.com/b4r.html


Title: Re: Wifi, nodemcu, lua and another language to learn
Post by: Poty on April 03, 2021, 07:18:50 19:18
Hello.
I do appreciate your collaboration. Suggestions are fine, and IŽll try those. But there is a trick in the middle, and it is that the LUA interpreter is loaded in the memory of the ESP8266... and using programming space. Besides that, there is another issue.... I want to use MPLAB interface to program this board too... Seems that IŽm asking for too much... Anyways, IŽll try  at first time whith what you pointed out, and keep looking for the alternative to MPLAB X. I found something, and posted it in here: http://www.sonsivri.to/forum/index.php?topic=69177.msg200476#msg200476
A USB->serial loader named AVRDude. Did you heard about it?
Regards,


Title: Re: Wifi, nodemcu, lua and another language to learn
Post by: Poty on April 26, 2021, 01:16:05 13:16
Good morning. Seems that I find a solution. All in espressif site. Jut to be patient. They have a complete environment to program ESP8266 in C, with examples, and so. I`m installing it, I canŽt say that it works yet, but seems nice. IŽll post more later. Wish me good luck...
Regards.


Title: Re: Wifi, nodemcu, lua and another language to learn
Post by: FTL on April 26, 2021, 06:45:43 18:45
If I were you, I would seriously consider looking at PlatformIO - platformio.org

It incorporates the Espressif environment, along with many others, so if you spend time getting familiar with it, you will be able to use it with many hardware and software platforms. Probably even LUA!