// 10 August 2023
// Code by: xvatriusx
// Forum: https://forum.arduino.cc/t/vertical-16x2-lcd-numbers-made-help-with-improvement/1156130
// Changes by Koepel:
// Remove everything that is not for the vertical font.
// Changed Arduino B00000 to 'C' language 0b00000.
// Everything in a table, so it is easier to add PROGMEM.
// changes by Noiasca:
// bring "Vertical" into a separate file
// create a template class to accept "any" LCD class
//
#include <Wire.h>
#include <LiquidCrystal_I2C.h>
#include "vertical.h"
// create the HW object for the LCD
LiquidCrystal_I2C hwLCD(0x27, 16, 2); // Set the LCD address and dimensions
// create vertical LCD using the above LCD HW
//the Class the LCD Class object (object of HW LCD)
VerticalLCD <LiquidCrystal_I2C>verticalLCD(hwLCD);
void setup() {
Serial.begin(115200);
Wire.begin();
hwLCD.begin(16, 2); // Set the LCD dimensions
hwLCD.backlight(); // Turn on the LCD backlight
hwLCD.clear();
verticalLCD.begin();
// Demonstration of all the numbers
verticalLCD.vert_number(0, 0, 0);
verticalLCD.vert_number(0, 1, 1);
//verticalLCD.vert_number(1, 0, 2);
//verticalLCD.vert_number(1, 1, 3);
verticalLCD.vert_number(2, 0, 4);
//verticalLCD.vert_number(2, 1, 5);
//verticalLCD.vert_number(3, 0, 6);
//verticalLCD.vert_number(3, 1, 7);
//verticalLCD.vert_number(4, 0, 8);
//verticalLCD.vert_number(4, 1, 9);
//verticalLCD.clear(); // demo only
}
void loop() {
delay(100);
}