Skip to content

Instantly share code, notes, and snippets.

@kachurovskiy
Created May 10, 2023 06:38
Show Gist options
  • Save kachurovskiy/c44a5886c0aa95e7cf9cbbf71869476e to your computer and use it in GitHub Desktop.
Save kachurovskiy/c44a5886c0aa95e7cf9cbbf71869476e to your computer and use it in GitHub Desktop.
#include <SPI.h>
#include <Wire.h>
#include <LiquidCrystal.h>
LiquidCrystal lcd(21, 48, 47, 38, 39, 40, 41, 42, 2, 1);
void setup() {
lcd.begin(20, 4);
lcd.setCursor(0, 3);
}
int col = 0;
int row = 0;
int ch = 0;
void loop() {
lcd.setCursor(col, row);
lcd.print(" ");
lcd.setCursor(col, row);
lcd.print(char(ch));
if (col < 19) {
col++;
} else if (row < 3) {
col = 0;
row++;
} else {
row = 0;
col = 0;
}
ch = (ch + 1) % 256;
delay(100);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment