Compare commits
No commits in common. "master" and "1.1.3" have entirely different histories.
@ -52,11 +52,6 @@ LiquidCrystal_I2C::LiquidCrystal_I2C(uint8_t lcd_Addr,uint8_t lcd_cols,uint8_t l
|
|||||||
_backlightval = LCD_NOBACKLIGHT;
|
_backlightval = LCD_NOBACKLIGHT;
|
||||||
}
|
}
|
||||||
|
|
||||||
void LiquidCrystal_I2C::oled_init(){
|
|
||||||
_oled = true;
|
|
||||||
init_priv();
|
|
||||||
}
|
|
||||||
|
|
||||||
void LiquidCrystal_I2C::init(){
|
void LiquidCrystal_I2C::init(){
|
||||||
init_priv();
|
init_priv();
|
||||||
}
|
}
|
||||||
@ -132,7 +127,6 @@ void LiquidCrystal_I2C::begin(uint8_t cols, uint8_t lines, uint8_t dotsize) {
|
|||||||
void LiquidCrystal_I2C::clear(){
|
void LiquidCrystal_I2C::clear(){
|
||||||
command(LCD_CLEARDISPLAY);// clear display, set cursor position to zero
|
command(LCD_CLEARDISPLAY);// clear display, set cursor position to zero
|
||||||
delayMicroseconds(2000); // this command takes a long time!
|
delayMicroseconds(2000); // this command takes a long time!
|
||||||
if (_oled) setCursor(0,0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void LiquidCrystal_I2C::home(){
|
void LiquidCrystal_I2C::home(){
|
||||||
@ -220,15 +214,6 @@ void LiquidCrystal_I2C::createChar(uint8_t location, uint8_t charmap[]) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//createChar with PROGMEM input
|
|
||||||
void LiquidCrystal_I2C::createChar(uint8_t location, const char *charmap) {
|
|
||||||
location &= 0x7; // we only have 8 locations 0-7
|
|
||||||
command(LCD_SETCGRAMADDR | (location << 3));
|
|
||||||
for (int i=0; i<8; i++) {
|
|
||||||
write(pgm_read_byte_near(charmap++));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Turn the (optional) backlight off/on
|
// Turn the (optional) backlight off/on
|
||||||
void LiquidCrystal_I2C::noBacklight(void) {
|
void LiquidCrystal_I2C::noBacklight(void) {
|
||||||
_backlightval=LCD_NOBACKLIGHT;
|
_backlightval=LCD_NOBACKLIGHT;
|
||||||
@ -317,8 +302,6 @@ void LiquidCrystal_I2C::printstr(const char c[]){
|
|||||||
|
|
||||||
|
|
||||||
// unsupported API functions
|
// unsupported API functions
|
||||||
#pragma GCC diagnostic push
|
|
||||||
#pragma GCC diagnostic ignored "-Wunused-parameter"
|
|
||||||
void LiquidCrystal_I2C::off(){}
|
void LiquidCrystal_I2C::off(){}
|
||||||
void LiquidCrystal_I2C::on(){}
|
void LiquidCrystal_I2C::on(){}
|
||||||
void LiquidCrystal_I2C::setDelay (int cmdDelay,int charDelay) {}
|
void LiquidCrystal_I2C::setDelay (int cmdDelay,int charDelay) {}
|
||||||
@ -328,5 +311,5 @@ uint8_t LiquidCrystal_I2C::init_bargraph(uint8_t graphtype){return 0;}
|
|||||||
void LiquidCrystal_I2C::draw_horizontal_graph(uint8_t row, uint8_t column, uint8_t len, uint8_t pixel_col_end){}
|
void LiquidCrystal_I2C::draw_horizontal_graph(uint8_t row, uint8_t column, uint8_t len, uint8_t pixel_col_end){}
|
||||||
void LiquidCrystal_I2C::draw_vertical_graph(uint8_t row, uint8_t column, uint8_t len, uint8_t pixel_row_end){}
|
void LiquidCrystal_I2C::draw_vertical_graph(uint8_t row, uint8_t column, uint8_t len, uint8_t pixel_row_end){}
|
||||||
void LiquidCrystal_I2C::setContrast(uint8_t new_val){}
|
void LiquidCrystal_I2C::setContrast(uint8_t new_val){}
|
||||||
#pragma GCC diagnostic pop
|
|
||||||
|
|
||||||
|
@ -77,18 +77,14 @@ public:
|
|||||||
void autoscroll();
|
void autoscroll();
|
||||||
void noAutoscroll();
|
void noAutoscroll();
|
||||||
void createChar(uint8_t, uint8_t[]);
|
void createChar(uint8_t, uint8_t[]);
|
||||||
void createChar(uint8_t location, const char *charmap);
|
|
||||||
// Example: const char bell[8] PROGMEM = {B00100,B01110,B01110,B01110,B11111,B00000,B00100,B00000};
|
|
||||||
|
|
||||||
void setCursor(uint8_t, uint8_t);
|
void setCursor(uint8_t, uint8_t);
|
||||||
#if defined(ARDUINO) && ARDUINO >= 100
|
#if defined(ARDUINO) && ARDUINO >= 100
|
||||||
virtual size_t write(uint8_t);
|
virtual size_t write(uint8_t);
|
||||||
#else
|
#else
|
||||||
virtual void write(uint8_t);
|
virtual void write(uint8_t);
|
||||||
#endif
|
#endif
|
||||||
void command(uint8_t);
|
void command(uint8_t);
|
||||||
void init();
|
void init();
|
||||||
void oled_init();
|
|
||||||
|
|
||||||
////compatibility API function aliases
|
////compatibility API function aliases
|
||||||
void blink_on(); // alias for blink()
|
void blink_on(); // alias for blink()
|
||||||
@ -122,7 +118,6 @@ private:
|
|||||||
uint8_t _displaycontrol;
|
uint8_t _displaycontrol;
|
||||||
uint8_t _displaymode;
|
uint8_t _displaymode;
|
||||||
uint8_t _numlines;
|
uint8_t _numlines;
|
||||||
bool _oled = false;
|
|
||||||
uint8_t _cols;
|
uint8_t _cols;
|
||||||
uint8_t _rows;
|
uint8_t _rows;
|
||||||
uint8_t _backlightval;
|
uint8_t _backlightval;
|
||||||
|
BIN
LiquidCrystal_I2C.o
Normal file
BIN
LiquidCrystal_I2C.o
Normal file
Binary file not shown.
@ -1,6 +1,2 @@
|
|||||||
# LiquidCrystal_I2C
|
# LiquidCrystal_I2C
|
||||||
|
LiquidCrystal Arduino library for the DFRobot I2C LCD displays
|
||||||
LiquidCrystal Arduino library for I2C LCD displays
|
|
||||||
|
|
||||||
**Status: Archived**
|
|
||||||
This repository has been transfered to GitLab at https://gitlab.com/tandembyte/LCD_I2C
|
|
||||||
|
@ -52,7 +52,7 @@ void displayKeyCodes(void) {
|
|||||||
while (1) {
|
while (1) {
|
||||||
lcd.clear();
|
lcd.clear();
|
||||||
lcd.print("Codes 0x"); lcd.print(i, HEX);
|
lcd.print("Codes 0x"); lcd.print(i, HEX);
|
||||||
lcd.print("-0x"); lcd.print(i+15, HEX);
|
lcd.print("-0x"); lcd.print(i+16, HEX);
|
||||||
lcd.setCursor(0, 1);
|
lcd.setCursor(0, 1);
|
||||||
for (int j=0; j<16; j++) {
|
for (int j=0; j<16; j++) {
|
||||||
lcd.printByte(i+j);
|
lcd.printByte(i+j);
|
||||||
@ -67,4 +67,4 @@ void loop()
|
|||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
//YWROBOT
|
//YWROBOT
|
||||||
//Compatible with the Arduino IDE 1.0
|
//Compatible with the Arduino IDE 1.0
|
||||||
//Library version:1.1
|
//Library version:1.1
|
||||||
|
#include <Wire.h>
|
||||||
#include <LiquidCrystal_I2C.h>
|
#include <LiquidCrystal_I2C.h>
|
||||||
|
|
||||||
LiquidCrystal_I2C lcd(0x27,20,4); // set the LCD address to 0x27 for a 16 chars and 2 line display
|
LiquidCrystal_I2C lcd(0x27,20,4); // set the LCD address to 0x27 for a 16 chars and 2 line display
|
||||||
@ -8,6 +9,7 @@ LiquidCrystal_I2C lcd(0x27,20,4); // set the LCD address to 0x27 for a 16 chars
|
|||||||
void setup()
|
void setup()
|
||||||
{
|
{
|
||||||
lcd.init(); // initialize the lcd
|
lcd.init(); // initialize the lcd
|
||||||
|
lcd.init();
|
||||||
// Print a message to the LCD.
|
// Print a message to the LCD.
|
||||||
lcd.backlight();
|
lcd.backlight();
|
||||||
lcd.setCursor(3,0);
|
lcd.setCursor(3,0);
|
||||||
|
@ -10,7 +10,6 @@
|
|||||||
"frameworks": "arduino",
|
"frameworks": "arduino",
|
||||||
"platforms":
|
"platforms":
|
||||||
[
|
[
|
||||||
"atmelavr",
|
"atmelavr"
|
||||||
"espressif8266"
|
|
||||||
]
|
]
|
||||||
}
|
}
|
@ -1,5 +1,5 @@
|
|||||||
name=LiquidCrystal_I2C
|
name=LiquidCrystal_I2C
|
||||||
version=1.1.4
|
version=1.1.2
|
||||||
author=Frank de Brabander
|
author=Frank de Brabander
|
||||||
maintainer=Marco Schwartz <marcolivier.schwartz@gmail.com>
|
maintainer=Marco Schwartz <marcolivier.schwartz@gmail.com>
|
||||||
sentence=A library for I2C LCD displays.
|
sentence=A library for I2C LCD displays.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user