Hi, I am new to this forum, i have searched for an answer but cannot find one, but apologies if this is a known/resolved issue.
just received my new kit and i have it configured in a type 1 Solar PV config, got that all working fine.
Built my emonGLD and tested with the sample software, all good.
Just got the Solar PV Sketch and i get the following error when i verify it.
"Solar_EmonGLCD.ino: In function 'void loop()':
Solar_EmonGLCD:214: error: 'draw_solar_page' was not declared in this scope
Solar_EmonGLCD:231: error: 'draw_history_page' was not declared in this scope
'draw_solar_page' was not declared in this scope"
I then tried the standard HomeEnergyMonitor sketch and got this error;
"emonGLCDmonitor.ino: In function 'void loop()':
emonGLCDmonitor:146: error: 'draw_power_page' was not declared in this scope
emonGLCDmonitor:147: error: 'draw_temperature_time_footer' was not declared in this scope
'draw_power_page' was not declared in this scope"
Any help would be appreciated .
Thanks in advance.
Re: emonGLCD Sketch wont compile
There are three files in the directory. Have you downloaded the other two files and put them in the same directory as the main sketch?
Re: emonGLCD Sketch wont compile
I have now and it compiles!
D'oh..
Sorry, so silly.
thanks for the quick reply
Re: emonGLCD Sketch wont compile
just tested again..
it compiles but says Low memory available, stability problems may occur.
the GLCD does nothing when the sketch is uploaded?
tried solar and standard one both the same.
tester sketch working fine??
Re: emonGLCD Sketch wont compile
I have set the Arduino Board to Uno, which i think is correct as it uses the same Atmega 328 chip i think..
Re: emonGLCD Sketch wont compile
Those GLCD sketches are very memory-intensive, to the extent that it is almost impossible to add anything. You are seeing the warning probably because over time, one or more of the libraries has had new "features" added.
Where did you get those sketches from? I don't think they are from our GitHub repository because the file names are wrong. I've just compiled and loaded HomeEnergyMonitor and it gives me no 'low memory' warnings and it shows the expected display.
The "Board" setting should indeed be "Arduino Uno"
If you get no display at all, the first thing to suspect is the radio module. If that does not initialise (and it plays no part in the test sketch) then the sketch will most probably hang there. There's a test sketch for the radio here: https://openenergymonitor.org/emon/node/12115#comment-39312
All the output is to the serial monitor and LEDs - it does not drive the LCD.
Re: emonGLCD Sketch wont compile
hi thanks for this.
this gives no serial output so looks like you are right.
I think i have the module in the correct orientation, the surface mount components are in the bottom right corner..
should i just try remounting it?
Re: emonGLCD Sketch wont compile
OK, so i have tried to remove the RF module, can do it..
can you confirm i have it in the correct orientation?
Re: emonGLCD Sketch wont compile
No, the "radio" test sketch should give you only serial output. You should see:
"EmonGLCD Radio Test Sketch
For use in conjunction with the 'Tester' sketch, this is intended to test the Radio function of the emonGLCD.
It prints the received values each time a message is received from ANY node,
also broadcasts the GLCD temperature every 11 s approx.
This does NOT use the display, output is to the serial port only.
Diagnostics:
On startup, the red LEDs should flash, followed by the green. If the red LEDs remain on,
it is likely that the radio module has not initialised correctly.
Subsequently, the red LEDs flash each time a radio transmission is received,
the green LEDs flash each time a radio transmission is made.
A message might be missed occasionally if the GLCD is transmitting at the same time
as another node is transmitting."
.... and the red LEDs should come on before it stops. Does your sketch say "#define RF69_COMPAT 1"? The radio module looks OK to me, so don't disturb it at this stage. If you have no serial output, then I think the fault lies elsewhere.
Re: emonGLCD Sketch wont compile
Hi, thanks for coming back to me.
Sorry, i should have been more specific.
I get nothing on serial output at all running the radio test sketch.
the red lights come on, do not go green at all but do flash very occasionally..
thanks for your help so far!
Re: emonGLCD Sketch wont compile
This isn't making a lot of sense. You've programmed the GLCD, so the serial connection to your computer works. The sketch is running at least past the first few lines because it turns the red LEDs on. You don't see anything on the serial monitor. Are you sure you're looking at it? Are you being quick enough to see the long message - you might want to make the delay above the first "Serial.print" 5000 to give yourself 5 s to switch the monitor on if you're using Windows.) Yet it appears to be running because you see a brief green flash (every 11 s approx?) when it transmits the temperature? Or is it a red flash? It should also print the temperature at the same time as it flashes the green LED, or the incoming data if it was a red flash. I'm having to prise every last detail out of you. You really need to give me the full story accurately and completely.
Re: emonGLCD Sketch wont compile
OK,
i have modified the code now to add some serial prints at certain points so i can see what is going on.
the bold sections below are my additions to the code;
void setup()
{
Serial.begin(9600);
delay(5000);
Serial.println("program started");
pinMode(greenLED, OUTPUT);
pinMode(redLED, OUTPUT);
analogWrite(redLED, 255); //turn on the red LED - if it remains on, the radio might not have initialised
Serial.println("Starting RF..");
delay(500); //wait for power to settle before firing up the RF
rf12_initialize(MYNODE, RF_freq, group);
delay(5000); //wait for RF to settle
Serial.println("RF up");
in the serial console I now see;
program started
Starting RF..
so i think your assumption is correct the RF module is not initialising.
the reason i was not seeing anything in the console is because it wasn't getting that far.
I didn't say the lights were going green, i said they flashed occasionally, but i guess this could have been me moving the thing around.
Faulty RF module possibly?
Re: emonGLCD Sketch wont compile
It's certainly looking like the radio module is not working. You need to be very careful when removing the radio module as there are tracks underneath that could easily be damaged. I'd recommend a good hard look for bad joints elsewhere before you try - if you haven't done that already.
Re: emonGLCD Sketch wont compile
hmmm.. easier said than done when the screen is in place.. :(
everything else seems to work, temp leds etc.. so not too sure the fault is anywhere else..
i'll keep digging..
Re: emonGLCD Sketch wont compile
Hi I have now tested all connection/joints, all OK.
The problem seems to be isolated to the RF module.
I inspected under a microscope camera, all connections were OK.
Finally decided to take the module off.
I had one of my electronics engineers at work do this for me as their soldering skills are more advanced than mine.
Module off, looks OK visibly and the main PCB is not damaged.
What next?
Should i send the module back to you?
is there a test i can do on the PCB or RF module that will prove where the fault lies?
Thanks in advance.
Re: emonGLCD Sketch wont compile
I suggest you email the shop and refer them to this thread.