Close

2023-12-21

A project log for M8B

Magic 8 Ball + User Guide

isaurejarryisaure.jarry 12/21/2023 at 11:440 Comments

We successfully managed to display "Hello!" on our LCD screen, which is connected to the ESP32. 

Here is the code:

#include <LiquidCrystal.h>

// Pin numbers for the LCD 
const int rs = 15;
const int en = 13;
const int d4 = 32;
const int d5 = 33;
const int d6 = 25;
const int d7 = 26;

// Create a LiquidCrystal object
LiquidCrystal lcd(rs, en, d4, d5, d6, d7);

void setup() {
  // Initializing the LCD with its number of columns and rows, knowing ours is a 0802A
  lcd.begin(8, 2);
}

void loop() {
  lcd.clear();          // Clear the LCD
  lcd.print("Hello!");   // Print a message
  delay(1000);           // Wait for a second
}

These are our wirings:

And this is the display:

Discussions