Hello
The project I'm currently sitting on is storing frequent measurements from SPI sensors in an external W25Q128FV flash (because the internal one is too small).
I came up with the idea to put the HTML and the configuration file in the internal flash with SPIFFS. To the external one will go the data.
I plan to operate this from the phone via an interface written in HTML. The interface is supposed to be able to set configuration variables, control the esp code, display "live" some sensor data, start writing data to the flash, download previously saved data (csv or txt file), delete previously downloaded measurements (I plan to store max 2 measurement sessions - files).
I have the sensors already figured out (I have made myself my mini libraries from the catalogue notes with only the functions I will use).
I have html written. I also have the general execution algorithm of the code devised, but to the point....
I would need advice/guidance in terms of the optimal concept of how to tie this together best.
1. organisation of the external flash - the fastest write would probably be to split it into 2 parts and feed it with raw bytes. But as I will then want to pull this onto the phone to a csv or txt file from the browser, it is possible that it would be better to have a file system (FS or a second SPIFFS if possible) and write to files. Such a data set (file) may be 2-3 MB in size so I also need to take this into account to make room for RAM when downloading to the phone. I will not write this library myself. I will have to use some library (any light/easy ones you recommend)?
2. WiFi - I understand that the appropriate ESP mode is AP?
3. HTML live - in order not to refresh the page manually or at some interval I would probably have to harness websocket for this?
4. the HTML is about 25kB. Should I load it into a variable (I'm not sure yet whether I can fit it in) or is it possible to pull it live from SPIFFS? Since the html will also contain changing data, buttons etc., I'm probably just going to have to load it into a variable anyway, right?
Thank you in advance for any suggestions, and I will be happy to clarify the information if I am unclear.
Yours sincerely
Przemo
The project I'm currently sitting on is storing frequent measurements from SPI sensors in an external W25Q128FV flash (because the internal one is too small).
I came up with the idea to put the HTML and the configuration file in the internal flash with SPIFFS. To the external one will go the data.
I plan to operate this from the phone via an interface written in HTML. The interface is supposed to be able to set configuration variables, control the esp code, display "live" some sensor data, start writing data to the flash, download previously saved data (csv or txt file), delete previously downloaded measurements (I plan to store max 2 measurement sessions - files).
I have the sensors already figured out (I have made myself my mini libraries from the catalogue notes with only the functions I will use).
I have html written. I also have the general execution algorithm of the code devised, but to the point....
I would need advice/guidance in terms of the optimal concept of how to tie this together best.
1. organisation of the external flash - the fastest write would probably be to split it into 2 parts and feed it with raw bytes. But as I will then want to pull this onto the phone to a csv or txt file from the browser, it is possible that it would be better to have a file system (FS or a second SPIFFS if possible) and write to files. Such a data set (file) may be 2-3 MB in size so I also need to take this into account to make room for RAM when downloading to the phone. I will not write this library myself. I will have to use some library (any light/easy ones you recommend)?
2. WiFi - I understand that the appropriate ESP mode is AP?
3. HTML live - in order not to refresh the page manually or at some interval I would probably have to harness websocket for this?
4. the HTML is about 25kB. Should I load it into a variable (I'm not sure yet whether I can fit it in) or is it possible to pull it live from SPIFFS? Since the html will also contain changing data, buttons etc., I'm probably just going to have to load it into a variable anyway, right?
Thank you in advance for any suggestions, and I will be happy to clarify the information if I am unclear.
Yours sincerely
Przemo