Using node-red-contrib-i2c to display text on LCD RGB from Seeed

#1

Hi, I have the Grove LCD RGB from Seeed and I am trying to use node-red-contrib-i2c to display text on it. There are 3 nodes: one to scan for devices on i2c bus, one to retrieve data from a device, and one to send data to a device.

This seems simple enough, but I cannot seem to configure the sending node properly to send text to the display.

When I use the scan node, I get back an array [62, 98, 112] and it definitely detects the presence of the LCD display (I have nothing else on the i2c bus). But I have no idea how to configure the sending node.

The parameters are as follows:

Address: (seems to want a decimal value, not hex)
Command: (seems to want a decimal value, not hex)
Payload: json?
Send Bytes: 1? 2?

I’ve spent hours trying too make this work, but no joy. I would be very appreciative if someone could shed some light on this. I love Node-RED, it is so easy to work with, but this one has me stumped!

Thanks, AB

0 Likes

#2

Not used it but I can see that it has 2 I2C addresses 0x62 (98 decimal) for changing the colour of the backlight and 0x3E (62 decimal) for changing the text.

You can send a number of commands to the screen. For example to clear the text. Looks like you need to send a command to clear the screen, turn on the display, set the number of lines then send the text. Commands & text seem to be send using 2 bytes. The first byte is either 0x80 for commands or 0x40 for text.

You should be able to decipher the commands and order of things from the example Python code here: http://wiki.seeedstudio.com/Grove-LCD_RGB_Backlight/#play-with-raspberry-pi

You can easily convert from hex to decimal using a decent calculator such as Windows calc.

0 Likes

#3

Hello, thank you for that information. I had been studying that python code, but it didn’t get me anywhere. However, since you are saying I’m in the right place, I will go back and give it another try. Thanks very much for helping with this, I really appreciate it.

Node-RED has been very easy to use so far, and this is the first time I haven’t been able to make something work, but I guess that was inevitable.

Cheers, AB

0 Likes

#4

Hi, so I have spent several hours trying every combination I can think of, but no joy. I’m wondering if someone could possibly provide an assist with some values that would actually do SOMETHING, perhaps even to just turn it on. I know it is working as I got it to work with other software that I don’t want to use:

Address:
Command:
Payload:
Send Bytes:

Tks, AB

0 Likes

#5

I had a play with an I2C device and got it to respond.
Maybe my little effort might help you out

(But you need full documentation on the device to see what sequences it needs - its not going to be easy)

0 Likes

#6

Hi @cymplecy, thanks for your note. I had actually already copied your flow, and although it was helpful to see another perspective, I still wasn’t able to get my LCD display to work.

I should explain that I am a big supporter of Node-RED as I think it is a really great design environment for IoT. I think because it is part of the default install on a Raspberry Pi it will enable a lot of semi-technical folks (like myself) to explore the world of IoT, where they might not have done so before.

I don’t have any particular use for this Grove LCD screen (other than a general data read-out device) at the moment. What I am actually trying to do is fathom the i2c bus and help to produce a relatively straightforward way of using it. So I was hoping this particular node could be used as a somewhat standardized approach.

I am using the transparent Grove hat from SwitchDoc that does not require any translation drivers, so I am able to use the generic digital I/O nodes for the Pi, and those are working well. I was hoping this i2c node would provide a similar capability for the i2c bus.

I have followed your thread, but it seems to me it progressed to being a much more specific solution, with a different node that was designed specifically for your device.

I was hoping to be able to use the node-red-contrib-i2c 0.5.2 as a more generic solution, but I’m certainly open to anyone who has a better idea about how to use the i2c bus. I am still stumped, unfortunately.

At this point I think I will need to find someone we could pay to make this thing work as it is part of a larger project that we are undertaking. I realize that this may go against the grain of this voluntary forum, but perhaps there’s someone out there that would like some beer money?

Regards, AB

0 Likes

#7

The node-red-contrib-i2c is OK for playing around with I2C without having to write any code .

But to use any i2c device fully is going to require a specific node writing for them.

I don’t think offer of beer money would work - I only drink 30 yr Islay for instance :slight_smile: - it’ll be more a case of someone with javascript/node skills who has a device and wants a node-RED node for it

0 Likes

#8

Hi @cymplecy, perhaps you’re right, there may not be any such thing as a generic node for i2c, but I still think there’s room for a much better explanation of how this node works. I’ll see if I can tap into some of the resource groups I’m affiliated with.

I checked our cellar, but unfortunately there was no 30 year Islay left!

Thanks for your input, it was much appreciated. If I find out anything further, I will post it here.

Cheers, AB

0 Likes