Hello
It is possible that I am not writing in the section where I should, but I have not found a better place.
Well, I am struggling with ESP8266 modules.
Previously, I had connected this module via Uart to Atmega.
And I communicated without any problem. But since ESP has its own fast controller and a lot of memory, I decided to get rid of atmega and write the program directly on ESP.
I browse the internet for a few days and look for a specific clue in what and how to program. I will emphasize right away that I am not going to use the Arduino IDE.
I don't like it and I don't use it. I program atmega in Eclipse (GCC) on a daily basis.
But unfortunately I didn't know examples and courses on how to program.
Instead, I found rudimentary information about LUA.
Let me start with the details:
I have firmware in ESP: NodeMCU 0.9.5 build 20150214 powered by Lua 5.1.4
so it displays to me in the terminal after startup.
Please help me with programming. Some specific course etc.
In atmega microcontrollers I am used to the Main loop etc ..
And in LUA, programming reminds me more of some "bush" ...
My assumptions are simple and I would like to achieve this goal:
0 I would like to use UDP packets
1.After connecting the power supply, ESP connects to the wifi network under a fixed (in some variable) IP address - say 192.168.1.200 and is to listen on port 5000
2. After receiving the text, e.g. "kanal1-ON", it turns on the low state on the pin, e.g. GPIO_1
3. After receiving the text, e.g. "channel1-OFF", it turns on the high state on the pin, e.g. GPIO_1
4. After receiving, for example, "kanal2-120" sets my PWM on GPIO_2 to 120.
e.t.c.
I'm just going to control the led strip. Now I steer correctly, but I have an atmega and ESP harnessed for this purpose. And I would like to put such a simple function directly on ESP.
In addition, I would like to be able to return some data to the IP and port of the sender so that, for example, from a smartphone, sending the "REPORT" command, the ESP module sends back a previously prepared report, eg "RAPORT_KANAL1-ON ^ KANAL2-120 ^ ......"
My assumptions are simple but I can't get down to writing LUA code.
I just don't get it ...
Any help will be worth its weight in gold.
It is possible that I am not writing in the section where I should, but I have not found a better place.
Well, I am struggling with ESP8266 modules.
Previously, I had connected this module via Uart to Atmega.
And I communicated without any problem. But since ESP has its own fast controller and a lot of memory, I decided to get rid of atmega and write the program directly on ESP.
I browse the internet for a few days and look for a specific clue in what and how to program. I will emphasize right away that I am not going to use the Arduino IDE.
I don't like it and I don't use it. I program atmega in Eclipse (GCC) on a daily basis.
But unfortunately I didn't know examples and courses on how to program.
Instead, I found rudimentary information about LUA.
Let me start with the details:
I have firmware in ESP: NodeMCU 0.9.5 build 20150214 powered by Lua 5.1.4
so it displays to me in the terminal after startup.
Please help me with programming. Some specific course etc.
In atmega microcontrollers I am used to the Main loop etc ..
And in LUA, programming reminds me more of some "bush" ...
My assumptions are simple and I would like to achieve this goal:
0 I would like to use UDP packets
1.After connecting the power supply, ESP connects to the wifi network under a fixed (in some variable) IP address - say 192.168.1.200 and is to listen on port 5000
2. After receiving the text, e.g. "kanal1-ON", it turns on the low state on the pin, e.g. GPIO_1
3. After receiving the text, e.g. "channel1-OFF", it turns on the high state on the pin, e.g. GPIO_1
4. After receiving, for example, "kanal2-120" sets my PWM on GPIO_2 to 120.
e.t.c.
I'm just going to control the led strip. Now I steer correctly, but I have an atmega and ESP harnessed for this purpose. And I would like to put such a simple function directly on ESP.
In addition, I would like to be able to return some data to the IP and port of the sender so that, for example, from a smartphone, sending the "REPORT" command, the ESP module sends back a previously prepared report, eg "RAPORT_KANAL1-ON ^ KANAL2-120 ^ ......"
My assumptions are simple but I can't get down to writing LUA code.
I just don't get it ...
Any help will be worth its weight in gold.