解决啦
哈哈,只有您在回我的帖子,解答我的问题,您真是个好心人,祝您生活开心!
/*
EB - I2C_1602_LCD demo code
This sketch prints "Hello World!" to the LCD
and shows the time.
The circuit:
* 5V to Arduino 5V pin
* GND to Arduino GND pin
* CLK to Analog #5
* DAT to Analog #4
http://makerstudio.cc
*/
// include the library code:
#include <Wire.h>
#include "IICLiquidCrystal.h"
// Connect via i2c, default address #0 (A0-A2 not jumpered)
LiquidCrystal lcd(0);
void setup() {
// set up the LCD's number of rows and columns:
lcd.begin(16, 2);
// Print a message to the LCD.
lcd.print("hello, world!");
}
void loop() {
// set the cursor to column 0, line 1
// (note: line 1 is the second row, since counting begins with 0):
lcd.setCursor(0, 1);
// print the number of seconds since reset:
lcd.print(millis()/1000);
lcd.setBacklight(HIGH);
delay(500);
lcd.setBacklight(LOW);
delay(500);
}
用这个程序就可以了,原因是我的1602造成的,那个库不匹配
|