Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
B basis
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Incidents
    • Environments
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • m242
  • basis
  • Wiki
  • lcd

Last edited by Stephan Metzler Mar 12, 2019
Page history

lcd

k-lcd

Ausgangslage

  • LCD RGB Backlight Display
    • RGB Backlight
    • I2C communication
    • Built-in English fonts
    • 16x2 LCD

Bedingungen

  • Scoring
    • Spielresultate darstellen
    • Ereignisse zeigen
    • Annimation

Aufbau

  • Seeeduino V4.2
    • als Arduino UNO programmieren
  • Input
    • Wii Nunchuck - I2C Two-Wire Peripheral Interface
    • TTP223 capactitive touch sensor D2
  • Output
    • LCD RGB Backlight - I2C Two-Wire Peripheral Interface
    • Led - D8

Handlungsziele

Vorgehen Hannok Handlungsnotwendige Kenntnisse
Kommunikation I2C Two-Wire Peripheral Interface
Datentypen / Farbkombinationen HEX / RGB
schnelle Reaktion auf Ereignis Interrupt, volatile
Testbarkeit Loggen, ASSERT

Code Sample

#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);
}

Grove - LCD RGB Backlight

Grove - LCD RGB Backlight

Done with the tedious mono color backlight? This Grove - LCD RBG Backlight enables you to set the color to whatever you like via the simple and concise Grove interface. It takes I2C as the communication method with your microcontroller. The number of pins required for data exchange and backlight control shrinks from ~10 to 2, relieving IOs for other challenging tasks. In addition, Grove - LCD RGB Backlight supports user-defined characters. Want to get a love heart or another custom character? Just take advantage of this feature and design it!

Usage:

This is an Arudino Library. It include a .h file, a .cpp file and some examples. Through these examples, you can quickly master the use of Grove - LCD RGB Backlight.

The in the following, we will introduce some functions which are used very intuitively.

Initialization

Before we use this lcd, we should initialize it. You can use this function:

lcd.begin(16, 2);

This means that this lcd has 16 columns and 2 rows.

Change Color of Backlight

One of Grove - LCD RGB Backlight's most important feature is changing the backlight color. It's very simple; just use the folowing function:

void setRGB(int r, int g, int b);

Clear Display

You can clear the display by this function:

void clear();

Turn on and turn off display

void noDisplay();			// turn off display
void display();				// turn on display

Blink

void noBlink();
void blink();

Cursor

void noCursor();
void cursor();

Blink LED Backlight

void noBlinkLED();
void blinkLED();

For more information, please refer to wiki page.


This software is written by loovee(luweicong@seeedstudio.com) for seeed studio
and is licensed under The MIT License. Check License.txt for more information.

Contributing to this software is warmly welcomed. You can do this basically by
forking, committing modifications and then pulling requests (follow the links above
for operating guide). Adding change log and your contact into file header is encouraged.
Thanks for your contribution.

Seeed Studio is an open hardware facilitation company based in Shenzhen, China.
Benefiting from local manufacture power and convenient global logistic system,
we integrate resources to serve new era of innovation. Seeed also works with
global distributors and partners to push open hardware movement.

Analytics

Clone repository

Home


1. und 2. Tag

Workshops

  • LCD
  • Led Bar
  • Led Ring
  • Led Stick
  • RFID
  • Speaker
  • WiFi

3. bis 5. Tag

Projekt


Utils

Nunchuck

Interrrupt

Testen


Bewertunsraster