wifi_mqtt_hcsr04_lcd1602_i2c
Diff: LiquidCrystal_I2C.cpp
- Revision:
- 1:e045394f109e
- Parent:
- 0:824096cc05af
diff -r 824096cc05af -r e045394f109e LiquidCrystal_I2C.cpp --- a/LiquidCrystal_I2C.cpp Fri May 19 18:21:24 2017 +0000 +++ b/LiquidCrystal_I2C.cpp Thu Jan 20 09:26:21 2022 +0000 @@ -21,7 +21,7 @@ // LiquidCrystal constructor is called). -I2C _i2c(PB_11, PB_10); // SDA, SCL +I2C _i2c(D14, D15); // SDA, SCL LiquidCrystal_I2C::LiquidCrystal_I2C(unsigned char lcd_addr, unsigned char lcd_cols, unsigned char lcd_rows, unsigned char charsize) { @@ -48,11 +48,13 @@ // SEE PAGE 45/46 FOR INITIALIZATION SPECIFICATION! // according to datasheet, we need at least 40ms after power rises above 2.7V // before sending commands. Arduino can turn on way befer 4.5V so we'll wait 50 - wait_ms(50); + // wait_ms(50); + wait_us(50000); // Now we pull both RS and R/W low to begin commands expanderWrite(_backlightval); // reset expanderand turn backlight off (Bit 8 =1) - wait_ms(1000); + // wait_ms(1000); + wait_us(10000); //put the LCD into 4 bit mode // this is according to the hitachi HD44780 datasheet