2004 20x4 I2C Serial LCD Module (HCMODU0010)

LCD, TFT, OLED, LED modules
andrew
Site Admin
Posts: 791
Joined: Sun Aug 05, 2012 4:15 pm

Re: 2004 20x4 I2C Serial LCD Module (HCMODU0010)

Post by andrew » Sat Feb 08, 2014 2:50 pm

¿Puede confirmar que está utilizando el boceto de la biblioteca y el ejemplo disponible para su descarga en el primer post de este foro. Es muy importante que utilice la versión de biblioteca correcto de lo contrario, no funcionará correctamente. También asegúrese de que usted no tiene ninguna otra versión de la biblioteca en la carpeta de bibliotecas arduino.
Comments made by this poster do not necessarily reflect the views of Hobby Components Ltd.

Mathias
Posts: 1
Joined: Thu Mar 13, 2014 8:48 pm

Re: 2004 20x4 I2C Serial LCD Module (HCMODU0010)

Post by Mathias » Tue May 27, 2014 6:27 pm

Hallo form Germany!

I have 2 2004 I2C LCD module. I have connect once to a Arduino MEGA 2560. The display is blue and line 0 and line 2 i can see the dots.
I have installed the library downloaded form here. If i load the code form site 1 off this topic, the code will be compiled and load to the MEGA without error. But nothing appears on the display.
If i set points in the code ( Serial.println("Start");) i see that the MEGA stops on the first lcd order ( lcd.init();).

Serial.begin(9600);
Serial.println("Start setup");
/* Initialise the LCD */
lcd.init();
/* Transfer the custom characters into the LCD's memory */
lcd.createChar(0, TopLeftCorner);
......
Serial.println("setup end");

Please help me!!
Best Regards
Mathias

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

Re: 2004 20x4 I2C Serial LCD Module (HCMODU0010)

Post by andrew » Wed May 28, 2014 11:21 am

It does look like your screen isn't getting initialised correctly. This could be a connection issue but the first thing to do is to make sure you have the correct library version. If you didn't buy the screen from us it could be that you may need a different library version to the one in the first post of this forum. Having the wrong version of library will cause the symptoms you are seeing. If the screen was purchased from us make sure you don't have any other versions of library in your library folders.

Edit:

Can you also make sure that you have the SDA pin on the module connected to D20 on your mega and SCL to D21.
Comments made by this poster do not necessarily reflect the views of Hobby Components Ltd.

rjstott
Posts: 4
Joined: Thu Aug 14, 2014 1:05 pm

Re: 2004 20x4 I2C Serial LCD Module (HCMODU0010)

Post by rjstott » Thu Aug 14, 2014 2:47 pm

Just received this module and followed the instructions. Seems like I get similar to the previous poster:

sketch_aug14a:55: error: invalid conversion from 'int' to 't_backlighPol'
sketch_aug14a:55: error: initializing argument 3 of 'LiquidCrystal_I2C::LiquidCrystal_I2C(uint8_t, uint8_t, t_backlighPol)'
/Users/richardstott/Documents/Arduino/libraries/LiquidCrystal/LiquidCrystal_I2C.h: In function 'void setup()':
/Users/richardstott/Documents/Arduino/libraries/LiquidCrystal/LiquidCrystal_I2C.h:154: error: 'int LiquidCrystal_I2C::init()' is private
sketch_aug14a:61: error: within this context
sketch_aug14a.ino: In function 'void loop()':
sketch_aug14a:78: error: call of overloaded 'write(int)' is ambiguous
/Users/richardstott/Documents/Arduino/libraries/LiquidCrystal/LCD.h:479: note: candidates are: virtual size_t

The library is as per the attachment above and seems to be installed ok.

Help?

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

Re: 2004 20x4 I2C Serial LCD Module (HCMODU0010)

Post by andrew » Thu Aug 14, 2014 4:45 pm

