“(SKU:RB-05L007)LCD4884液晶搖桿擴展板”的版本間的差異
來自ALSROBOT WiKi
(→?產(chǎn)品相關(guān)推薦) |
(→?例子程序) |
||
(未顯示2個用戶的6個中間版本) | |||
第1行: | 第1行: | ||
<br/> | <br/> | ||
[[文件:faef1.jpg|500px|有框|右]] | [[文件:faef1.jpg|500px|有框|右]] | ||
? | + | ==產(chǎn)品概述== | |
? | == | + | 最新推出的LCD4884 LCD Joystick Shield v2.0 LCD4884液晶屏擴展板是哈爾濱奧松機器人科技有限公司研發(fā)的一款黑白屏液晶擴展板。此擴展板采用Nokia 5110液晶屏為顯示器件。SPI接口,最大限度的節(jié)省I/O資源。特別添加五向搖桿,方便實現(xiàn)搭建人機互動接口,剩余的模擬與數(shù)字接口全部用插針引出,便于安裝其它傳感器與模塊。本品適用于各種開發(fā)板和控制器,例如:Arduino控制器、STC單片機、AVR單片機等。 |
? | + | ||
==規(guī)格參數(shù)== | ==規(guī)格參數(shù)== | ||
# 產(chǎn)品名稱:LCD4884液晶搖桿擴展板 | # 產(chǎn)品名稱:LCD4884液晶搖桿擴展板 | ||
第18行: | 第17行: | ||
# 選配配件:3PIN傳感器連接線、Arduino 328控制器等 | # 選配配件:3PIN傳感器連接線、Arduino 328控制器等 | ||
# 板載資源: | # 板載資源: | ||
? | + | * 數(shù)字接口:8個 | |
? | + | * 模擬輸入借口:5個 | |
? | + | * 48×84液晶:1個 | |
? | + | * 無向搖桿按鍵:1個 | |
? | + | * 系統(tǒng)復(fù)位按鍵:1個 | |
? | + | ||
==使用方法== | ==使用方法== | ||
? | + | ===使用硬件=== | |
? | ==LCD4884 Joystick | + | * Carduino UNO 控制器 * 1個 |
? | : | + | * LCD4884 Joystick Shield ×1 |
? | + | * USB數(shù)據(jù)通信線×1 | |
? | + | ===例子程序=== | |
? | + | 程序上傳前需要先下載鏈接:https://pan.baidu.com/s/1rZRC6a2eQGpZs_oCbAPEuw?pwd=n7yp | |
? | : | + | 提取碼:n7yp LCD4884 程序使用到的庫文件,將它放到Arduino安裝目錄下的libraries文件夾下<br/> |
? | : | + | <pre style='color:blue'> |
? | # | + | /* YourDuinoStarter Example: LCD SHIELD with 'Joystick' button |
? | + | - WHAT IT DOES Displays on LCD4884, reads button | |
? | + | - SEE the comments after "//" on each line below | |
? | + | - CONNECTIONS: | |
? | + | - LCD 4884 Shield has all connections | |
+ | - | ||
+ | NOTE: Start Serial Monitor to see switch voltage values | ||
+ | - V1.00 02/08/2016 | ||
+ | Questions: terry@yourduino.com */ | ||
+ | |||
+ | /*-----( Import needed libraries )-----*/ | ||
+ | #include <LCD4884.h> // UPDATED version 2/16 Yourduino | ||
+ | /*-----( Declare Constants and Pin Numbers )-----*/ | ||
+ | #define LCD_BACKLIGHT_PIN 7 | ||
+ | |||
+ | /*-----( Declare objects )-----*/ | ||
+ | //None: Included in library | ||
+ | /*-----( Declare Variables )-----*/ | ||
+ | int displayDelay = 1000; | ||
+ | int switchDelay = 100; // Switch scanning delay | ||
+ | int switchVoltage ; // From Analog read of the button resistors | ||
+ | |||
+ | void setup() /****** SETUP: RUNS ONCE ******/ | ||
+ | { | ||
+ | Serial.begin(115200); | ||
+ | pinMode(LCD_BACKLIGHT_PIN, OUTPUT); | ||
+ | lcd.LCD_init(); // creates instance of LCD | ||
+ | lcd.LCD_clear(); // blanks the display | ||
+ | for (int a = 0; a < 5; a++) | ||
+ | { | ||
+ | digitalWrite(LCD_BACKLIGHT_PIN, LOW); | ||
+ | delay(300); | ||
+ | digitalWrite(LCD_BACKLIGHT_PIN, HIGH); | ||
+ | delay(300); | ||
+ | } | ||
+ | for (int a = 0; a < 6; a++) | ||
+ | { | ||
+ | lcd.LCD_write_string(0, a, "01234567980123", MENU_NORMAL); // ignore MENU_NORMAL for now | ||
+ | delay(displayDelay); | ||
+ | } | ||
+ | delay(displayDelay); | ||
+ | lcd.LCD_clear(); // blanks the display | ||
+ | delay(500); | ||
+ | // Show the BIG characters (0..9, + - only) | ||
+ | lcd.LCD_write_string_big(0, 0, "012345", MENU_NORMAL); | ||
+ | lcd.LCD_write_string_big(0, 3, "-+-+-+", MENU_NORMAL); | ||
+ | delay(1000); | ||
+ | lcd.LCD_clear(); // now read the joystick using analogRead(0 | ||
+ | |||
+ | }//--(end setup )--- | ||
+ | |||
+ | |||
+ | void loop() /****** LOOP: RUNS CONSTANTLY ******/ | ||
+ | { | ||
+ | lcd.LCD_write_string(1, 1, "PUSH A BUTTON", MENU_NORMAL); | ||
+ | switchVoltage = analogRead(0); | ||
+ | Serial.print("Switch analog value = "); | ||
+ | Serial.println(switchDelay); | ||
+ | |||
+ | if (switchVoltage == 0) | ||
+ | { | ||
+ | lcd.LCD_write_string(2, 2, "LEFT ", MENU_NORMAL); | ||
+ | } | ||
+ | else if (switchVoltage > 0 && switchVoltage < 180) | ||
+ | { | ||
+ | lcd.LCD_write_string(2, 2, "PUSH IN", MENU_NORMAL); | ||
+ | delay(switchDelay); | ||
+ | } | ||
+ | else if (switchVoltage > 180 && switchVoltage < 400) | ||
+ | { | ||
+ | lcd.LCD_write_string(2, 2, "DOWN ", MENU_NORMAL); | ||
+ | delay(switchDelay); | ||
+ | } | ||
+ | else if (switchVoltage > 400 && switchVoltage < 600) | ||
+ | { | ||
+ | lcd.LCD_write_string(2, 2, "RIGHT", MENU_NORMAL); | ||
+ | delay(switchDelay); | ||
+ | } | ||
+ | else if (switchVoltage > 600 && switchVoltage < 800) | ||
+ | { | ||
+ | lcd.LCD_write_string(2, 2, "UP ", MENU_NORMAL); | ||
+ | delay(switchDelay); | ||
+ | } | ||
+ | else if (switchVoltage > 800) { | ||
+ | lcd.LCD_write_string(2, 2, "NONE ", MENU_NORMAL); | ||
+ | delay(switchDelay); | ||
+ | } | ||
+ | |||
+ | } //--(end main loop )--- | ||
+ | |||
+ | /*-----( Declare User-written Functions )-----*/ | ||
+ | //NONE | ||
+ | |||
+ | //*********( THE END )*********** | ||
+ | </pre> | ||
+ | |||
+ | ===程序效果=== | ||
[[文件:faef2.jpg|500px|有框|居中]] | [[文件:faef2.jpg|500px|有框|居中]] | ||
[[文件:faef3.jpg|500px|有框|居中]] | [[文件:faef3.jpg|500px|有框|居中]] | ||
[[文件:faef4.jpg|500px|有框|居中]] | [[文件:faef4.jpg|500px|有框|居中]] | ||
[[文件:faef5.jpg|500px|有框|居中]] | [[文件:faef5.jpg|500px|有框|居中]] | ||
+ | ==視頻演示== | ||
+ | [[File:LCD4884 01.png|400px|左|link=http://v.youku.com/v_show/id_XNDU0MzE5NjIw.html?from=y1.7-2]] | ||
+ | <br/> | ||
+ | <br/> | ||
+ | <br/> | ||
+ | <br/> | ||
+ | <br/> | ||
+ | <br/> | ||
+ | <br/> | ||
+ | <br/> | ||
+ | <br/> | ||
+ | <br/> | ||
+ | <br/> | ||
+ | <br/> | ||
+ | <br/> | ||
+ | <br/> | ||
+ | <br/> | ||
+ | <br/> | ||
+ | <br/> | ||
==產(chǎn)品相關(guān)推薦== | ==產(chǎn)品相關(guān)推薦== | ||
[[文件:erweima.png|230px|無框|右]] | [[文件:erweima.png|230px|無框|右]] | ||
===購買地址=== | ===購買地址=== | ||
[http://lifestyle201.com/goods-44.html LCD4884液晶搖桿擴展板] | [http://lifestyle201.com/goods-44.html LCD4884液晶搖桿擴展板] | ||
? | + | ===周邊產(chǎn)品推薦=== | |
? | + | ||
[http://lifestyle201.com/goods-126.html 1602液晶顯示器 藍(lán)白屏 ] | [http://lifestyle201.com/goods-126.html 1602液晶顯示器 藍(lán)白屏 ] | ||
<br/> | <br/> | ||
[http://lifestyle201.com/goods-129.html Arduino IIC/I2C LCD1602 字符液晶顯示器] | [http://lifestyle201.com/goods-129.html Arduino IIC/I2C LCD1602 字符液晶顯示器] | ||
===相關(guān)問題解答=== | ===相關(guān)問題解答=== | ||
? | + | [http://www.makerspace.cn/forum.php?mod=viewthread&tid=4009&highlight=lcd4884 LCD4884液晶搖桿擴展板顯示應(yīng)用]<br/> | |
+ | [http://www.makerspace.cn/forum.php?mod=viewthread&tid=3250&highlight=lcd4884 關(guān)于arduino的LCD4884的使用] | ||
===相關(guān)學(xué)習(xí)資料=== | ===相關(guān)學(xué)習(xí)資料=== | ||
[http://v.youku.com/v_show/id_XNDU0MzE5NjIw.html 操作視頻]<br/> | [http://v.youku.com/v_show/id_XNDU0MzE5NjIw.html 操作視頻]<br/> | ||
[http://www.makerspace.cn/portal.php 奧松機器人技術(shù)論壇] | [http://www.makerspace.cn/portal.php 奧松機器人技術(shù)論壇] |
2023年11月18日 (六) 13:27的最后版本
目錄 |
產(chǎn)品概述
最新推出的LCD4884 LCD Joystick Shield v2.0 LCD4884液晶屏擴展板是哈爾濱奧松機器人科技有限公司研發(fā)的一款黑白屏液晶擴展板。此擴展板采用Nokia 5110液晶屏為顯示器件。SPI接口,最大限度的節(jié)省I/O資源。特別添加五向搖桿,方便實現(xiàn)搭建人機互動接口,剩余的模擬與數(shù)字接口全部用插針引出,便于安裝其它傳感器與模塊。本品適用于各種開發(fā)板和控制器,例如:Arduino控制器、STC單片機、AVR單片機等。
規(guī)格參數(shù)
- 產(chǎn)品名稱:LCD4884液晶搖桿擴展板
- 產(chǎn)品貨號:RB-05L007
- 工作電壓:DC5V
- 產(chǎn)品類型:Arduino擴展板
- 制作工藝:FR4雙面噴錫
- 人性化設(shè)計:具有可人機互動接口“五項搖桿”
- 工作溫度:10℃-30℃
- 重量:28g
- 產(chǎn)品尺寸:69.47mm x 53.34mm x 18mm
- 發(fā)貨清單:LCD4884液晶搖桿擴展板×1
- 包裝方式:靜電袋密封
- 選配配件:3PIN傳感器連接線、Arduino 328控制器等
- 板載資源:
- 數(shù)字接口:8個
- 模擬輸入借口:5個
- 48×84液晶:1個
- 無向搖桿按鍵:1個
- 系統(tǒng)復(fù)位按鍵:1個
使用方法
使用硬件
- Carduino UNO 控制器 * 1個
- LCD4884 Joystick Shield ×1
- USB數(shù)據(jù)通信線×1
例子程序
程序上傳前需要先下載鏈接:https://pan.baidu.com/s/1rZRC6a2eQGpZs_oCbAPEuw?pwd=n7yp
提取碼:n7yp LCD4884 程序使用到的庫文件,將它放到Arduino安裝目錄下的libraries文件夾下
/* YourDuinoStarter Example: LCD SHIELD with 'Joystick' button - WHAT IT DOES Displays on LCD4884, reads button - SEE the comments after "//" on each line below - CONNECTIONS: - LCD 4884 Shield has all connections - NOTE: Start Serial Monitor to see switch voltage values - V1.00 02/08/2016 Questions: terry@yourduino.com */ /*-----( Import needed libraries )-----*/ #include <LCD4884.h> // UPDATED version 2/16 Yourduino /*-----( Declare Constants and Pin Numbers )-----*/ #define LCD_BACKLIGHT_PIN 7 /*-----( Declare objects )-----*/ //None: Included in library /*-----( Declare Variables )-----*/ int displayDelay = 1000; int switchDelay = 100; // Switch scanning delay int switchVoltage ; // From Analog read of the button resistors void setup() /****** SETUP: RUNS ONCE ******/ { Serial.begin(115200); pinMode(LCD_BACKLIGHT_PIN, OUTPUT); lcd.LCD_init(); // creates instance of LCD lcd.LCD_clear(); // blanks the display for (int a = 0; a < 5; a++) { digitalWrite(LCD_BACKLIGHT_PIN, LOW); delay(300); digitalWrite(LCD_BACKLIGHT_PIN, HIGH); delay(300); } for (int a = 0; a < 6; a++) { lcd.LCD_write_string(0, a, "01234567980123", MENU_NORMAL); // ignore MENU_NORMAL for now delay(displayDelay); } delay(displayDelay); lcd.LCD_clear(); // blanks the display delay(500); // Show the BIG characters (0..9, + - only) lcd.LCD_write_string_big(0, 0, "012345", MENU_NORMAL); lcd.LCD_write_string_big(0, 3, "-+-+-+", MENU_NORMAL); delay(1000); lcd.LCD_clear(); // now read the joystick using analogRead(0 }//--(end setup )--- void loop() /****** LOOP: RUNS CONSTANTLY ******/ { lcd.LCD_write_string(1, 1, "PUSH A BUTTON", MENU_NORMAL); switchVoltage = analogRead(0); Serial.print("Switch analog value = "); Serial.println(switchDelay); if (switchVoltage == 0) { lcd.LCD_write_string(2, 2, "LEFT ", MENU_NORMAL); } else if (switchVoltage > 0 && switchVoltage < 180) { lcd.LCD_write_string(2, 2, "PUSH IN", MENU_NORMAL); delay(switchDelay); } else if (switchVoltage > 180 && switchVoltage < 400) { lcd.LCD_write_string(2, 2, "DOWN ", MENU_NORMAL); delay(switchDelay); } else if (switchVoltage > 400 && switchVoltage < 600) { lcd.LCD_write_string(2, 2, "RIGHT", MENU_NORMAL); delay(switchDelay); } else if (switchVoltage > 600 && switchVoltage < 800) { lcd.LCD_write_string(2, 2, "UP ", MENU_NORMAL); delay(switchDelay); } else if (switchVoltage > 800) { lcd.LCD_write_string(2, 2, "NONE ", MENU_NORMAL); delay(switchDelay); } } //--(end main loop )--- /*-----( Declare User-written Functions )-----*/ //NONE //*********( THE END )***********
程序效果
視頻演示
產(chǎn)品相關(guān)推薦
購買地址
周邊產(chǎn)品推薦
1602液晶顯示器 藍(lán)白屏
Arduino IIC/I2C LCD1602 字符液晶顯示器
相關(guān)問題解答
LCD4884液晶搖桿擴展板顯示應(yīng)用
關(guān)于arduino的LCD4884的使用