Local stored variables and WIFI customisation

Dear Community.

Lately i have been searching and asking a lot about local stored variables, i have read many posts about it and got some nice answer from others here. I just want to collect my findings since a lot of people have asked the same.
I cant help you with programming and settings but i can give a hint on how its done.

Can you store values locally on your Photon without the cloud?

Answer: Yes you can, there are some libraries that can help you do so.

  • Webserver library - Creates a webserver on the photon that can call values and store them in a file.
  • mDNS library - So you can call the photon from a browser with i.e. http://myphoton.local instead of the IP
  • SDcard library - EEPROM on the Photon allows for 2K (2048 byte) of wear-leveled non-volatile storage at your direct disposition. so you might need a SD card if you want to store bigger files.

Use the webide and browse for the librarys, when you have opened them you can see in the different tabs some examples, some advanced and some not so much, depends on your skill. There are not any tutorials on how to use them in the photon today but when time exist some people have said they will create one.

it has been done :slight_smile:

You can also include the librarys from the webide just by clicking “include in APP” on left side.

Many people have asked about a way to include the particle app way of handeling WIFI,
There is one. SoftAP is a library, tool what now to call it to handle the WIFI connection on a Photon.
It can be used for a webpage and/or a mobile app. There have been a lot of activity about the SoftAP so we might see it included as native in the future.

Download. working SoftAP
Customize the SoftAP
Thread about the SoftAPP

This is some question that have bugged me a while so i thought i share them here in one post for other that have been looking at the same, hope it helps other people that looking for something similar and don’t know where to start.

BR
Dimi

5 Likes

Thanks for the interesting summary!
Always useful to get started…

2 Likes

EEPROM on the Photon allows for 2K (2048 byte) of wear-leveled non-volatile storage at your direct disposition.
https://docs.particle.io/reference/firmware/photon/#eeprom

But if you want more you could role your own flash memory access.

For “semi-volatile” storage you can use 4K battery backed SRAM
https://docs.particle.io/reference/firmware/photon/#backup-ram-sram-

Additionally to SD cards you could also use I2C or SPI connected FRAMs.

3 Likes

Thank you, updated my post. :slight_smile:

1 Like

this is hands down one of my favorite threads

2 Likes