Skip to content

Instantly share code, notes, and snippets.

@ruhnet
Created February 3, 2018 20:45
Show Gist options
  • Save ruhnet/c296b0a7bf9bedaf728a8eac989bff41 to your computer and use it in GitHub Desktop.
Save ruhnet/c296b0a7bf9bedaf728a8eac989bff41 to your computer and use it in GitHub Desktop.
LCD Character Set Test Program
//LCD CHARACTER SET TEST PROGRAM 2018-02-03
#include <LiquidCrystal.h>
LiquidCrystal lcd(12, 11, 10, 9, 8, 7);
void setup() {
}
void loop() {
lcd.begin(16, 2);
int x = 0;
for (int c = 0x20, x=0, y=0; c < 256; c++) {
lcd.write(c);
delay(100);
if (x==15 && y==0) {
y=1;
x=0;
lcd.setCursor(x,y);
} else if (x==15 && y==1) {
y=0;
x=0;
lcd.setCursor(x,y);
lcd.clear();
} else x++;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment