Search found 110 matches

by filo_gr
Thu Sep 09, 2021 6:57 am
Forum: ESP-IDF
Topic: [SOLVED] My function for microseconds delay doesn't work properly
Replies: 8
Views: 9311

[SOLVED] My function for microseconds delay doesn't work properly

Hello community, I made a function that should be able to create a delay for a certain number of microseconds, here the code. void delay_us(uint64_t number_of_us){ // Initializing the variable with the time BEFORE the count. uint64_t microseconds = esp_timer_get_time(); // Starting the count, it exi...
by filo_gr
Tue Aug 03, 2021 2:11 pm
Forum: ESP-IDF
Topic: [SOLVED] ESP32-S2 Saola how turn on built-in RGB LED
Replies: 5
Views: 14151

Re: ESP32-S2 Saola how turn on built-in RGB LED

Dear @felmue, Thanks a lot. Unfortunately my issue is born from the fact I use VS Code, I'm not an expert user and I wasn't able to include the led_strip.h correctly (I'm still struggling to understand how to set .json)... However I put all the code of led_strip_rmt_ws2812.c inside the blink code.. ...
by filo_gr
Tue Aug 03, 2021 10:12 am
Forum: ESP-IDF
Topic: [SOLVED] ESP32 - How to switch from AP to STA and vice versa
Replies: 4
Views: 11405

Re: ESP32 - How to switch from AP to STA and vice versa

Thank you very much @Moriki !!! I studied your solution and finally I've made it work! :D I don't know if it's exactly how you would implement it, however it switches quickly betweens the two modalities (I use UART commands in order to control which mode must be active). Also, if AP is active but I ...
by filo_gr
Mon Aug 02, 2021 3:25 pm
Forum: ESP-IDF
Topic: [SOLVED] ESP32-S2 Saola how turn on built-in RGB LED
Replies: 5
Views: 14151

Re: ESP32-S2 Saola how turn on built-in RGB LED

Hi, thank you for you quick answer. I tried the example but I obtain an error when build the project. There is the #include "led_strip.h" that gives me an error (no such file or directory). In fact I don't have this library! I searched for it inside my esp-idf folder. I found it however the function...
by filo_gr
Mon Aug 02, 2021 1:45 pm
Forum: ESP-IDF
Topic: [SOLVED] ESP32-S2 Saola how turn on built-in RGB LED
Replies: 5
Views: 14151

[SOLVED] ESP32-S2 Saola how turn on built-in RGB LED

Hello to everyone! Today I turned on a ESP32-S2 for the first time. First thing I've seen was the RGB LED that was changing color (red, blue and then green). Now I'd like to use it. The problem: it uses pin GPIO18. Only one pin. Indeed I discovered it is an addressable RGB LED (WS2812) and it uses a...
by filo_gr
Mon Aug 02, 2021 6:27 am
Forum: ESP-IDF
Topic: [SOLVED] ESP32 - How to switch from AP to STA and vice versa
Replies: 4
Views: 11405

Re: ESP32 - How to switch from AP to STA and vice versa

When I want to initialize and start the WiFi Access Point I use this piece of code: void wifi_init_softap(void){ esp_netif_ip_info_t ipInfo; esp_netif_t* wifiAP = esp_netif_create_default_wifi_ap(); IP4_ADDR(&ipInfo.ip, 192,168,2,1); IP4_ADDR(&ipInfo.gw, 192,168,2,1); IP4_ADDR(&ipInfo.netmask, 255,2...
by filo_gr
Fri Jul 30, 2021 1:03 pm
Forum: ESP-IDF
Topic: [SOLVED] ESP32 - How to switch from AP to STA and vice versa
Replies: 4
Views: 11405

[SOLVED] ESP32 - How to switch from AP to STA and vice versa

Hello community, I'm trying to make a code for ESP32 where I can switch from WiFi Access Point mode to WiFi Station , with the opportunity to switch back from WiFi Station to WiFi Access Point . I highlight the fact that I don't want to use the AP+STA modality, but I want only one active at a time ....
by filo_gr
Thu Jul 29, 2021 10:20 am
Forum: ESP-IDF
Topic: [SOLVED] ESP32 firmware update from SPIFFS partition
Replies: 4
Views: 4978

Re: ESP32 firmware update from SPIFFS partition

Your code will automatically update ota_0 if it's running from ota_1 (or factory) and ota_1 if it's running from ota_0; the call to esp_ota_get_next_update_partition will give you the correct partition to update. Returning to factory is something done in the bootloader; I think there's a Menuconfig...
by filo_gr
Thu Jul 29, 2021 7:37 am
Forum: ESP-IDF
Topic: [SOLVED] ESP32 firmware update from SPIFFS partition
Replies: 4
Views: 4978

Re: ESP32 firmware update from SPIFFS partition

Thank you very much for your advice. I admit that I was a bit confused about what I had to do. :D Now it seems to work. I'm not 100% sure so I'd like to share my solution in order to clarify what I changed from the previous snippet of code. :!: #define SEND_DATA 100 static esp_err_t update_handler(h...
by filo_gr
Wed Jul 28, 2021 1:01 pm
Forum: ESP-IDF
Topic: [SOLVED] ESP32 firmware update from SPIFFS partition
Replies: 4
Views: 4978

[SOLVED] ESP32 firmware update from SPIFFS partition

Hello community, I'm a ESP32 newby and I'm studying how the potentialities of the ESP microcontrollers. I'm trying to create an automatic firmware update that happens when I insert a particular URL. The ESP32 is configured as an access point , while my PC is connected to it. If I insert: 192.168.2.1...