Page 7 of 7

Re: Hobby Components 1602 SmartLCD (HCMODU0122)

Posted: Fri Feb 09, 2024 3:44 pm
by TotleyRover
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.

Re: Hobby Components 1602 SmartLCD (HCMODU0122)

Posted: Fri Feb 09, 2024 4:38 pm
by andrew
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

Re: Hobby Components 1602 SmartLCD (HCMODU0122)

Posted: Fri Feb 09, 2024 5:23 pm
by TotleyRover
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

Re: Hobby Components 1602 SmartLCD (HCMODU0122)

Posted: Sun Feb 11, 2024 9:23 am
by andrew
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. }

Re: Hobby Components 1602 SmartLCD (HCMODU0122)

Posted: Sun Feb 11, 2024 2:51 pm
by TotleyRover
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.

Re: Hobby Components 1602 SmartLCD (HCMODU0122)

Posted: Mon Feb 12, 2024 9:37 am
by andrew
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.