-
1Step 1
Installing Embedis
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
-
2Step 2
Installing the extEEPROM Library
The extEEPROM library is installed using the Arduino Library Manager, from the top menu bar :
Sketch -> Include Library -> Manage Libraries -> extEEPROM
-
3Step 3
Set up the EEPROM Click
Make sure that you are grounded, and use a personal ground strap and static protected surface if you have one.
Set the EEPROM Click for 5 Volt Operation
Note that the Voltage of the Arduino Uno board is 5 Volts, and the power select on the EEPROM click should also be set to 5V operation.
-
4Step 4
Build Tip:
You'll also notice that I put "stacking headers" on the EEPROM Click, so that I can use the same socket for UART & SPI peripherals as well other I2C peripherals.
Install the EEPROM Click
Unplug all connections from the the Arduino Uno Click Shield, and install the EEPROM Click Board in Socket 2 - make sure to get the board direction correct by lining up the "cut corner" on the bottom right.
-
5Step 5
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 -> Uno -> Embedis_I2C_EEPROM
Make sure to select the Arduino Uno board model under the Board Manager, and set the "port" to the correct COM: port for your board. Then just press the "Upload" button to compile and download your project.
-
6Step 6
Using the Example Embedis_I2C_EEPROM Project
Once you have flashed your board using the Upload command, open the Arduino Serial Monitor and you can begin giving commands to Embedis. Type "commands" into the Arduino Serial Monitor, and get a list of commands :
-
7Step 7
Embedis Dictionaries :
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 (internal to the CPU) and I2C_EEPROM (external chip on the I2C bus) :
-
8Step 8
Embedis Select :
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. The Uno gives you 1024 bytes of EEPROM, and two (2) of those bytes are used by Embedis for a pointer, so you have 1022 bytes to work with
-
9Step 9
Embedis I2C_EEPROM :
Similarly, when you "select I2C_EEPROM", Embedis will select the I2C_EEPROM and return the number of free bytes in that Embedis Keystore. If you are using a 24AA64, you will see that you have almost 8K bytes of storage to work with, and if using a 24AA256 you will have almost 32K of storage space! In the example below, we are using an 8K x 8 (24AA64) I2C EEPROM part :
-
10Step 10
Embedis Set/Get/Del
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 I2C_EEPROM, 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!
You can use the Embedis keystore to hold all kinds of setup and configuration information, such as device pins, mode and baud rate settings, as well as sensor calibration data.
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.