I am trying to use M2TKLIB with my I2C 20x4 LCD panel. I tried modifying the hello world program to use the different library...
#include <Wire.h>
#include <LiquidCrystal_I2C.h>
#include "M2tk.h"
#include "utility/m2ghlc.h"
LiquidCrystal_I2C lcd(0x3F,20,4);
M2_LABEL(hello_world_label, NULL, "Hello World!");
M2tk m2(&hello_world_label, NULL, NULL, m2_gh_lc);
void setup() {
m2_SetLiquidCrystal(&lcd, 16, 2);
}
void loop() {
m2.draw();
delay(500);
}
But I get the following errors
In file included from HelloWorld.cpp:29:0:
/home/myhome/sketchbook/libraries/M2tklib/utility/m2ghlc.h:27:27: fatal error: LiquidCrystal.h: No such file or directory
compilation terminated.
So I tried a simple change to m2ghlc.h
//#include <LiquidCrystal.h>
#include <Wire.h>
#include <LiquidCrystal_I2C.h>
But more errors appear...
In file included from HelloWorld_for_m2tklib.cpp:29:0:
/home/myhome/sketchbook/libraries/M2tklib/utility/m2ghlc.h:31:26: error: variable or field ‘m2_SetLiquidCrystal’ declared void
/home/myhome/sketchbook/libraries/M2tklib/utility/m2ghlc.h:31:26: error: ‘LiquidCrystal’ was not declared in this scope
/home/myhome/sketchbook/libraries/M2tklib/utility/m2ghlc.h:31:41: error: ‘lc_ptr’ was not declared in this scope
/home/myhome/sketchbook/libraries/M2tklib/utility/m2ghlc.h:31:57: error: expected primary-expression before ‘cols’
/home/myhome/sketchbook/libraries/M2tklib/utility/m2ghlc.h:31:71: error: expected primary-expression before ‘rows’
HelloWorld_for_m2tklib.cpp: In function ‘void setup()’:
HelloWorld_for_m2tklib.cpp:40:34: error: ‘m2_SetLiquidCrystal’ was not declared in this scope
So I thought I had better ask before making matters worse