emonlcd solar sketch won't compile - SOLVED

Hi all,

Just built the lcd module and have run the test sketch absolutely fine, but when I try to upload the latest solar pv sketch i get the following errors when verifying...

 

 

gmonlcd.cpp: In function 'void setup()':
gmonlcd:109: error: 'print_glcd_setup' was not declared in this scope
gmonlcd.cpp: In function 'void loop()':
gmonlcd:143: error: 'print_emontx_payload' was not declared in this scope
gmonlcd:154: error: 'print_emonbase_payload' was not declared in this scope
gmonlcd:186: error: 'led_control' was not declared in this scope
gmonlcd:202: error: 'draw_main_screen' was not declared in this scope
 
 
As they are all the same type of error i guess it could be something very simple but i'm not sure what.  I have imported the libraries that are required.  Is it crucial what the folders are names as in the libraries folder?
 
Andy.
panman1111's picture

Re: emonlcd solar sketch won't compile - SOLVED

 

Hi everyone

I’m having the same problem, with similar if not the same errors

When I compiled the EmonLCD test sketch I had similar problems, until I installed the correct libraries in the correct place, it then worked fine and uploaded and ran o/k

As far as I can work out I have all the right libraries for the EmonLCD, (I can’t get the EmonTx to compile either)

One odd thing is that although I have got EmonLib in the libraries folder it doesn’t appear in the Sketchbook/Libraries dropdown for either of the Emon sketches, I cant work out why!

Also, what is the difference between say :

#include "EmonLib.h"

and

#include <EmonLib.h>

I have been struggling with this for a week, hoping that it will dawn on me adventuily but I think it’s time to ask for help!

 

Thanks Steve 

glyn.hudson's picture

Re: emonlcd solar sketch won't compile - SOLVED

Hi Andy,

I think your problem is caused by not opening all the files for the emonGLCd sketch. If you click download on the github page and then open the emonGLCD_solar_PV_Autotime_Templog.ino in the Arduino IDE the display and serial tabs should also open automatically (see image below). 

Steve: Have you restarted the IDE after installing the emonlib library? Also check you havent got a double directory that got created when you un-zipped the files.  It should appear under file>examples>emonlib in the Arduino IDE. 

panman1111's picture

Re: emonlcd solar sketch won't compile - SOLVED

Glyn

 

Thanks, all sorted now, I had restarted the IDE, and it still didn’t work! So in the end I deleted everything and started again, and now its working so I’m well happy!

Now I’ll sort out the output to drive the SSR for the Immersion heater.

and build the Nanode, that’ll be another steep learning curve!

Thanks for your help.

Steve

AndySV1K's picture

Re: emonlcd solar sketch won't compile - SOLVED

Glyn,

You could be right!  I definitely do not see more than one tab.

I will look on github and try again.

Thanks for the help.

Andy.