by Jon Murphy
Before you install the libraries, it would be a good idea to think about how you will organise your Emon data. When
you installed the Arduino IDE, it created a folder
Arduino and beneath it a folder
libraries in your
directory. If you’re happy with that, then you should install the libraries in there.
However, I prefer to have a folder that contains everything related to OpenEnergyMonitor. That folder, which I've
OEM is at the top level in my personal area, i.e.
Home/OEM. Beneath that I have folders for
Leaflets, and importantly that which concerns us here,
Software folder contains sub-folders
that will eventually contain more sub-folders for sketches for the various modules, and a
libraries folder for
the Arduino Libraries. This is the structure:
Home │ └── OEM │ └─── Drawings └─── Manuals └─── Software │ └─── emonPi └─── emonTH └─── emonTx └─── libraries
It is most important that the
libraries folder is at the same level in the hierarchy as the folders, or some ancestor of
the folders, that will eventually contain the sketches. The parent of
libraries, in this example called
what the Arduino documentation and the IDE refers to as the
Sketchbook. You can choose whatever name you
want for this folder.
Important: This is NOT the same 'libraries' folder that is part of the Arduino IDE. If you put the OEM libraries in there, they will work but when you update the Arduino IDE, by default it installs in a completely new folder and you will have to move or copy these libraries. For that reason it is not recommended.
Many libraries are required, this is the full list:
|RFu_JeeLib||https://github.com/openenergymonitor/RFu_jeelib||Only required for emonTx V3.2 and emonTH V1.4 using the RFu328 module.|
|RTClib||https://github.com/adafruit/RTClib||Only required for EmonGLCD|
|GLCD_ST7565||https://github.com/openenergymonitor/EmonGLCDlib||Only required for EmonGLCD|
|EtherCard||https://github.com/openenergymonitor/EtherCardOct2012||Only required for NanodeRF|
|SI7021||https://github.com/LowPowerLab/SI7021||Only required for emonTH V2|
Go to each of the websites in turn. Download the zip file for each to your usual place – on GitHub the button is on
the right-hand side. Click
Clone or Download followed by
When you have downloaded all the files, go to your download location and from there you need to extract the
contents of each Zip file in turn: Double-click on the zip file, a window will open showing the contents. Extract that
folder into the
The Arduino IDE does not allow hyphens '-' in the library folder names.
Therefore you must rename the folders to the names below. You should end up with this:
Note: If you wish, you can now delete the zip files that you downloaded.
If your Arduino IDE is running, close all open windows and shut it down completely. Start (or restart) the IDE. First
you must tell the IDE where your
Sketchbook is located. Click on
File > Preferences and at the top for
Sketchbook location browse to and select your
Software folder, then dismiss the Preferences window with OK. Click on
Sketch > Include Library and you should see the list of libraries. The ones you just installed should be listed under
Note: The IDE only checks the libraries at start-up. Each time you change or add a library, you must completely shut down and restart the IDE.
In this Chapter: