Created
August 5, 2018 17:43
-
-
Save TiMladenov/659309ab33d7dbb9e8795b00c7120018 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Demonstration sketch for Adafruit i2c/SPI LCD backpack | |
using MCP23008 I2C expander | |
( http://www.ladyada.net/products/i2cspilcdbackpack/index.html ) | |
This sketch prints "Hello World!" to the LCD | |
and shows the time. | |
The circuit: | |
* 5V to Arduino 5V pin | |
* GND to Arduino GND pin | |
* CLK to Analog #5 | |
* DAT to Analog #4 | |
*/ | |
// include the library code: | |
#include "Wire.h" | |
#include "Adafruit_LiquidCrystal.h" | |
// Connect via i2c, default address #0 (A0-A2 not jumpered) | |
Adafruit_LiquidCrystal lcd(0x27); | |
void setup() { | |
// set up the LCD's number of rows and columns: | |
lcd.begin(16, 2); | |
// Print a message to the LCD. | |
lcd.print("hello, world!"); | |
} | |
void loop() { | |
delay(3000); | |
lcd.clear(); | |
lcd.print("Hi, there!"); | |
delay(3000); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment