ystrem wrote:What is the system in esp? It's some rtos? I never wrote for this type of microcontroller. Only 8bit atmega, so I know only main loop. Can someone help me where to begin. ThxFrom a conceptview it is not that much different from the Arduino. The best way to start is to try both examples they give. And study them.
The ESP8266 environment basically consists of:
a) public available API which make the hardware available to the user
b) a folder "user" containing your source code
In the user folder the starting point is user_main.c. Which in concept is actually no different that on the Arduino which has a file main.c. There you don't see that file but all it contains in general is this:
int main(){
setup(); // call the Arduino setup() function
while(1) {
loop(); // call the Arduino loop() function
}
return 0; // this is never called
}
The biggest difference with the Arduino is that all source is availabel to the user including all basic hardware functions in source code. On the ESP this is in the form a a compiled library. If you do your best you will find that source also probably, but why bother. Right now it seems (based on your question) that you are still in the discovery phase. So start learning I'd say. Try to get the examples to work. Add for example your own AT command. Get the nag of it. And of course you will find all kinds of unfamiliar function calls. Trace them, see what they do. Even add your own comments. I have reverse engineerd many legacy systems this way just to find out what they were doing

A saying I use sometimes (a bit as a gimmick) "You can't learn s e x through the play boy"