Advertisement
Vendrick-Xander

Basic LCD Code

Feb 3rd, 2020
135
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. #include <LiquidCrystal.h>
  2. const int dp4 = 4;
  3. const int dp5 = 5;
  4. const int dp6 = 6;
  5. const int dp7 = 7;
  6. const int enable = 12;
  7. const int dataInstruction = 11;
  8. LiquidCrystal lcd(dataInstruction, enable, dp4, dp5, dp6, dp7);
  9. void setup() {
  10. lcd.begin(16, 2);
  11.  
  12. lcd.print("Hello, World!");
  13. pinMode(dp4, OUTPUT);
  14. pinMode(dp5, OUTPUT);
  15. pinMode(dp6, OUTPUT);
  16. pinMode(dp7, OUTPUT);
  17. pinMode(enable, OUTPUT);
  18. pinMode(dataInstruction, OUTPUT);
  19. }
  20.  
  21. void loop() {
  22.  
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement