I'm trying to make a class to expand on the functionality of the Adafruit-RGB-LCD-Shield-Library I'm creating this based on what I see from this post.
class LcdMenu
{
#include <Adafruit_MCP23017.h>
#include <Adafruit_RGBLCDShield.h>
public:
Adafruit_RGBLCDShield lcd = Adafruit_RGBLCDShield();
void Setup()
{
lcd.begin(16, 2);
}
void Write(int line, char text[17])
{
lcd.clear();
}
};
LcdMenu *LcdM;
#define VIOLET 0x5
void setup()
{
LcdM->Setup();
LcdM->lcd.setBacklight(VIOLET);
}
However, I'm getting the following error:
C:\Users\jschere2\AppData\Local\Temp\ccUzvCmX.ltrans0.ltrans.o: In function `main':
ccUzvCmX.ltrans0.o:(.text.startup+0xf0): undefined reference to `LcdMenu::Adafruit_RGBLCDShield::begin(unsigned char, unsigned char, unsigned char)'
ccUzvCmX.ltrans0.o:(.text.startup+0xf8): undefined reference to `LcdMenu::Adafruit_RGBLCDShield::setBacklight(unsigned char)'
collect2.exe: error: ld returned 1 exit status
exit status 1 Error compiling for board Arduino/Genuino Mega or Mega 2560.