#include <LiquidCrystal.h>
// Initialize the library with the numbers of the interface pins
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
// Define 4 custom characters for a larger square shape
byte topLeft[8] = {
B11111,
B11111,
B11111,
B11111,
B00000,
B00000,
B00000,
B00000
};
byte topRight[8] = {
B11111,
B11111,
B11111,
B11111,
B00000,
B00000,
B00000,
B00000
};
byte bottomLeft[8] = {
B00000,
B00000,
B00000,
B00000,
B11111,
B11111,
B11111,
B11111
};
byte bottomRight[8] = {
B00000,
B00000,
B00000,
B00000,
B11111,
B11111,
B11111,
B11111
};
void setup() {
// Set up the LCD's number of columns and rows
lcd.begin(16, 2);
// Create custom characters for each part of the square
lcd.createChar(0, topLeft);
lcd.createChar(1, topRight);
lcd.createChar(2, bottomLeft);
lcd.createChar(3, bottomRight);
// Display the large square pattern on the LCD
lcd.setCursor(0, 0);
lcd.write(byte(0)); // Top-left
lcd.write(byte(1)); // Top-right
lcd.setCursor(0, 1);
lcd.write(byte(2)); // Bottom-left
lcd.write(byte(3)); // Bottom-right
}
void loop() {
// Nothing to do in the loop
}