Post links and attach files for documentation here, also chat about these docs freely

User avatar
By nicoverduin
#6420
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. Thx
From 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:
Code: Select allint 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 :mrgreen: No documentation, just source code.

A saying I use sometimes (a bit as a gimmick) "You can't learn s e x through the play boy"
User avatar
By gwizz
#6434 Hey Ystrem- you went from never going beyond the arduino environment to publishing ESP code on github in 2 days?!! :shock:

Wow - that's impressive. And thanks for sharing!!

I hope this helps the effort to bind mqqt into lua - that would really make my month!
User avatar
By ystrem
#6436
gwizz wrote:Hey Ystrem- you went from never going beyond the arduino environment to publishing ESP code on github in 2 days?!! :shock:

Wow - that's impressive. And thanks for sharing!!

I hope this helps the effort to bind mqqt into lua - that would really make my month!


It took me week to figure out how to install SDK and then how to use makefiles. :)