A little curiosity. A whole lot of making.Robotics, CNC & connected ideas
robodatech.
Arduino sample library

LCD 16x2 29

Display local status, menu labels, and sensor values on a parallel LCD.

Open in compiler →
/*
  Roboda verified Arduino sample 0708
  Feature: LCD 16x2
  Generated for online build, classroom practice, and hardware upload testing.
*/

#include <LiquidCrystal.h>

LiquidCrystal lcd(12, 11, 5, 4, 3, 2);

void setup() {
  lcd.begin(16, 2);
  lcd.print("Roboda sample");
}

void loop() {
  lcd.setCursor(0, 1);
  lcd.print("A4=");
  lcd.print(analogRead(A4));
  lcd.print("    ");
  delay(220);
}

How it works

Practice this Arduino feature with a verified Roboda sketch.

  1. Read the constants at the top of the sketch.
  2. Wire the pins exactly as listed in the pin map.
  3. Upload or compile once before changing values.
  4. Change one value at a time and watch Serial Monitor or the output device.

Connections

PinConnect toNote
D12LCD RSParallel 4-bit LCD wiring.
D11LCD EnableKeep wires short for stable classroom demos.
D5, D4, D3, D2LCD data pins D4-D7Order must match LiquidCrystal lcd(12, 11, 5, 4, 3, 2).

Good ideas start here.

Robotics lessons, build notes and useful updates. Subscribe by entering your email.