Post topics, source code that relate to the Arduino Platform

User avatar
By ScotleCyphez
#24664 I am completely new to lower level development, so this question is probably very basic.

Up until now I have only used AT commands through serial to modify the settings of the ESP8266. These seem slightly limited, and as a result I think I need to move to using the ESP8266 SDK.

My end goal is to use the command
Code: Select allwifi_softap_set_dhcps_offer_option
found in the ESP8266 SDK.

Simply put, I am confused how to do this. According to the GitHub page https://github.com/esp8266/Arduino , the Arduino SDK
brings support for ESP8266 chip to the Arduino environment. It lets you write sketches using familiar Arduino functions and libraries, and run them directly on ESP8266, no external microcontroller required.


Do I need to write a custom sketch just to call a function on the ESP8266? Or can the function be called through the Arduino in a way similar to AT commands are used? In either case can anyone push me in a direction for getting started? I am having a tough time finding beginner guides so links are also appreciated!
User avatar
By kolban
#24709 My understanding is that you can insert SDK APIs directly into the C code of your sketch. I can't imagine why that would not work. Have you tried it? Worst case, you might have to include some additional C language header files.
User avatar
By kolban
#24720 No problems my friend ... we are all learning here. So lets see what we have ... at a high level, our common story is that we are writing C code, compiling it and flashing it onto the ESP. That is the fundamental. The Espressif SDK provides libraries that you can link your C code against that provides functions for driving the ESP. So if you had nothing but an editor, a C compiler and the Espressif SDK ... you could code C and include calls to the SDK.

Now ... some really cool guys have extended the Arduino IDE to allow us to code C within THAT IDE and compile it (Within THAT IDE) and deploy it (again ... within THAT IDE). In addition, those same guys have provided "mappings" for the Arduino library to the ESP. So for example, a function called XYZ that is available to Arduino programmers has been written as a function called XYZ for ESP that instead of using Arduino internals uses the ESP SDK. This makes some/many/all Arduino applications be compilable and runable on the ESP. However, if there are things that are ESP specific, not all of those have been mapped to Arduino "like" libraries.

However ... if you code C ESP SDK calls in the same editor that you write C code in the Arduino IDE ... it should work ....