ubilab-ws21 / puzzle-5

0 stars 1 forks source link

Drive the 1602 LCD with ESP32 #33

Closed archerindigo closed 2 years ago

archerindigo commented 2 years ago

The LCDs are to be install to the electric box and the charger box to show the battery level.

Make sure the ESP32 on them can drive the LCD.

archerindigo commented 2 years ago

We got 2 LCDs boards from the lab:

The first one is tested working.

vlcsnap-2022-01-20-11h30m54s181

The LCD shown in the picture is now working along with the NCD reader. The followings have to be noted:

  1. The Arduino library LiquidCrystal doesn't fully compatible with ESP32 NodeMCU. Need to comment out begin(16,1 in LiquidCrystal::init to declare and initialize the LiquidCrystal object in global scope.

Related issue on LiquidCrystal official repository: https://github.com/arduino-libraries/LiquidCrystal/issues/41

  1. The ESP32 NodeMCU doesn't have enough pins to supply the backlit. May jump wires between A/K and Vdd/Vss with 220Ohm resistor between A and Vdd.

  2. Some GPIO on the ESP32 cannot be used, such as GPIO12.

References:

archerindigo commented 2 years ago

TODO:

archerindigo commented 2 years ago

The LCD shield is test working as well. Code in #45