SimpleBLE library sample code not working

I was trying to run the sample code for the simpleBLE library, but I had the error code:
Error: No matching member function for call to ‘attach’ in “source/main.cpp”, Line: 18, Col: 7

The sample code:

#include "mbed.h"
#include "SimpleBLE.h"
AnalogIn light(A0);
SimpleBLE ble("MY_LIGHT_SENSOR"); // declare SimpleBLE
// create a new characteristic under service 0x8000, char 0x8001
SimpleChar<uint16_t> lightValue = ble.readOnly_u16(0x8000, 0x8001);
// now treat lightValue like any other variable
void read() {
    lightValue = light.read_u16();
int main(int, char**) {
    Ticker t;
    t.attach(&read, 1.0f); // read new value every second
    while (1) { ble.waitForEvent(); }

Hi there,

I see nothing wrong in that piece of code, but how you can see, the library was made in 2016 (latest update 2018), so it is old one and then it can depend what Mbed library or its version you are using right now.
This library seems to be for Mbed2 and latest one is for MbebOS5.

Usually is good to share some information - what is your board, Mbed library and it’s version and also about a link to an example what you exactly imported.

BR, Jan