Chat freely about anything...

User avatar
By sfranzyshen
#9412
folny82 wrote:Thank you for your answer but can you indicate precisely where I #include "ets_sys.h" add or remove ? So far as I learn to program esp chip. I still have one question the need to modify any library that I can control 512 LEDs I tried Jinx and Pixelcontroller but I managed to control a maximum of about 488 LEDs.


edit the ws2812.c file and put the line

#include "ets_sys.h"

somewhere at the top ... and see if it gets past the error ...
User avatar
By sfranzyshen
#9513
folny82 wrote:Hi

Great work program works perfectly, I want to add support for http configurable by example esphttpd but it throws me this error do not know where the problem may be ?.

mingw32-make.exe -f C:/Espressif/examples/esphttpd/Makefile all
CC user/httpd.c
CC user/heatshrink_decoder.c
...
CC user/auth.c
CC user/ws2812.c
user/ws2812.c: In function 'ws2812_out':
user/ws2812.c:34:2: error: implicit declaration of function 'gpio_output_set' [-Werror=implicit-function-declaration]
GPIO_OUTPUT_SET(GPIO_ID_PIN(WSGPIO), 0);
^
user/ws2812.c:36:2: error: implicit declaration of function 'ets_intr_lock' [-Werror=implicit-function-declaration]
os_intr_lock();
^
user/ws2812.c:47:2: error: implicit declaration of function 'ets_intr_unlock' [-Werror=implicit-function-declaration]
os_intr_unlock();
^
user/ws2812.c: In function 'ws2812_init':
user/ws2812.c:52:2: error: implicit declaration of function 'ets_wdt_disable' [-Werror=implicit-function-declaration]
ets_wdt_disable();
^
cc1.exe: all warnings being treated as errors
mingw32-make.exe: *** [build/user/ws2812.o] Error 1
C:/Espressif/examples/esphttpd/Makefile:162: recipe for target 'build/user/ws2812.o' failed


How exactly did you try to add this to the esphttpd project? I just added this driver to the iot_demo (setup the same as esphttpd) and it compiled fine. Here is what I did to add it to iot_demo;

added ws2812.c & tpm2net.c to the "user/" folder ...
added ws2812.h & tpm2net.h to the "include/" folder ...
edited "user/user_main.c" as follows ...
added to the top near other #includes ...
#include "ws2812.h"
#include "tpm2net.h"
added init calls to the user_init() function near the bottom ...
#if ESP_PLATFORM
user_esp_platform_init();
#endif
tpm2net_init(); // add this line after user_esp_platform_init() (above)
ws2812_init(); // add this line too!
save & rebuild
bingo!

I am guessing that you did not edit the user/user_main.c file and add the .h (header files) or call the init() functions? Hope that helps ...
User avatar
By folny82
#9528 Thanks for the advice I tried iot_demo but I just do not understand exactly how a iot_demo function can configure ESP through the web interface ?.