Hi,
I have write a code some time ago for a 16x2 LCD display to be able to see variables from my programs.I've tested using a BMP085 preasure sensor and everything went well at that time. In the mean time I've changed the computer installed Arduino. I've copied the LiquidCrystal library for BMP085 in place of the default library of Arduino (same I've done last time).
Now if I compile the same code I get multiple errors like the one bellow ( for all HMI member functuions used in the code):
HMI\HMI.cpp.o: In function HMI::RefreshValue()': C:\Users\Cristian_Sandor\Documents\Arduino\libraries\HMI/HMI.cpp:162: multiple definition of
HMI::RefreshValue()'
I have HMI.h where I have the declaration of HMI class which is derived from LiquidCrystal class.
I have HMI.cpp which contains the implementation of the HMI function members
And finaly I have HMIDev.ino where is the main code.
My gues is that I do not call the #include correctly HMI.h and LiquidCrystal.h files. Please see bellow how I've done it:
//In HMI.h file I have
#ifndef HMI_h
#define HMI_h
#include <Arduino.h>
#include <Wire.h>
#include <LiquidCrystal.h>
class HMI :public LiquidCrystal
{
...
};
#endif
//In HMI.cpp file I have:
#include "HMI.h"
...
code
...
// In the HMIDev.ino I have:
#include <LiquidCrystal.h>
#include <Wire.h>
#include <BMP085.h>
#include <HMI.h>
// .. code
I have tried to remove the line #include<HMI.h> in the HMI.cpp but than give's me multimple errors: error: '... ' has not been declared
Could you please suggest what to do to correct this error? I remember that when I've write initially the code I have had the same issue, and I've meet with this also in other cases but I was able at the end of the day to sort it out. This time, it seems I can't get on with it.
If is useful I can share the hole code file.
Thanks,