|
|
#include <Wire.h>
#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd(0x20, 16, 2);
void setup() {
// put your setup code here, to run once:
// initialize the LC
lcd.begin();
// Turn on the blacklight and print a message.
lcd.backlight();
lcd.print("Hello, world!");
}
void loop() {
// put your main code here, to run repeatedly:
}
在编译此程序时报错信息如下:
sketch_aug15a.ino: In function 'void setup()':
sketch_aug15a:9: error: no matching function for call to 'LiquidCrystal_I2C::begin()'
C:\Users\simon\Documents\Arduino\libraries\LiquidCrystal_I2C/LiquidCrystal_I2C.h:58: note: candidates are: void LiquidCrystal_I2C::begin(uint8_t, uint8_t, uint8_t)
总是显示找不到'LiquidCrystal_I2C::begin()'函数,仔细查看LiquidCrystal_I2C.h和LiquidCrystal_I2C.cpp,这个函数式定义了的。这是为什么? |
|