Playing with Grove - LCD Displays

in #arduino7 years ago (edited)

Grove i2c LCD Grove i2c LCD

Recently I have come around to really enjoy the Grove sensors and displays from Seeed. They are so convenient!

Grove uses a 4-pin cable to make attaching and removing the addons crazy simple. You can't even plug them in the wrong way!

You don't have to worry about voltages, and they each have Arduino libraries. Unfortunately, right now I have found the ESP8266 support spotty. Will keep working with it.

Now, you don't HAVE to use Arduino. I also have a Raspberry Pi board to try out.

Grove I2C LCD Displays

Today I wanted to share the two LCD displays that I have been testing.

The one pictured above is a straight graphical display. It comes with a nifty tool allowing you to convert a bitmap into C code. Of course, I had to convert my logo :)

If you only have a line or two of text, this RGB backlit display is lovely.

Seen here displaying Hello World along with a randomly coloured background.

Code

 // libraries for i2c and the specific display
#include <Wire.h>
#include "rgb_lcd.h"

rgb_lcd lcd;

void setup() {

    // make sure the random is random
    randomSeed(analogRead(0));
    
    // set up the LCD's number of columns and rows:
    lcd.begin(16, 2);
    
    // Print our message to the LCD.
    lcd.print("hello, world!");
}

void loop() {
  
    // Turn off the display:
    lcd.noDisplay();
    delay(500);
  
    // Turn on the display:
    lcd.display();

    // Random colours
    int colorR = random(255);
    int colorG = random(255);
    int colorB = random(255);

    lcd.setRGB(colorR, colorG, colorB);
    delay(500);
}
Sort:  

Happy to finally see some tech related posting, I might just start posting myself instead of always reading.

Very good your Makernical information.
Thanks for sharing
@makerhacks

Coin Marketplace

STEEM 0.18
TRX 0.16
JST 0.029
BTC 63441.26
ETH 2477.91
USDT 1.00
SBD 2.64