Hello guys!
I have an 16x2 lcd whit i2c adaptor.
In 1-2 day after arrived working corrently.
I check wiring s correct.
But now the lcd,not work correct.
So i don't know wahts the problem
PLZ! help i need this modul for my project!
Oh, this is my code:
#include <Wire.h>
#include <LCD.h>
#include <LiquidCrystal_I2C.h> // F Malpartida's NewLiquidCrystal library
#define I2C_ADDR 0x27 // Define I2C Address for controller
#define En_pin 2
#define Rw_pin 1
#define Rs_pin 0
#define D4_pin 4
#define D5_pin 5
#define D6_pin 6
#define D7_pin 7
#define BACKLIGHT 3
LiquidCrystal_I2C lcd(I2C_ADDR, En_pin, Rw_pin, Rs_pin, D4_pin, D5_pin, D6_pin, D7_pin);
byte batt1[8] = {
0b01110,
0b11011,
0b10001,
0b10001,
0b10001,
0b10001,
0b10001,
0b11111
};
byte batt2[8] = {
0b01110,
0b11011,
0b10001,
0b10001,
0b10001,
0b10001,
0b11111,
0b11111
};
byte batt3[8] = {
0b01110,
0b11011,
0b10001,
0b10001,
0b10001,
0b11111,
0b11111,
0b11111
};
byte batt4[8] = {
0b01110,
0b11011,
0b10001,
0b10001,
0b11111,
0b11111,
0b11111,
0b11111
};
byte batt5[8] = {
0b01110,
0b11011,
0b10001,
0b11111,
0b11111,
0b11111,
0b11111,
0b11111
};
byte batt6[8] = {
0b01110,
0b11111,
0b11111,
0b11111,
0b11111,
0b11111,
0b11111,
0b11111
};
byte gsm[8] = {
0b00000,
0b00000,
0b00000,
0b00001,
0b00011,
0b00111,
0b01111,
0b11111
};
byte down[8] = {
0b00000,
0b00000,
0b00000,
0b11111,
0b01110,
0b00100,
0b00000,
0b00000
};
byte up[8] = {
0b00000,
0b00000,
0b00000,
0b00100,
0b01110,
0b11111,
0b00000,
0b00000
};
byte ctlogo1[8] = {
0b00000,
0b01110,
0b11110,
0b11000,
0b11000,
0b11110,
0b01110,
0b00000
};
byte ctlogo2[8] = {
0b00000,
0b11111,
0b11111,
0b01110,
0b01110,
0b01110,
0b01110,
0b00000
};
byte sim1[8] = {
0b00000,
0b00000,
0b00000,
0b11111,
0b11111,
0b00000,
0b00000,
0b00000
};
void setup()
{
lcd.begin (20, 4); // initialize the lcd
// Switch on the backlight
lcd.setBacklightPin(BACKLIGHT, POSITIVE);
lcd.setBacklight(HIGH);
lcd.createChar(10, batt1);
lcd.createChar(1, batt2);
lcd.createChar(2, batt3);
lcd.createChar(3, batt4);
lcd.createChar(4, batt5);
lcd.createChar(5, batt6);
lcd.createChar(6, gsm);
lcd.createChar(7, down);
lcd.createChar(8, up);
lcd.createChar(9, ctlogo1);
lcd.createChar(10, ctlogo2);
lcd.createChar(11, sim1);
}
void loop()
{
lcd.setCursor(4, 1);
lcd.print("Security");
lcd.setCursor(2, 1);
lcd.print(char(7));
lcd.setCursor(13, 1);
lcd.print(char(8));
lcd.setCursor(6, 0);
lcd.print(char(9));
lcd.setCursor(7, 0);
lcd.print(char(10));
lcd.setCursor(8, 0);
lcd.print("OS");
lcd.setCursor(10, 0);
lcd.print(char(11));
lcd.setCursor(11, 0);
lcd.print(char(11));
lcd.setCursor(12, 0);
lcd.print(char(11));
lcd.setCursor(13, 0);
lcd.print(char(11));
}
Anyone know whats the problem reply!