Search found 7 matches

by LanManMike
Mon Apr 29, 2019 8:32 am
Forum: ESP32 Arduino
Topic: Using PUT requests
Replies: 3
Views: 4954

Re: Using PUT requests

Hi All, So I have cleaned up my code and put the HTML response right after it is received in the code. I also changed to using Sync PUT requests rather than async. No more issues with stray PUT requests timing out, however the controls do feel a little bit 'sticky'. It is good enough for what I want...
by LanManMike
Mon Apr 29, 2019 8:13 am
Forum: ESP32 Arduino
Topic: Using PUT requests
Replies: 3
Views: 4954

Re: Using PUT requests

Hi boarchuz, Thanks for getting back to me. Your ideas are well founded. I will look into using a synchronous (rather than async) web request so I always wait for a response, but this may result in 'jerky' controls. I will also try sending a response straight away from the ESP32 and then handling th...
by LanManMike
Sat Apr 27, 2019 8:23 am
Forum: ESP32 Arduino
Topic: Using PUT requests
Replies: 3
Views: 4954

Using PUT requests

Hi all, I am developing light controller using an ESP32 in Arduino (I am using the Platform IO IDE). My controller serves a web page including some javascript that attaches to the the 'oninput' method of a Slider (range) control. This javascript sends HTTP PUT requests back to the ESP32 to change th...
by LanManMike
Tue Jan 15, 2019 10:29 am
Forum: ESP32 Arduino
Topic: Tasks and LED Strips
Replies: 8
Views: 11374

Re: Tasks and LED Strips

Yes, I think boarchuz is absolutely correct. The first definition of the delay() function (above) I found by Internet searching. I have just tried highlighting delay() in Visual Studio Code (Platform IO) and I could go to the definition of the delay function, which is: void delay(uint32_t ms) { vTas...
by LanManMike
Sun Jan 13, 2019 2:46 am
Forum: ESP32 Arduino
Topic: Tasks and LED Strips
Replies: 8
Views: 11374

Re: Tasks and LED Strips

Hi All, I have just been looking into the delay() function. The code I have found in the Arduino Core is: void delay(unsigned long ms) { uint32_t start = micros(); while (ms > 0) { yield(); while ( ms > 0 && (micros() - start) >= 1000) { ms--; start += 1000; } } } As you can see, whilst the function...
by LanManMike
Sat Jan 12, 2019 11:54 am
Forum: ESP32 Arduino
Topic: Tasks and LED Strips
Replies: 8
Views: 11374

Re: Tasks and LED Strips

Thanks heaps for the replies. Sorry that my initial post didn't include enough details. The program sets up 4 tasks, each of which will change between a Red, Orange and Green LED on the Dotstar Strip in the same way a traffic light works. The program I have listed in the original post works quite we...
by LanManMike
Fri Jan 11, 2019 4:40 am
Forum: ESP32 Arduino
Topic: Tasks and LED Strips
Replies: 8
Views: 11374

Tasks and LED Strips

Hi All, I have been playing around with Strip LEDs (AM103 style) on the ESP32 DEVKITC. To do this I have been using PtformIO (based on Visual Studio Code). This has worked well and I have has some good fun with the LED strips.However, I have found some issues when running tasks to update the LED Str...