Compare commits

...

25 Commits

Author SHA1 Message Date
John Rickman
738765e388
Update README.md
Updated new repository url
2020-07-07 12:07:41 -04:00
John Rickman
50ccf1b5e7
Update README.md 2020-07-07 10:55:16 -04:00
John Rickman
56c9bf0de0
Update README.md 2020-07-07 10:54:10 -04:00
John Rickman
c976ad2dc6
Update README.md 2019-04-09 12:20:20 -04:00
John Rickman
2e93eae0a4
Update README.md 2018-12-21 18:50:59 -05:00
marcoschwartz
bf56f0f12b
Update README.md 2018-09-23 18:40:02 +02:00
marcoschwartz
6f5f38d35e
Update README.md 2018-09-23 18:39:24 +02:00
marcoschwartz
5c0be63b8d
Merge pull request #24 from maduperera/master
Removed lcd.init()
2018-03-11 13:39:49 +01:00
madusha perera
ea17a6c521 Removed WIre.h import
This is already has been included in the LiquidCrystal_I2C.h file. This will make the loader to load the same file twice to the microController.
Will give bad practice to novice programmers. :)
2018-03-05 18:58:44 +05:30
madusha perera
db9488aa8d Removed lcd.init()
Redundant code.
Might confuse novice programmers.
:)
2018-03-05 18:32:38 +05:30
marcoschwartz
58ed0d481a
Merge pull request #19 from Pigeo/patch-1
No more irrelevant compiler warnings :-)
2018-02-11 15:46:44 +01:00
marcoschwartz
cd2552708e
Merge pull request #13 from meridani/master
16 to 15
2018-02-11 15:46:19 +01:00
marcoschwartz
4d7e3ee1d3
Merge pull request #21 from cwt137/add-platform
Add platform espressif8266
2018-02-11 15:46:08 +01:00
marcoschwartz
311e58c97d
Merge pull request #23 from mateusz-szafraniec/master
workaround for WEH001602 (WS0010 based) OLED display
2018-02-11 15:45:54 +01:00
Mateusz Szafraniec
ab4234c36c version bump, again 2018-02-06 22:39:39 +01:00
Mateusz Szafraniec
dcbed4653c version bump 2018-02-06 22:34:05 +01:00
Mateusz Szafraniec
88e1a4b9ec not needed 2018-02-06 22:31:59 +01:00
Mateusz Szafraniec
6aa5b8b47a workaround for WEH001602 (WS0010 based) display 2018-01-25 23:28:47 +01:00
Christopher Thomas
f06bbe238e Add platform espressif8266 2017-10-09 19:32:41 -07:00
Pierre-Aurélien Georges
6c677e31d3 No more irrelevant compiler warnings :-)
Added a "#pragma GCC diagnostic push/ignored/pop" around unsupported API functions, to avoid compiler warnings.
2017-08-19 18:23:21 +02:00
Meridani
4e845ba553 16 to 15 2016-06-02 22:54:07 +02:00
marcoschwartz
4bb48bd648 Merge pull request #8 from ortegafernando/master
Now, createChar function can use PROGMEM charmap
2016-03-20 19:19:11 +01:00
ortegafernando
8f29f18fd3 Now, createChar function can use PROGMEM charmap 2016-03-13 22:05:16 +01:00
ortegafernando
072347ee32 Now, createChar function can use PROGMEM charmap 2016-03-13 22:02:46 +01:00
ortegafernando
291335a765 Update LiquidCrystal_I2C.cpp 2016-03-13 22:01:48 +01:00
8 changed files with 35 additions and 10 deletions

View File

@ -52,6 +52,11 @@ LiquidCrystal_I2C::LiquidCrystal_I2C(uint8_t lcd_Addr,uint8_t lcd_cols,uint8_t l
_backlightval = LCD_NOBACKLIGHT;
}
void LiquidCrystal_I2C::oled_init(){
_oled = true;
init_priv();
}
void LiquidCrystal_I2C::init(){
init_priv();
}
@ -127,6 +132,7 @@ void LiquidCrystal_I2C::begin(uint8_t cols, uint8_t lines, uint8_t dotsize) {
void LiquidCrystal_I2C::clear(){
command(LCD_CLEARDISPLAY);// clear display, set cursor position to zero
delayMicroseconds(2000); // this command takes a long time!
if (_oled) setCursor(0,0);
}
void LiquidCrystal_I2C::home(){
@ -214,6 +220,15 @@ 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
void LiquidCrystal_I2C::noBacklight(void) {
_backlightval=LCD_NOBACKLIGHT;
@ -302,6 +317,8 @@ void LiquidCrystal_I2C::printstr(const char c[]){
// unsupported API functions
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wunused-parameter"
void LiquidCrystal_I2C::off(){}
void LiquidCrystal_I2C::on(){}
void LiquidCrystal_I2C::setDelay (int cmdDelay,int charDelay) {}
@ -311,5 +328,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_vertical_graph(uint8_t row, uint8_t column, uint8_t len, uint8_t pixel_row_end){}
void LiquidCrystal_I2C::setContrast(uint8_t new_val){}
#pragma GCC diagnostic pop

View File

@ -77,14 +77,18 @@ public:
void autoscroll();
void noAutoscroll();
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);
#if defined(ARDUINO) && ARDUINO >= 100
#if defined(ARDUINO) && ARDUINO >= 100
virtual size_t write(uint8_t);
#else
virtual void write(uint8_t);
#endif
void command(uint8_t);
void init();
void oled_init();
////compatibility API function aliases
void blink_on(); // alias for blink()
@ -118,6 +122,7 @@ private:
uint8_t _displaycontrol;
uint8_t _displaymode;
uint8_t _numlines;
bool _oled = false;
uint8_t _cols;
uint8_t _rows;
uint8_t _backlightval;

Binary file not shown.

View File

@ -1,2 +1,6 @@
# 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

View File

@ -52,7 +52,7 @@ void displayKeyCodes(void) {
while (1) {
lcd.clear();
lcd.print("Codes 0x"); lcd.print(i, HEX);
lcd.print("-0x"); lcd.print(i+16, HEX);
lcd.print("-0x"); lcd.print(i+15, HEX);
lcd.setCursor(0, 1);
for (int j=0; j<16; j++) {
lcd.printByte(i+j);
@ -67,4 +67,4 @@ void loop()
{
}

View File

@ -1,7 +1,6 @@
//YWROBOT
//Compatible with the Arduino IDE 1.0
//Library version:1.1
#include <Wire.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
@ -9,7 +8,6 @@ LiquidCrystal_I2C lcd(0x27,20,4); // set the LCD address to 0x27 for a 16 chars
void setup()
{
lcd.init(); // initialize the lcd
lcd.init();
// Print a message to the LCD.
lcd.backlight();
lcd.setCursor(3,0);

View File

@ -10,6 +10,7 @@
"frameworks": "arduino",
"platforms":
[
"atmelavr"
"atmelavr",
"espressif8266"
]
}
}

View File

@ -1,5 +1,5 @@
name=LiquidCrystal_I2C
version=1.1.2
version=1.1.4
author=Frank de Brabander
maintainer=Marco Schwartz <marcolivier.schwartz@gmail.com>
sentence=A library for I2C LCD displays.