Serial I2C LCD 1602 Module (HCARDU0023)

LCD, TFT, OLED, LED modules
TotleyRover
Posts: 3
Joined: Thu Feb 08, 2024 3:27 pm

Re: Hobby Components 1602 SmartLCD (HCMODU0122)

Post by TotleyRover » Fri Feb 09, 2024 3:44 pm

I have a Uno R4 WiFi, and I cannot get the Hello World example to show output on the display.
The version of the example sketch is 24/05/17 version 0.1: Original version
I believe I am using the correct configuration
#define I2C_ADD 0x3F
Uno/Nano.......SmartLCD I2C Header
GND............G (GND)
5V.............5 (5V)
A4.............D (SDA)
A5.............C (SCL)

I hope the photos I've attached show you more than paragraphs of text will do.
I admit to being an Arduino newbie.
You do not have the required permissions to view the files attached to this post.

andrew
Site Admin
Posts: 1371
Joined: Sun Aug 05, 2012 4:15 pm

Re: Hobby Components 1602 SmartLCD (HCMODU0122)

Post by andrew » Fri Feb 09, 2024 4:38 pm

I have a Uno R4 WiFi, and I cannot get the Hello World example to show output on the display.
The version of the example sketch is 24/05/17 version 0.1: Original version

Thanks for the pictures - that''s not actually the SmartLCD, it's the standard serial LCD. You can find the relevant forum page with the correct sketch and library here:

viewtopic.php?f=75&t=1125
Comments made by this poster do not necessarily reflect the views of Hobby Components Ltd.

TotleyRover
Posts: 3
Joined: Thu Feb 08, 2024 3:27 pm

Re: Hobby Components 1602 SmartLCD (HCMODU0122)

Post by TotleyRover » Fri Feb 09, 2024 5:23 pm

Thanks for the reply
On the Uno R4, WiFi A4 & A5 are Analog input pins.

This is part of the documentation in the sketch you directed me too:

How to connect the Smart LCD to an Arduino Uno/Nano:

Uno/Nano.......SmartLCD I2C Header
GND............G (GND)
5V.............5 (5V)
A4.............D (SDA)
A5.............C (SCL)

Using this sketch with I2C set to 0x3F
It does not work.
I've also connected SDA and SCL on the LCD to SDA & SCL, respectively, on my Uno. It does not work either

andrew
Site Admin
Posts: 1371
Joined: Sun Aug 05, 2012 4:15 pm

Re: Hobby Components 1602 SmartLCD (HCMODU0122)

Post by andrew » Sun Feb 11, 2024 9:23 am

How to connect the Smart LCD to an Arduino Uno/Nano:

Uno/Nano.......SmartLCD I2C Header
GND............G (GND)
5V.............5 (5V)
A4.............D (SDA)
A5.............C (SCL)

Using this sketch with I2C set to 0x3F
It does not work.

The pinout you are referencing above is for the SmartLCD. Can you confirm that you are not using the SmartLCD library/sketch and instead are using the library (liquidcrystal) and sketch (ARD_LCD_HCARDU0023_I2C_Hello_World_Example) from the forum post i linked to:

viewtopic.php?f=75&t=1125


Just to be sure, I've pasted a cut down version of the correct sketch below for you to try. You'll need to uncomment one of the LiquidCrystal_I2C lines depending on I2C address of your display.

  1. #include <Wire.h>
  2. #include <LiquidCrystal_I2C.h>
  3.  
  4. //LiquidCrystal_I2C lcd(0x27,16,2);
  5. //LiquidCrystal_I2C lcd(0x3F,16,2);
  6.  
  7.  
  8. void setup()
  9. {
  10.   lcd.begin();
  11. }
  12.  
  13.  
  14. void loop()
  15. {
  16.   lcd.backlight();
  17.  
  18.   lcd.setCursor(0,0);
  19.   lcd.print("HOBBY COMPONENTS");
  20.   lcd.setCursor(0,1);
  21.   lcd.print("**HELLO WORLD**");
  22.  
  23.   while(1);
  24. }
Comments made by this poster do not necessarily reflect the views of Hobby Components Ltd.

TotleyRover
Posts: 3
Joined: Thu Feb 08, 2024 3:27 pm

Re: Hobby Components 1602 SmartLCD (HCMODU0122)

Post by TotleyRover » Sun Feb 11, 2024 2:51 pm

Success

It appears I was using the wrong sketch, as you suggested.
Also, I was under the impression that with the LCD module I have, I should use:

LiquidCrystal_I2C lcd(0x3F,16,2);
and not
LiquidCrystal_I2C lcd(0x27,16,2);

Just so you know – the opposite is required.

Finally, confusion over the include file #include "LiquidCrystal_I2C.h"
As you can see, I needed to change the quotes to look in the sketch folder, not the std include library managed by IDE.
You do not have the required permissions to view the files attached to this post.

andrew
Site Admin
Posts: 1371
Joined: Sun Aug 05, 2012 4:15 pm

Re: Hobby Components 1602 SmartLCD (HCMODU0122)

Post by andrew » Mon Feb 12, 2024 9:37 am

Glad you got it working.

LiquidCrystal_I2C lcd(0x3F,16,2);
and not
LiquidCrystal_I2C lcd(0x27,16,2);

Just so you know – the opposite is required.
Yep, they can either be 0x27 or 0x3F depending on the version you have. Both options are in the sketch. I should have pointed out to try both.

I'm going to move these posts over to the serial LCD thread as this one (SmartLCD) is the wrong thread.
Comments made by this poster do not necessarily reflect the views of Hobby Components Ltd.

Post Reply

Return to “Display”