#include <SoftwareSerial.h>
#include <LiquidCrystal_I2C.h>
#include <Wire.h>
#define Display 10
LiquidCrystal_I2C lcd(0x27, 2, 1, 0, 4, 5, 6, 7, 3, POSITIVE);
SoftwareSerial Bluetooth (3, 4); //Setting 3 and 4 as TX & RX
char Incoming_value = 0;
void setup()
{
//lcd.begin(16, 2)
Serial.begin(9600);
Bluetooth.begin(9600);
pinMode(10, OUTPUT); //Display
}
void loop()
{
if (Bluetooth.available() > 0)
{
Incoming_value = Bluetooth.read();
if (Incoming_value == '1')
{
digitalWrite(10, HIGH);
}
else if (Incoming_value == '0')
{
digitalWrite(10, LOW);
}
}
}
Dear mates, when I tried to run the above code where lcd.begin(16,2) is included, the bluetooth is not responding; therefore no code is executed.
But when I remove lcd.begin(16,2), the bluetooth works fine and able to power up and power down the LCD. The problem is I will have a blank display on the LCD; just power up but empty.
I’m using Arduino Uno, HC-05, LCD with I2C.
Thank you.