Search found 1683 matches

by kolban
Wed Dec 21, 2016 4:18 pm
Forum: General Discussion
Topic: API Documentation
Replies: 5
Views: 7665

Re: API Documentation

Mr Frax,
It may be that this freely downloadable book of notes might be of some use to you ... please read the description of intent found there ...

http://esp32.com/viewtopic.php?f=2&t=390&p=2522

Neil
by kolban
Wed Dec 21, 2016 6:21 am
Forum: ESP-IDF
Topic: Call sequence to stop being a station and become an access point ....
Replies: 0
Views: 3273

Call sequence to stop being a station and become an access point ....

Imagine my ESP32 boots up and connects as a station to an access point. The common flow appears to be: * esp_wifi_set_mode(WIFI_MODE_STA) * esp_wifi_set_config(WIFI_IF_STA, ...) * esp_wifi_start() * esp_wifi_connect() Now imagine that the logic of the program decides it wishes to be an access point....
by kolban
Tue Dec 20, 2016 5:56 pm
Forum: ESP-IDF
Topic: Sample code for software based timer into ESP32-idf
Replies: 15
Views: 32348

Re: Sample code for software based timer into ESP32-idf

Not 100% sure what you mean by a software timer? It is not uncommon to keep a list of "functions to be called when a timer interval has been reached". This becomes a matter of programming where one keeps a list of records where each record contains the time to fire and the function to call. These ar...
by kolban
Tue Dec 20, 2016 3:10 pm
Forum: ESP32 Arduino
Topic: timers in esp32
Replies: 11
Views: 28504

Re: timers in esp32

Howdy, You have strayed away from anything ESP32 related in 100% pure Arduino land ... let me suggest that you go read and study here: https://www.arduino.cc/en/Reference/HomePage or get yourself a book on Arduino. There are lots and lots of great Arduino knowledge sources out there. Assume that Ard...
by kolban
Tue Dec 20, 2016 6:01 am
Forum: ESP32 Arduino
Topic: timers in esp32
Replies: 11
Views: 28504

Re: timers in esp32

Maybe something like the following ... unsigned long startTime1; unsigned long startTime2; setup() { startTime1 = millis(); startTime2 = millis(); } loop() { if (millis() - startTime1 >= 5000) { // 5 seconds have elapsed on timer 1 ... do something interesting ... startTime1 = millis(); } if (millis...
by kolban
Tue Dec 20, 2016 4:38 am
Forum: ESP32 Arduino
Topic: timers in esp32
Replies: 11
Views: 28504

Re: timers in esp32

I think the classic way in Arduino programming is:

Code: Select all

unsigned long startTime;

setup() {
   startTime = millis();
}

loop() {
   if (millis() - startTime >= 5000) {
      // 5 seconds have elapsed. ... do something interesting ...
      startTime = millis();
   }
}
by kolban
Tue Dec 20, 2016 1:10 am
Forum: General Discussion
Topic: Store static file in flash
Replies: 24
Views: 49456

Re: Store static file in flash

In the Unix file system, there is only one hierarchical tree starting at "/". Within that directory tree space, we could "cross into" different file system implementations by "mounting" different file systems at different paths in the directory tree. When we traverse into those paths, we switch into...
by kolban
Mon Dec 19, 2016 9:27 pm
Forum: General Discussion
Topic: Store static file in flash
Replies: 24
Views: 49456

Re: Store static file in flash

The sample function that uses VFS to map to SPIFFS uses "spiffs" data type ... see: https://github.com/nkolban/esp32-snippets/blob/master/vfs/spiffs/spiffs_vfs.h The spiffs data type is defined here: https://github.com/whitecatboard/Lua-RTOS-ESP32/blob/master/components/spiffs/spiffs.h#L291 Where is...
by kolban
Mon Dec 19, 2016 7:24 pm
Forum: Report Bugs
Topic: Wifi not working
Replies: 6
Views: 13009

Re: Wifi not working

It is within the realms of possibility that you have corrupted Non Volatile Storage (NVS) ... this is an area of flash memory that is reserved for the NVS APIs. Since you said you were playing in that area, it is a possibility. The fix is pretty simple. What we will do is reset ALL of SPI flash to i...
by kolban
Mon Dec 19, 2016 3:08 pm
Forum: ESP32 Arduino
Topic: timers in esp32
Replies: 11
Views: 28504

Re: timers in esp32

Kamesh,
Maybe you can post some information on what you mean by "use timers" ... what is it you are trying to achieve? Common examples would be:

* Call a C function every 5 seconds
* Measure how much time it took to perform a task

But there might be a different interpretation on your ask.