Are you actually using the library attached to the first post of this thread? Can you make sure you don't have any other versions of this library installed. If so, do you get the same errors when using the example sketch also in the first post? What version of Arduino IDE are you using?
Comments made by this poster do not necessarily reflect the views of Hobby Components Ltd.

rjstott
Posts: 4
Joined: Thu Aug 14, 2014 1:05 pm

Re: 2004 20x4 I2C Serial LCD Module (HCMODU0010)

Post by rjstott » Thu Aug 14, 2014 7:26 pm

OK, playing around I realise there are a number of libraries and that the only way to ensure the right one is to remove the wrong ones. So now the sketch compiles but the display does nothing except a slight flicker after the download. How is the address set on the module? Again as above I have two blank lines and two with dots (alternated). I added an Led blink and dropped the while() and the led blinks so the code is running, just no display.

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

Re: 2004 20x4 I2C Serial LCD Module (HCMODU0010)

Post by andrew » Fri Aug 15, 2014 6:34 am

It is still very likely that you have the wrong library version installed. The wrong library version may compile and appear to run ok but it wont initialise the display correctly and you will get exactly what you are seeing. You need to delete all versions of the library you have and install the one in the first post of this thread. Also try the sketch in the first post as it is a known working program that was written to work with this display.

The I2C address is set in the following line:

LiquidCrystal_I2C lcd(0x27,20,4);
Comments made by this poster do not necessarily reflect the views of Hobby Components Ltd.

rjstott
Posts: 4
Joined: Thu Aug 14, 2014 1:05 pm

Re: 2004 20x4 I2C Serial LCD Module (HCMODU0010)

Post by rjstott » Fri Aug 15, 2014 2:19 pm

Well, thanks for your patience with me. Of course the answer was that I am stupid and connected to the wrong analogue pins, not realizing they number the opposite way from the digital I/O. The display works great and now I have freed up a lot of digital pins from the parallel 1602 display.

Thanks, great service and help.

Jānis
Posts: 4
Joined: Tue Sep 16, 2014 1:38 pm

Re: 2004 20x4 I2C Serial LCD Module (HCMODU0010)

Post by Jānis » Wed Oct 08, 2014 10:55 am

Fighting with Arduino Mega (HCARDU0036) , sensor shield (HCARDU0015) and I2C 2004 Serial 20 x 4 LCD Module (HCMODU0010). Purchased this set from hobbycomponents exactly as suggested. Wired according to instructions, visually equally to pictures provided at the beginning to this topic. No luck.
At some point discovered - in comparing with commodity advertised in hobycomponents shop, sensor shield is lacking icc/com jumpers (in a middle of plate, in a front of communications port), resolved it by connecting icc pins with wires. Still no success. Tried various libraries and examples. Removed old and extra libraries. At some point left only "wire" and "icc" Tried to use library provided at the beginning this topic, added debug prints.. code is compiling without errors and is running, "while" loop is running, but screen is not changing.
Out of ideas, start to think that my device is broken...and I should send it back..
Any hint how to get proofs?
BTW I assume sensor shield is connected properly, as my first try was to make running Arduino RTC DS1302 Real Time Clock Module. I connected module through Sensor Shield. Works fine... This also means that Mega and USB connection to PC is in a good health...
Any hint...

Jānis
Posts: 4
Joined: Tue Sep 16, 2014 1:38 pm

Re: 2004 20x4 I2C Serial LCD Module (HCMODU0010)

Post by Jānis » Wed Oct 08, 2014 1:40 pm

I think, I had figured out the reason. And reason is - Mega and sensor shield V4 incompatibility. SDA and SDL pins on Mega are not connected with sensor shield. Exists Mega sensor shield, looks like, i should obtain such, or use Mega pins without Sensor Shield V4. Can smbdy confirm it? If I am right, it would be fine to put disclaimer in sensor shield description.
Sensor Shield for mega is, for example, here:
http://hobbycomponents.com/index.php/dv ... duino.html
[LINK REMOVED BY ADMIN]
Last edited by Jānis on Wed Oct 08, 2014 2:34 pm, edited 2 times in total.

Post Reply