1

I am new to ESP8266. I am using the Arduino IDE to program the ESP8266-01 module. How can learn to make my own codes for ESP using Arduino?

I am going through the example programs and learning which part of the code does what. But, is there a better way to understand the syntax of those libraries.

Thanks!!

1
  • there's not much to learn; it's like an UNO with some extra libs built-in...
    – dandavis
    Apr 20, 2017 at 0:30

1 Answer 1

0

They publish a reference page for the included libraries at each release of the ESP8266 core for Arduino. The latest at this time is here:

http://esp8266.github.io/Arduino/versions/2.3.0/doc/libraries.html

You can adjust that URL for the release version you're using.

The libraries try to follow the API of the standard Arduino libraries and that documentation mostly focuses on the differences. So you will also find some documentation for these libraries in Arduino's library reference pages:

https://www.arduino.cc/en/Reference/Libraries

and the reference pages for the Arduino core API:

https://www.arduino.cc/en/Reference/HomePage

Of course the definitive (albeit less beginner friendly) reference will always be the source code. There are two ways to quickly determine the location of the source code for a library:

Option 1:

  1. Select the appropriate board from the Tools > Board menu. The Arduino IDE may select the library to be used based on which board is selected.
  2. File > Examples > {library name} > pick any example
  3. Sketch > Show Sketch Folder. This will open the {library name}/examples/{example name} folder. The source files for the library will be found in the library root folder, src folder, or utilities folder.

Option 2:

  1. File > Preferences > Show verbose output during: > compilation (check) > OK
  2. Write or open a sketch that includes the library.
  3. Sketch > Compile/Verify
  4. Wait for the compilation to finish.
  5. Examine the contents of the black console window at the bottom of the Arduino IDE window. The path to any library used by the sketch will be found in that output.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.