Advertisement
diyhus

Thư viện LCD 16x2

Dec 3rd, 2016
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. #include<LiquidCrystal.h> // thu vien LCD
  2. #include <stdlib.h>
  3. //LiquidCrystal lcd(RS, E, D4, D5, D6, D7); // cau hinh chan LCD
  4. LiquidCrystal lcd(A1, 5, 4, 3, 2, A0); LED LCD A2 // cau hinh chan LCD
  5. void setup(void)
  6. {
  7. Serial.begin(115200);
  8. lcd.begin(16,2);
  9. }
  10.  
  11. void loop(void)
  12. {
  13. Serial.print("Nong do bui trong khong khi: ");
  14. lcd.setCursor(0, 0);
  15. lcd.print("Trung binh");
  16. delay(1000);
  17. lcd.clear();
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement