Arm Mbed OS support forum

Is there any TextLCD program directly work on mbed studio(mbed-os 6.6 )


Is there any TextLCD program directly work on mbed studio(mbed-os 6.6 ) ?

I meet some problem for use textlcd on mbed studio , as following:

I used the a textlcd2
program on online complier,
It is successful , and worked well on my NUCLEO L476RG board.

I want to try it on offline mbed studio. however, error occur:
" TextLCD_HelloWorld2_test uses Mbed OS 2, which is not supported in Mbed Studio.
To use this program, migrate it to Mbed OS 5 or 6 and optionally use the bare metal profile "

and a link of
appears to migirate to mbed-os 5,
seems need a hard work to immigrate the code . I have to study the detail,
however, for mbed Studio, my mbed-os lib is 6.6.0.
I don’t know if it work.


This library is old and it is not maintained by its original owner.

However Kenji Aray updated it for MbedOS6. I use this TextLCD under the Mbed Studio, MbedOS6.5 bare metal and Nucleo-F303K8.

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

DigitalOut led(LED1);
I2C i2cBus(I2C_SDA, I2C_SCL);
TextLCD_I2C lcd(&i2cBus, PCF8574_SA7, TextLCD::LCD20x4);

int main(){
    printf("LCD test\n");
    lcd.printf("LCD hello\n");


    while(1) {
        led = !led;

Is there any TextLCD library working on mbed-os6 in MBED Studio? - Mbed OS - Arm Mbed OS support forum

BR, Jan

1 Like

I wrote a simple LCD library, you will find it on GitHub - sstaub/mbedLCD: LCD HD44780 library for Mbed 6
I2C is in progress, but it will need some time.

I’m not the OP, but I wanted to thank Jan and Stefan for helping out with this.

One of the total nightmares for me, as a relative newbie to mBed, is finding where all these incredibly useful libraries are. And why is there nothing explaining that the original library used by the OP is no longer valid or supported?

mBed desperately needs to sort this mess out! We shouldn’t have to rely on heroes like Jan and Stefan for guiding us through this minefield.

I started with mbed 2 many years ago and it was quit easy, with mbed 5 I stopped.
So I restart with mbed 6, and yes there are so many things missing.
I have many libraries to port from mbed 2 to mbed 6, it is a mess.