Advertisement
carcyn

Untitled

Feb 3rd, 2020
205
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.85 KB | None | 0 0
  1. #include <LiquidCrystal.h>
  2.  
  3. const int rs = 12, en = 11, d4 = 5, d5 = 4, d6 = 3, d7 = 2;
  4. LiquidCrystal lcd(rs, en, d4, d5, d6, d7);
  5.  
  6. // these constants won't change. But you can change the size of
  7. // your LCD using them:
  8. const int numRows = 2;
  9. const int numCols = 16;
  10.  
  11. void setup() {
  12. // set up the LCD's number of columns and rows:
  13. lcd.begin(numCols, numRows);
  14. }
  15.  
  16. void loop() {
  17. // loop from ASCII 'a' to ASCII 'z':
  18. for (int thisLetter = 'a'; thisLetter <= 'z'; thisLetter++) {
  19. // loop over the columns:
  20. for (int thisRow = 0; thisRow < numRows; thisRow++) {
  21. // loop over the rows:
  22. for (int thisCol = 0; thisCol < numCols; thisCol++) {
  23. // set the cursor position:
  24. lcd.setCursor(thisCol, thisRow);
  25. // print the letter:
  26. lcd.write(thisLetter);
  27. delay(200);
  28. }
  29. }
  30. }
  31. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement