Trouble loading firmware to EmonTXV2

Hi

I have been trying to load the firmware to a emonTXv2 which I built some time ago.  I got a very helpful email from Glyn, describing the setup for the Arduino IDE/ UART, and also the location of the required libraries.

I have downloaded the libraries and stored them locally.  I navigate to my copy of "Emon TxCT123_voltage_temp.ino. The trouble is, every time I try to load sketch or verify/compile it I get the same result.:-

CT123_Voltage_Temp.ino:57:73: fatal error: JeeLib.h: No such file or directory

 #include <JeeLib.h>   // make sure V12 (latest) is used if using RFM69CW

​I have checked and I have created additional copies of the file in several places just in case, but , to no avail.  Also more confusing to me is the fact that the Arduino tool is showing a tab called "JeeLib.h".

I am sure this is due to a stupid "schoolboy error" on my part but I am stuck.  Any suggestions, please?

Many thanks

calypso_rae's picture

Re: Trouble loading firmware to EmonTXV2

The Jeelib library folder must sit alongside (i.e. at the same level as) your other library folders such as "Ethernet", "LiquidCrystal" and "Stepper".  When unzipped, an extra enclosing folder may appear.  A sketch which uses a header file from a library will only compile if the enclosing folder for that file is in exactly the right place.  I don't think the name of the enclosing folder actually matters.

My library folders (on a Win XP laptop) are at C\Program Files\Arduino\libraries\ ...

Does a simple program upload and run OK, such as blink.ino  ?

Robert Wall's picture

Re: Trouble loading firmware to EmonTXV2

Have you shut down EVERY window in the Arduino IDE and restarted it after loading the library?

Where exactly have you put your copy of JeeLib (not just JeeLib.h - the whole directory)?  The instructions for setting up the Arduino IDE are the very top item in Resources > Building Blocks. That tells you exactly where to load the libraries, which is what you're missing. I can't believe Glyn told you differently, but maybe you misunderstood? And which OS are you using?

Andyevison's picture

Re: Trouble loading firmware to EmonTXV2

Hi Robert & Rae,

Thanks for the guidance, I was convinced it was my error.  I am certain that Glyn gave me the correct link and I missed or didn't understand the details included.  I am currently using Widows 10.

I think my library structure is incorrect so I am going to start again.   One of my biggest problems is only being able to work this out in short bursts and almost starting from scratch every time.

As always thanks for good and helpful advice.

Regards,

 

Andy

Robert Wall's picture

Re: Trouble loading firmware to EmonTXV2

You should be looking here: https://openenergymonitor.org/emon/buildingblocks/installing-arduino-lib...  and your sketch directories should look like this: http://openenergymonitor.org/emon/sites/default/files/IDE1.6.7_structure...  and the library directory itself roughly as in the picture below. All the files belonging to each individual library are in their respective directories under "Libraries". 

Each directory under "Software" is where you put your sketches.

Library Structure under Windows 10

Andyevison's picture

Re: Trouble loading firmware to EmonTXV2

Hi Robert

 

Thanks for your patient explanation.  I uninstalled Arduino and started again.  I have finally got the structure correct.  Things almost work.  Apologies for being so dense about the structure.  I still get an error when trying to compile the TXv2 firmware but I should be able to work this out.

 

Many thanks again

Andy

Robert Wall's picture

Re: Trouble loading firmware to EmonTXV2

What is the error message? Usually, it's a good guide to what is wrong, even though you often need to read between the lines.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.