Home ChipkitChipkit code chipKit Uno32 and Arduino LCD shield example

chipKit Uno32 and Arduino LCD shield example

In this example I connected a Sainsmart LCD shield to the ChipKIT uno32, this is a common shield featuring a 16×2 LCD and 6 push button switches. In this example we will simply display hello world and count in seconds on the LCD

chipkit and lcd shield

chipkit and lcd shield

Code

 

[codesyntax lang=”cpp”]

// include the library code:
#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]

 

Links

 


2.5 inch LCD Keypad Shield for Arduino Compatible Duemilanove and LCD Blue Backlight and White Text – $6.34

2.5 inch LCD Keypad Shield for Arduino Compatible Duemilanove and LCD Blue Backlight and White Text

You may also like