1.8k
In this example we connected an Arduino LCD shield to our Chipkit UNO and displayed some basic text.
here is a typical example of this shield, its a low cost 16 x 2 LCD and is good for many projects, from the picture you can see it also has five buttons which can also be useful for navigating through menus
Code
This basic example will simply display hello world and do some counting
[codesyntax lang=”cpp”]
#include <LiquidCrystal.h> // initialize the library with the numbers of the interface pins LiquidCrystal lcd(8, 9, 4, 5, 6, 7); void setup() { // set up the LCD's number of columns and rows: lcd.begin(16, 2); // Print a message to the LCD. lcd.print("hello world!"); } void loop() { // set the cursor to column 0, line 1 lcd.setCursor(0, 1); // print the number of seconds lcd.print(millis()/1000); }
[/codesyntax]