Mbed libraries not working

Trying to use mbed libraries and getting errors like Unknown type name ‘Serial’ why is this happening and how can I fix?

Hi,
and what version of Mbed library you use?
BR, Jan

mbed-os 6.0.0

That is the reason.
The serial API is not available any more in the MbedOS6. For the future, you need to use one of these APIs BufferedSerial or UnbufferedSerial. You need to read description and select correct one what correspond with your specification.

MbedOS6 APIs list (at the end you can find a list of all deprecated APIs)

BR, Jan

2 Likes

Thank you