极客工坊

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 20351|回复: 5

关于LiquidCrystal_I2C.h编译的问题。急,在线等。

[复制链接]
发表于 2014-8-15 23:58:12 | 显示全部楼层 |阅读模式
#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,这个函数式定义了的。这是为什么?
回复

使用道具 举报

发表于 2014-8-16 07:53:23 | 显示全部楼层
ide版本是否匹配。也即这个库应该是在什么版本的ide下运行的,需要核实下。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2014-8-16 14:04:59 | 显示全部楼层
林定祥 发表于 2014-8-16 07:53
ide版本是否匹配。也即这个库应该是在什么版本的ide下运行的,需要核实下。

//www.DFRobot.com
//last updated on 21/12/2011
//Tim Starling Fix the reset bug (Thanks Tim)
//wiki doc http://www.dfrobot.com/wiki/index.php?title=I2C/TWI_LCD1602_Module_(SKU:_DFR0063)
//Support Forum: http://www.dfrobot.com/forum/
//Compatible with the Arduino IDE 1.0
//Library version:1.1
回复 支持 反对

使用道具 举报

发表于 2014-8-16 21:30:06 | 显示全部楼层
兼容ide1.0,现在你用的是?最好能向卖家请教,他们知道提供库的的适应性。
回复 支持 反对

使用道具 举报

发表于 2014-9-11 10:09:37 | 显示全部楼层
看看我给你的这个可用不,我测试过了arduino1.0.5可以用的

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?注册

x
回复 支持 反对

使用道具 举报

发表于 2014-11-24 10:23:51 | 显示全部楼层
hytrao 发表于 2014-9-11 10:09
看看我给你的这个可用不,我测试过了arduino1.0.5可以用的

这些库 你们都是哪里找的能不能给我个网址 具体的网址 谢了
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

Archiver|联系我们|极客工坊

GMT+8, 2026-6-8 14:31 , Processed in 0.038725 second(s), 21 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表