Grove LCD RGB Backlight

tmpD3E6Now, before anyone says anything – no I’m not advertising Seeed or their Grove stuff. It just so happens that over the weekend my pal brought some of their stuff over to have a play with and I was particularly taken by the LCD display. This is a typical Hitachi-style 16-character by 2 line LCD of the type that have been floating around since last century but which still are popular today I guess because of price. Anyway, this one marked “Grove-LCD RGB Backlight v1.0” is not particularly cheap but it has an RGB LED background and runs off I2c.

We tested it using the Seeed Studio WIO boards (more on that later). Lovely – want a pink background, or how about aqua, or mint -  well, you have full control over the RGB background with values 0-255 for each colour. It occurred to me that this really transforms the otherwise boring LCD display as you can use colour to indicate alerts etc.  For example on a thermostat display you could use orange for on, green for “reached set temperature” and blue for standby.

tmp52FBAnyway, as the WIO modules are little more than an ESP12 I thought it might be more useful to incorporate a driver for this display into my own ESP8266 code. Those of you familiar with the home control project will know that I keep updating the code for the Home Control 2016 project. So – I took a look at the Grove driver for this display – sadly it is in Arduino C++ format so I ended up doing quite a bit of changing to make it do what I wanted and in C – but ultimately it is in there and works a treat. Here are the new commands you can fire out in MQTT to the board with the new software on, using as usual GPIO4 and 5 for I2c.

{rgb_lcd_setup}

{rgb-lcd_clear}

{rgb_lcd_cursor:X,Y}

{rgb_lcd_background:RED,GREEN,BLUE}  // values 0-255 in each case

{rgb_lcd_write:”Your text”}

And that’s all there is to it. A nice addition to the code. I could add more if needed but I figured this minimal set of commands will do for most purposes.

I’m sure there will be other, compatible boards out there – if you know of them – do let us know.

So on the subject of the Seeed WIO boards, I’ve made a separate blog to follow on that – turns out that if you want to have a play, you can blow their code into an ESP-12 – but read the article coming soon.

Facebooktwittergoogle_pluspinterestlinkedin

Leave a Reply

Your email address will not be published. Required fields are marked *