Examples - Electronic Bricks - Electronic Brick LCDisplay

Serial LCD Display -

This program gives you a basic understanding of using the serial LCD Brick.

Hardware Setup:

Connect push button to pin 9
Connect LCD display to 4 wire UART pin

LCD Commands:

1. GO cursor
2. PRINT displayed in the current string cursor position
3. CLEAR clear screen
4. HOME upper left corner of the screen to move the cursor back to the initial position
5. CURSOR cursor result set, the first parameter to indicate the cursor (1 and 0), the second parameter is blinking (1 and 0)

int switchPin = 9;
int value = 0;

void setup() {
        pinMode(switchPin, INPUT);

void loop() {
        if (HIGH == digitalRead(switchPin)){
                Serial.print("$CLEAR\r\n");   //clears screen
                Serial.print("$GO 1 1\r\n");   //sets cursor
                Serial.print("$PRINT EmbeddedLab \r\n");   //writes "EmbeddLab"
                Serial.print("$GO 2 4\r\n");  //resets cursor
                Serial.print("$PRINT ETH Zurich \r\n");   //writes "ETH Zurich"
                Serial.print("$CURSOR 1 1\r\n");  //sets cursor parameters