An Tran
Published © MIT

Particle + Grove LCD RGB Backlight = Realtime Clock

Connect Grove LCD RGB Backlight to Particle using I2C to display time.

BeginnerProtip1 hour3,366
Particle + Grove LCD RGB Backlight = Realtime Clock

Things used in this project

Hardware components

Seeed Studio Grove-LCD RGB Backlight
×1
Photon
Particle Photon
×1
Resistor 4.7 kOhm
×2

Story

Read more

Schematics

SCHEMATICS

Code

Source code

C/C++
#include "Grove_LCD_RGB_Backlight.h"

rgb_lcd lcd;

const int colorR = 200;
const int colorG = 200;
const int colorB = 200;

void setup() {
    // set up the LCD's number of columns and rows:
    lcd.begin(16, 2);

    // Set up background backlight color
    lcd.setRGB(colorR, colorG, colorB);

    lcd.print("hello, world!");

    Time.zone(+2.00);

    delay(1000);
}

void loop() {
    lcd.setCursor(0,0);
    // Format from C library: https://www.gnu.org/software/libc/manual/html_node/Low_002dLevel-Time-String-Parsing.html
    lcd.print(Time.format(Time.now(), "%T"));

    delay(1000);
}

PhotonGroveLCD

Credits

An Tran

An Tran

5 projects • 12 followers
tech, startup, web, mobile, iot, dev

Comments