Simple read/send data via BLE (Redbear Duo)

I am trying to implement a simple circuit where mobile user sends 0 or 1 to Red Bear duo via BLE. This is very simple with standard Bluetooth but the BLE examples in github for Redbear Duo do not have such functionality and all empty inside loop(). I tried adding the code below in loop but code fails to compile so can not test on device

Using SimpleChat.ino example

....

....    

void loop() {
    
     if(ble.readValue() == '1')
     {
        Serial.println("LED on");
        digitalWrite(ledPin, HIGH);    
     }
    
     if(ble.readValue() == '0')
     {
        Serial.println("LED off");
        digitalWrite(ledPin, LOW);    
     }
    
}