can't get I2C display to work with arduino nero

HI,

I’m trying to get work I2C 2x16 character display QAPASS LCM1602 to work with arduino nero board …

… my code compiles and upload to nero OK but nothing happens in LCD display …

I tried to connect SDA and SCL pins to nero board … and I tried to use A4 and A5 pins…

how I know what pins are really used for my LCD pins ?

If I check those pin with oscilloscope there is no pulses in any pins ??

In code this not compile : LiquidCrystal_I2C lcd(0x27, 2, 1, 0, 4, 5, 6, 7, 3, POSITIVE);

but this is OK LiquidCrystal_I2C lcd(0x27, 16, 2);

(as in header file )

I’ll be happy if someone can help me and give me some hints… to solve my problem with arduino :slight_smile:

have fun
-arto-

``

/* www.learningbuz.com */
/Impport following Libraries/
#include <Wire.h>
#include <LiquidCrystal_I2C.h>
//I2C pins declaration
LiquidCrystal_I2C lcd(0x27, 2, 1, 0, 4, 5, 6, 7, 3, POSITIVE);

void setup()
{

lcd.begin(16,2);//Defining 16 columns and 2 rows of lcd display
lcd.backlight();//To Power ON the back light
//lcd.backlight();// To Power OFF the back light

}

void loop()
{
//Write your code
lcd.setCursor(0,0); //Defining positon to write from first row,first column .
lcd.print(" Tech Maker "); //You can write 16 Characters per line .
delay(1000);//Delay used to give a dynamic effect
lcd.setCursor(0,1); //Defining positon to write from second row,first column .
lcd.print(“Like | Share”);
delay(8000);

lcd.clear();//Clean the screen
lcd.setCursor(0,0);
lcd.print(" SUBSCRIBE “);
lcd.setCursor(0,1);
lcd.print(” TECH MAKER ");
delay(8000);
}

Yep.

First, read the instructions on how to post queries here. Note point 7.

Then go to the libraries manager in the IDE and install the HD44780 library. When you do that, you will then have a number of examples under that library name which you can use to operate you display and from which you can develop your own programs. :grinning:

Paul__B:
Yep.

First, read the instructions on how to post queries here. Note point 7.

Then go to the libraries manager in the IDE and install the HD44780 library. When you do that, you will then have a number of examples under that library name which you can use to operate you display and from which you can develop your own programs. :grinning:

well but it is I2C display !

Indeed it is. So you really need to use the HD44780 library to make things easier for yourself. :astonished:

artsiha:
well but it is I2C display !

Not really. At least not based on the code examples you showed.
The code examples you showed were for a hd44780 LCD that the Arduino talks to using a PCF8574 based backpack.
The hd44780 library comes with an i/o class, hd44780_I2Cexp, that is for that type of device.

The hd44780 library is better than either of the two libraries you mentioned in that it can easily be installed from the library manager, does not interfere with any other libraries, and “just works”, since it will auto locate the i2c address, and auto-detect the pin mappings between the PCF8574 and the hd44780 LCD.
The hd44780 library comes with extensive documentation, examples, and is also quite a bit faster than the two libraries you referred to.

For that type of device, the first thing to do after installing the library, as mentioned in the documentation, is to run the included diagnostic tool, I2CexpDiag, to verify that everything is working correctly.

— bill

Thank you for your good advices...

now I had today success to get that diagnostic program to work and there was missing
pullup resistors in nero module so I add them...(in nero module pin SDA is pin ad 4 and SCL is pin
ad5 so I cant use pin ad4 and ad5 for ad pins)

But I'm asking please tell me where I can find example programs ... how to move cursor ....

... print letters.... print numbers ... print variables ... print degrees mark and othet special
maks on LCD display ... and so on ...

I'll be happy if you can help me :slight_smile:

-arto-

@arto,

The Nero appears to be a Uno with beefier power regulators.
It even uses Optiboot bootlader. I presume that you select "Uno" in the Arduino IDE.

So every Uno example should work out of the box.

There are lots of Tutorials on the Internet.

If you have a problem, post a link to the website.
Or quote the "library Example" by name.

It is always best to start with Library Examples. The library author should have provided working code.
Tutorial examples should be good too. But may be out of date or intended for different hardware.

If you can provide the information, many readers will help you.

David.

david_prentice:
@arto,

The Nero appears to be a Uno with beefier power regulators.
It even uses Optiboot bootlader. I presume that you select “Uno” in the Arduino IDE.

So every Uno example should work out of the box.

There are lots of Tutorials on the Internet.

If you have a problem, post a link to the website.
Or quote the “library Example” by name.

It is always best to start with Library Examples. The library author should have provided working code.
Tutorial examples should be good too. But may be out of date or intended for different hardware.

If you can provide the information, many readers will help you.

David.

Thank you David :slight_smile:

<I presume that you select “Uno” in the Arduino IDE.>

yes I did … nero board is uno compatible and that I2CexpDiag works fine now…

but I don’t understand what this means: ?

<If you have a problem, post a link to the website.
Or quote the “library Example” by name.>

best regards
-arto-

david_prentice:
@arto,

The Nero appears to be a Uno with beefier power regulators.
It even uses Optiboot bootlader. I presume that you select “Uno” in the Arduino IDE.

So every Uno example should work out of the box.

There are lots of Tutorials on the Internet.

If you have a problem, post a link to the website.
Or quote the “library Example” by name.

It is always best to start with Library Examples. The library author should have provided working code.
Tutorial examples should be good too. But may be out of date or intended for different hardware.

If you can provide the information, many readers will help you.

David.

Thank you David :slight_smile:

<I presume that you select “Uno” in the Arduino IDE.>

yes I did … nero board is uno compatible and that I2CexpDiag works fine now…

but I don’t understand what this means: ?

<If you have a problem, post a link to the website.
Or quote the “library Example” by name.>

best regards
-arto-

It means you say which web page you are reading e.g. https://www.arduino.cc/en/Tutorial/ASCIITable

Or you might be trying to use a third-party library e.g. MCUFRIEND_kbv

Just say which library example sketch is giving a problem e.g. "button_simple"

It is always wise to try all the examples before writing your own code.

If it is your code that is giving a problem, copy-paste the sketch to your Forum message.

The important point is: a reader must be able to replicate your code to see the problem for herself.

Simple problems might be resolved by just reading your pasted code.

It is quicker and easier to post code (or a link to code) than to type minimal information.
Otherwise you get asked for the code, library name, board, ... when you could have just put it in your original question.

David.

david_prentice:
It means you say which web page you are reading e.g. https://www.arduino.cc/en/Tutorial/ASCIITable

Or you might be trying to use a third-party library e.g. MCUFRIEND_kbv

Just say which library example sketch is giving a problem e.g. "button_simple"

It is always wise to try all the examples before writing your own code.

If it is your code that is giving a problem, copy-paste the sketch to your Forum message.

The important point is: a reader must be able to replicate your code to see the problem for herself.

Simple problems might be resolved by just reading your pasted code.

It is quicker and easier to post code (or a link to code) than to type minimal information.
Otherwise you get asked for the code, library name, board, ... when you could have just put it in your original question.

David.

Thank you

The hd44780 library comes with many examples.
They are organized by i/o class.
If you found the I2CexpDiag sketch, then you have seen the examples included for the hd44780_I2Cexp i/o class.
You probably should spend some time reading the included documentation that is included with the hd44780 library.
(You can access it using the included Documentation sketch)
It has clickable links to LOTs of additional information.
There is a link to the README file, which has lots of information about the hd4780 library, including its API functions.
There are clickable links to the hd44780 github page, the hd44780 library wiki, custom character generation tools.
There are several clickable links to additional Arduino information including
the LIquidCrystal API documentation, how to install libraries, the arduino playground

There are also links to further technical information like
hd44780 datasheets, how hd44780 internal ram is addressed, arduino board pinouts, and more.

--- bill