Anyone working on HD44780 library?

Discuss development of drivers for external hardware and components, such as LCD screens, sensors, motor drivers, etc.
Target audience: Users and developers of drivers.
User avatar
dhylands
Posts: 2500
Joined: Mon Jan 06, 2014 6:08 pm
Location: Shuswap, BC, Canada
Contact:

Re: Anyone working on HD44780 library?

Post by dhylands » Wed Sep 07, 2016 3:41 am

orsisam wrote:Can You tell me how to find the i2c address using micropython?
The simple way is to use the I2C.scan() method see: http://docs.micropython.org/en/latest/p ... b.I2C.scan

orsisam
Posts: 9
Joined: Mon Sep 05, 2016 5:58 pm

Re: Anyone working on HD44780 library?

Post by orsisam » Thu Sep 08, 2016 11:41 pm

dhylands wrote:
orsisam wrote:Can You tell me how to find the i2c address using micropython?
The simple way is to use the I2C.scan() method see: http://docs.micropython.org/en/latest/p ... b.I2C.scan
How to use this function? I've tried but failed. I tried this code

Code: Select all

from machine import I2C
I2C.scan()
but than I got this error messages

Code: Select all

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: function takes 1 positional arguments but 0 were given
So what argument should I give..?

SpotlightKid
Posts: 229
Joined: Wed Apr 08, 2015 5:19 am

Re: Anyone working on HD44780 library?

Post by SpotlightKid » Fri Sep 09, 2016 2:33 am

It's not a function, it's a method. So you need to create an Instance of the I2C class first and then call the scan method on that instance.

For the pyboard, see the example code at the top of the documentation page dhylands linked to. For the esp8266 portt see http://docs.micropython.org/en/latest/e ... e.I2C.html.

User avatar
pythoncoder
Posts: 1963
Joined: Fri Jul 18, 2014 8:01 am

Re: Anyone working on HD44780 library?

Post by pythoncoder » Fri Sep 09, 2016 7:42 am

The point being that a microcontroller board can have multiple I2C interfaces: you have to create an instance on defined pins before you can scan it.
Peter Hinch

User avatar
patvdleer
Posts: 36
Joined: Mon Jun 13, 2016 11:52 am
Location: Maastricht, NL
Contact:

Re: Anyone working on HD44780 library?

Post by patvdleer » Fri May 19, 2017 3:49 pm

Any of you ever had the issues that the backlight on/off does work but nothing appears on the screen?

Although I bought it as a v3 but it looks light I got http://arduino-info.wikispaces.com/LCD-Blue-I2C#v1
NodeMCU v0.9
WeMos D1 Mini

User avatar
dhylands
Posts: 2500
Joined: Mon Jan 06, 2014 6:08 pm
Location: Shuswap, BC, Canada
Contact:

Re: Anyone working on HD44780 library?

Post by dhylands » Fri May 19, 2017 4:39 pm

The backlight is almost completely independent from the LCD.

Normally, when you power on the LCD you should see one row of black rectangles. If you're not seeing that, then you typically need to adjust the contrast voltage,

User avatar
patvdleer
Posts: 36
Joined: Mon Jun 13, 2016 11:52 am
Location: Maastricht, NL
Contact:

Re: Anyone working on HD44780 library?

Post by patvdleer » Fri May 19, 2017 5:39 pm

I do get something now but I still have to lay it almost completely flat just to see something, the blue potentiometer on the back is already fully open...
NodeMCU v0.9
WeMos D1 Mini

User avatar
dhylands
Posts: 2500
Joined: Mon Jan 06, 2014 6:08 pm
Location: Shuswap, BC, Canada
Contact:

Re: Anyone working on HD44780 library?

Post by dhylands » Fri May 19, 2017 6:50 pm

Are you powering the LCD with 3.3v? Or with 5v? The newer LCDs tend to work with both, but I wouldn't be surprised if there are some that need 5v to work properly.

Make sure you try the contrast pot full the other way as well.

Post Reply