GR9300-04產品簡介:
Arduino控制板IO口只有20個,加些傳感器、SD卡啥的,繼電器等模塊多了,IO口就不夠用了!!
原來的1602屏需要7個IO才能驅動起來,現在這個加了IIC/I2C 模塊的版本,可以幫你省5個IO口,
您只需下載這個 Arduino函數庫 ,就可輕鬆使用!!
https://bitbucket.org/fmalpartida/new-liquidcrystal/downloads/
關於如何安裝程式庫,詳情請見http://www.arduino.cc/en/Guide/Libraries
產品參數:
1、供電電壓:±5V
2、支持I2C協議
3、具有背光燈,和對比度調節電位器
4、4線輸出更簡單
產品特性:
1、符合Arduino4線控制方式。
2、原來的1602屏需要7個IO口才能驅動,優化省掉5個IO口。
3、接口標註方便使用。
4、兼容Arduino官方Library可以直接使用。
5、工作電壓5V
#include <HMC5883L.h>
/*這是一段很完整的功能展示範例,您可能需要先安裝 LiquidCrystal_PCF8574 函式庫
*可透過 "匯入程式庫" --> "管理程式庫" 搜尋 "LiquidCrystal_PCF8574" 方式找到並進行安裝即可!!
*/#include <Wire.h>
#include <LiquidCrystal_PCF8574.h>LiquidCrystal_PCF8574 lcd(0x3F); // set the LCD address to 0x27 for a 16 chars and 2 line display
int show;
void setup()
{
int error;Serial.begin(9600);
Serial.println("LCD...");while (! Serial);
Serial.println("Dose: check for LCD");
// 如果 LCD 都沒出現文字,請開啟 序列埠監控式窗,看是否出現"LCD Not Found",這很可能就是 I2C 位置錯誤,
// 網路上很多範例說明都是複製來複製去,位置都在 0x27,這不一定正確,我們測試有的在 0x3F 這位置!!
Wire.begin();
Wire.beginTransmission(0x3F);
error = Wire.endTransmission();
Serial.print("Error: ");
Serial.print(error);if (error == 0) {
Serial.println(": LCD found.");} else {
Serial.println(": LCD not found.");
} // iflcd.begin(16, 2); // initialize the lcd
show = 0;
} // setup()void loop()
{
if (show == 0) {
lcd.setBacklight(255);
lcd.home(); lcd.clear();
lcd.setCursor(4, 0);
lcd.print("Wellcome");
lcd.setCursor(1, 1);
lcd.print("www.GEJORE.tw");
delay(10000);lcd.clear();
lcd.print("Set Backlight");
for(int i=0; i<=255; i++){
lcd.setBacklight(i);
delay(10);
};} else if (show == 1) {
lcd.clear();
lcd.print("Cursor On");
lcd.cursor();} else if (show == 2) {
lcd.clear();
lcd.print("Cursor Blink");
lcd.blink();} else if (show == 3) {
lcd.clear();
lcd.print("Cursor OFF");
lcd.noBlink();
lcd.noCursor();} else if (show == 4) {
lcd.clear();
lcd.print("Display Off");
lcd.noDisplay();} else if (show == 5) {
lcd.clear();
lcd.print("Display On");
lcd.display();} else if (show == 7) {
lcd.clear();
lcd.setCursor(0, 0);
lcd.print("*** first line.");
lcd.setCursor(0, 1);
lcd.print("*** second line.");} else if (show == 8) {
lcd.scrollDisplayLeft();
} else if (show == 9) {
lcd.scrollDisplayLeft();
} else if (show == 10) {
lcd.scrollDisplayLeft();
} else if (show == 11) {
lcd.scrollDisplayRight();
} // ifdelay(2000);
show = (show + 1) % 12;
} // loop()
會員名稱 | 購買數量 | 購買時間 | 訂單狀態 |
mon***** | 1 | 01-08 | 成交 |