Is there any TextLCD library working on mbed-os6 in MBED Studio?

Hello,

I tried it on the Nucleo-F303K8 with the MbedOS 6.5.0 - bare metal
I already wrote about it in this post.
For an I2C expander you need to set correct one in TextLCD_Config.h. The content about it starting at line 66.

Example:

#include "mbed.h"
#include "TextLCD.h"

DigitalOut led(LED1);
I2C i2cBus(I2C_SDA, I2C_SCL);
TextLCD_I2C lcd(&i2cBus, PCF8574A_SA7, TextLCD::LCD16x2); // PCF8574A_SA7 is gpio expander i2c address from a macro what is defined in TextLCD_Config.h

int main(){
    printf("LCD Hello\n");
    lcd.cls();
    lcd.setBacklight(TextLCD::LightOn);
    lcd.printf("LCD Hello\n");

    while(1) {
        thread_sleep_for(500);
        led = !led;
    }
}

BR, Jan

1 Like