Published © LGPL

Grove Starter Kit For Arduino --- RGB LCD

Teaches you how to use the LCD display in the Arduino Grove Starter Kit.

BeginnerProtip30 minutes11,454
Grove Starter Kit For Arduino --- RGB LCD

Things used in this project

Hardware components

Arduino 101
Arduino 101
×1
Seeed Studio grove starter kit Arduino 101
×1

Software apps and online services

Arduino IDE
Arduino IDE

Story

Read more

Schematics

LCD connection

just plug it into any I2C ports

Code

Hello World Code

Arduino
/*
  Hello World.ino
  2013 Copyright (c) Seeed Technology Inc.  All right reserved.

  Author:Loovee
  2013-9-18

  Grove - Serial LCD RGB Backlight demo.

  This library is free software; you can redistribute it and/or
  modify it under the terms of the GNU Lesser General Public
  License as published by the Free Software Foundation; either
  version 2.1 of the License, or (at your option) any later version.

  This library is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  Lesser General Public License for more details.

  You should have received a copy of the GNU Lesser General Public
  License along with this library; if not, write to the Free Software
  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
*/

#include <Wire.h>
#include "rgb_lcd.h"

rgb_lcd lcd;

const int colorR = 255;
const int colorG = 0;
const int colorB = 0;

void setup() 
{
    // set up the LCD's number of columns and rows:
    lcd.begin(16, 2);
    
    lcd.setRGB(colorR, colorG, colorB);
    
    // Print a message to the LCD.
    lcd.print("hello, world!");

    delay(1000);
}

void loop() 
{
    // set the cursor to column 0, line 1
    // (note: line 1 is the second row, since counting begins with 0):
    lcd.setCursor(0, 1);
    // print the number of seconds since reset:
    lcd.print(millis()/1000);

    delay(100);
}

KeyWords

Arduino
#######################################
# Syntax Coloring Map For Grove - Serial LCD GRB BackLight
#######################################

#######################################
# Datatypes (KEYWORD1)
#######################################
rgb_lcd	KEYWORD1
lcd	KEYWORD1

#######################################
# Methods and Functions (KEYWORD2)
#######################################
begin	KEYWORD2
clear	KEYWORD2
home	KEYWORD2
display	KEYWORD2
noBlink	KEYWORD2
blink	KEYWORD2
noCursor	KEYWORD2
cursor	KEYWORD2
scrollDisplayLeft	KEYWORD2
scrollDisplayRight	KEYWORD2
leftToRight	KEYWORD2
rightToLeft	KEYWORD2
autoscroll	KEYWORD2
noAutoscroll	KEYWORD2
createChar	KEYWORD2
write	KEYWORD2
command	KEYWORD2
setRGB	KEYWORD2
setPWM	KEYWORD2
setColor	KEYWORD2
setColorWhite	KEYWORD2


#######################################
# Constants (LITERAL1)
#######################################
I2C_ADDRESS LITERAL1

Credits

Thanks to loovee.

Comments