To Install Embedis in the Arduino IDE, please see the Detailed Install Directions. Embedis is installed using the Arduino Library Manager, from the top menu bar :
Sketch -> Include Library -> Manage Libraries -> Embedis
You will also need the ESP8266 tools and ESP8266 sketch data download utility installed with Arduino IDE 1.6.7 or later. For more information, please follow the board manager install directions at esp8266/Arduino.
Loading the Example Project
After installing the Embedis library in the Arduino IDE, the Embedis examples will be available under the menu as :
File -> Examples -> Embedis -> esp8266 -> Embedis_SPI_FRAM
Make sure to select your specific ESP8266 board model under the Board Manager, and set the "port" to the correct COM: port for your board. Then just press the "Download" button to compile and download your project.
Now this is where it gets really interesting, you have two (2) different memories available to you to store your data in, which in Embedis are referred to as "DICTIONARIES" and these are named EEPROM and SPI_FRAM.
By using the Embedis "select" command, you can select which memory you are going to use to read and write, for example when you type "select EEPROM", then Embedis will return the number of bytes of free space in the EEPROM dictionary.
Now you can start to add data to your Embedis Keystore using the "set" and "get" commands. Since the last "Dictionary" that was selected was the SPI_FRAM, that is where our data will be written, for example :
So we created a key named "IPADDR" and set it to "192.168.1.127" . Make sure to use quotes around any string with spaces or special characters. Now let's use the "get IPADDR" command to retrieve the data from the Embedis Keystore.
There are many advanced features of Embedis, including the ability to publish and subscribe to changes in keys and the logging system. We'll cover those in upcoming projects here at the thingSoC platform!