Created
July 30, 2019 01:03
-
-
Save futureshocked/b5ef95308362d63169637a2d8d7b7ece to your computer and use it in GitHub Desktop.
This sketch demonstrates how to use the Grove LCD RGB Backlight module.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* 06.10 - Grove LCD RGB Backlight module Hello World | |
| * | |
| This sketch demonstrates how to use the Grove LCD RGB Backlight module. | |
| It will print a welcome message and start a counter, with a red backlight. | |
| Components | |
| ---------- | |
| - Grove Base Shield | |
| - An Arduino Uno compatible board (such as Arduino/Genuino Uno or Seeeduino) | |
| - Grove LCD RGB Backlight module | |
| - One Grove cable | |
| IDE | |
| --- | |
| Arduino IDE | |
| Libraries | |
| --------- | |
| - Wire.h (part of the Arduino IDE) | |
| - rgb_lcd.h (Get it from https://github.com/Seeed-Studio/Grove_LCD_RGB_Backlight) | |
| Connections | |
| ----------- | |
| Use a Grove cable to connect the module to Base Shield connector D3. | |
| Other information | |
| ----------------- | |
| - Use this sketch along side the video lecture 06.12 of Grove For Busy People | |
| - Grove documentation: http://wiki.seeedstudio.com/Grove-LCD_RGB_Backlight/ | |
| - Grove component: https://txplo.re/0c9fb | |
| Github Gist | |
| ----------- | |
| <script src="https://gist.github.com/futureshocked/b5ef95308362d63169637a2d8d7b7ece.js"></script> | |
| https://gist.github.com/futureshocked/b5ef95308362d63169637a2d8d7b7ece | |
| For course information, please go to https://techexplorations.com/product/grove-for-busy-people/ | |
| Created on July 5 2019 by Peter Dalmaris | |
| */ | |
| /* | |
| 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 = 150; | |
| const int colorG = 155; | |
| const int colorB = 100; | |
| 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(6, 1); | |
| // print the number of seconds since reset: | |
| lcd.print(millis()/1000); | |
| delay(100); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment