[SOLVED] GrovePi LCD RGB - multiple I2C addresses, brightness, on/off functionality


#1

Hi

Using the GrovePi LCD Rgb screen on Raspberry pi 3 and windows 10 iot core (latest version). I have managed to follow all of the current samples that you have and get everything working. There are now a couple of extra things that I’d like to try.

I notice that there are two constructors for the lcd

IRgbLcdDisplay RgbLcdDisplay();
IRgbLcdDisplay RgbLcdDisplay(int rgbAddress, int textAddress);

Would the second one allow me to use more that one lcd screen in a project and if so how would one use it?

Is it possible to set the text of either the upper or lower line independently of the other?

Is there any way to control the brightness of the backlight (dim it at night, raise it during the day for example)?

Is there is no way to control the brightness is there a way to temporarily turn it off?

Many thanks

Dom


#2

Hi @dom,

With our libraries, in C# and Python, you get the following functionalities:

  • set the text on the Grove LCD RGB

  • set the RGB backlight color on the Grove LCD RGB


Would the second one allow me to use more that one lcd screen in a project and if so how would one use it?

No, each Grove RGB LCD device has the same I2C address.
Sometimes, I2C devices allow you to physically change addresses by cutting specific traces onto their circuit. I’m not sure you can do this with the Grove RGB LCD, since on Seeeds website there’s nothing mentioned about it.

Is it possible to set the text of either the upper or lower line independently of the other?

The solution we’re providing can’t do this (hardware speaking).
But you can have a workaround in your program.
You could simulate having complete (independent) control over each character by updating the screen text each time a change occurs - you’d also need some abstractions on top of our provided code in order to do so.

Is there any way to control the brightness of the backlight (dim it at night, raise it during the day for example)?

No, we don’t have one yet. On the other hand, you can look over to Seeed's library and see how they did it. Maybe you can port their functionalities to C# and that’d be great for all of us.

Here’s a link to Seeed's library: github.com/Seeed-Studio/Grove_LCD_RGB_Backlight

Is there is no way to control the brightness is there a way to temporarily turn it off?

Again, Seeed's library might help you in doing this: github.com/Seeed-Studio/Grove_LCD_RGB_Backlight


Please let me know if there’s anything else needed to know about.

Thank you!


#3

Hi Robert

Thank you for your comprehensive reply, much appreciated. I have already downloaded seeed’s library and have noticed things like auto scroll and scroll so I’ll have to look at trying to port some of that functionality over to c#, or at least abstracting it.

I’ve literally only just started playing with the raspberry pi and the grove kit so from what you were saying about not being able to use more than one screen at once would it be reasonable to assume that by definition you can only use one I2C device at a time full stop.

What purpose does the second constructor for the lcd serve? is there a simple example anywhere?

Dom


#4

Hi @dom,


I’m glad it helped you.

It’s going to be helpful if you have some Linux background.
The Raspberry Pi is just another Linux machine.


A particular case is not going to define the general rule. Applying it to our case, this means that a device which can’t be paired with other devices of the same kind isn’t going to define the general rule for all of them.

I2C's strong advantage lies in its ability to control lots of devices (simultaneously) with only 2 wires.
There are 3 addressing types for I2C depending on how many devices can be connected simultaneously:

  • 7-bit addressing - which supports up to 128 addresses

  • 8-bit addressing - which supports up to 256 addresses

  • 10-bit addressing - which supports up to 1024 addresses

In conclusion, I2C is known for being able to handle lots of devices at the same time. The only requirement for each device is to have an unique address within an pool of I2C devices.

Here’s more on this topic : electronics.stackexchange.com/questions/181953/how-many-i2c-slaves-can-a-i2c-master-support


IRgbLcdDisplay RgbLcdDisplay(int rgbAddress, int textAddress);

The 2nd constructor you’ve mentioned about, allows the user (the programmer) to pass to RgbLcdDisplay object the address for the text-displaying device and for the backlight device.
The addresses should be that of the Grove LCD RGB, which by the way, are fixed.
I don’t think you need to use this constructor, unless you discover there’s a way for having more addresses for the Grove LCD RGB.

It’s normal for a class to have as many constructors as possible (while at the same time not being redundant).


Please let me know if / when we’re good to mark the thread as solved.

Thank you!


#5

Hi Robert

Once again thank you for the comprehensive reply. Clearly I’ve got a lot of reading to do. For the time being let’s consider this closed so as not to waste more of your valuable time.

Dom


#6

Hi @dom,

I’ll close the thread now.
Take all the time you need. If you have any more questions, please don’t hesitate to create other topics.

Thank you!


#7