Advertisement
andretafta

Arduino LCD without I2C

Mar 24th, 2025
6
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. // C++ code
  2. //
  3. #include<LiquidCrystal.h>
  4. const int PIN_RS = 13;
  5. const int PIN_E = 12;
  6. const int PIN_DB4 = 7;
  7. const int PIN_DB5 = 6;
  8. const int PIN_DB6 = 5;
  9. const int PIN_DB7 = 4;
  10.  
  11. LiquidCrystal lcd(PIN_RS,PIN_E,PIN_DB4,PIN_DB5,PIN_DB6,PIN_DB7);
  12.  
  13. void setup (){
  14. lcd.begin(16,2);
  15. }
  16.  
  17. void loop(){
  18. lcd.clear();
  19.  
  20. lcd.setCursor(3,0);
  21. lcd.print("Hi!");
  22. lcd.setCursor(0,1);
  23. lcd.print("Learn about Arduino");
  24. delay(5000);
  25. }
  26.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement