Hi here i used I2C using LCD Display(Nucleo-F746ZG) the Display unit Details LCD RG1602A and I2C IC - PCF8574T, i was taken from header file is this link-TextLCD/README.md at main · mbed-ce-libraries-examples/TextLCD · GitHub.
below i have attached my code
//-------------------------------------Display Unit for Bottling------------------------------------------------------------------------------
DigitalOut led(PF_7);
I2C i2cBus(PB_9,PB_8);
TextLCD_I2C lcd(&i2cBus, PCF8574A_SA7, TextLCD::LCD16x2);//
int main() {
pc.baud(115200);
wait_ms(10);
Ard.baud(115200);
pc.printf("enter the main");
int Ch, Speed, Steps, Dir, Time, Solidflap_Servo_closeee, Micro_Servo_Up,Down, User_Weight, Value;
float temp;
while (1) {
pc.printf("\n\n Select The case :");
scanf("%d", &Ch);
switch (Ch) {
case 27:{
printf("MbedCE_lib_example_TextLCD\r\n");
lcd.cls();
lcd.setMode(TextLCD::DispOn); //DispOff, DispOn
lcd.setBacklight(TextLCD::LightOff);//LightOff, LightOn
lcd.setCursor(TextLCD::CurOff_BlkOff);
lcd.printf("Welcome to\nBottling Setup\n");
while(1) {
led = !led;
wait_ms(3000);
printf("\n inside while loop");
lcd.printf("Welcome to\nBottling Setup\n");
}
}break;
}}}
its show like this one printing not happening