Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <LiquidCrystal.h>
- const int rs = 12, en = 11, d4 = 5, d5 = 4, d6 = 3, d7 = 2;
- LiquidCrystal lcd(rs, en, d4, d5, d6, d7);
- // these constants won't change. But you can change the size of
- // your LCD using them:
- const int numRows = 2;
- const int numCols = 16;
- void setup() {
- // set up the LCD's number of columns and rows:
- lcd.begin(numCols, numRows);
- }
- void loop() {
- // loop from ASCII 'a' to ASCII 'z':
- for (int thisLetter = 'a'; thisLetter <= 'z'; thisLetter++) {
- // loop over the columns:
- for (int thisRow = 0; thisRow < numRows; thisRow++) {
- // loop over the rows:
- for (int thisCol = 0; thisCol < numCols; thisCol++) {
- // set the cursor position:
- lcd.setCursor(thisCol, thisRow);
- // print the letter:
- lcd.write(thisLetter);
- delay(200);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement