Last active
May 30, 2019 14:32
-
-
Save mAPBhlJ/b8172f6966d9f6e5356313646fef156f 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
/* YourDuino.com Example Software Sketch | |
16 character 2 line I2C Display | |
Backpack Interface labelled "YwRobot Arduino LCM1602 IIC V1" | |
terry@yourduino.com */ | |
// Copied from tkkrlab | |
/*-----( Import needed libraries )-----*/ | |
#include <Wire.h> // Comes with Arduino IDE | |
// Get the LCD I2C Library here: | |
// https://bitbucket.org/fmalpartida/new-liquidcrystal/downloads | |
// Move any other LCD libraries to another folder or delete them | |
// See Library "Docs" folder for possible commands etc. | |
#include <LiquidCrystal_I2C.h> | |
/*-----( Declare Constants )-----*/ | |
/*-----( Declare objects )-----*/ | |
// set the LCD address to 0x27 for a 20 chars 4 line display | |
// Set the pins on the I2C chip used for LCD connections: | |
// addr, en,rw,rs,d4,d5,d6,d7,bl,blpol | |
LiquidCrystal_I2C lcd(0x27, 2, 1, 0, 4, 5, 6, 7, 3, POSITIVE); // Set the LCD I2C address | |
void setup(){ | |
lcd.begin(16,2); | |
lcd.backlight(); | |
lcd.setCursor(0, 0); | |
lcd.print("Hello World"); | |
} | |
void loop(){ | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Saving this for later use, for some reason a lot of libraries are broken.
Had to download LiquidCrystal_V1.2.1 and change "I2CIO.cpp" to
#include <Wire.h>
instead of <../Wire/Wire.h>