0
A
回答
2
基本上,使用最常見的液晶顯示器,有a library for Arduino:
和示例代碼是:無論你在LCD上打印
LiquidCrystal lcd(12, 11, 5, 4, 3, 2); // Here is the pinout of your LCD. Read the tutorial to understand what it means.
void setup() {
// Set up the LCD's number of columns and rows:
lcd.begin(16, 2);
// Prints the first line which is 20 characters wide, padded with spaces, and the 'world!' will be on second line.
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);
}
被認爲是一條線。因此,要在兩行上打印文本,需要用空格填充第一行,直到達到行的字符數。接下來的所有文字都會顯示在第二行。
相關問題
- 1. SPI液晶顯示器與Arduino的接口
- 2. 與arduino和xbee 20x4液晶顯示器
- 3. 接口javascript與arduino
- 4. C++:與Arduino串行接口
- 5. 用Arduino進行液晶LCD編程?
- 6. Arduino液晶屏fps奇怪的行爲
- 7. 的Arduino和彩色液晶盾
- 8. Arduino - 多重按鈕事件與液晶屏盾牌
- 9. 使用電位器連接液晶顯示器的原因
- 10. Arduino接口圖形
- 11. Arduino藍牙連接
- 12. Arduino和breaboard連接
- 13. 的Arduino SoftwareSerial連接
- 14. 內連接和回聲液
- 15. 將Android Nexus One與Arduino + BlueSmirf接口
- 16. Arduino與磁性拾音器接口
- 17. 網絡攝像頭與Arduino的接口
- 18. Arduino與Java的接口問題
- 19. 連接水晶報告與PHP
- 20. 將Arduino連接到Blynk與ESP8266
- 21. 連接Arduino與IP攝像頭
- 22. Windows 10 UWP與Arduino的藍牙連接
- 23. C++與Arduino的libserial串行連接
- 24. Android中的藍牙與arduino連接
- 25. 如何將android bluetooth與arduino連接?
- 26. Python/Tkinter使用標籤設計Arduino串行連接接口
- 27. Arduino - Qt C++串行接口
- 28. python和arduino的接口
- 29. ESP8266和Arduino的接口
- 30. 設置Arduino遠程連接
如果我們不知道您使用的是哪種LCD,我們無法幫到您。這是一個更好的網站這個問題:http://electronics.stackexchange.com/和我猜你沒有嘗試看液晶顯示器的數據表,因爲那絕對會有你的答案 – Optox
給那種你使用的LCD,到目前爲止你寫的代碼是什麼,你的LCD有多少個字符..? – zmo