Cannot control the LED of my Arduino Board with BLE Shield over BLE


Hi guys,

i am currently working on my BLE Project and tested the example project simpleChat and it works perfectly. Now I want my arduino LED to be on when 1 is send from smartphone and off when 0 is send from smartphone. I tried with this code;

if (ble_available())

while (ble_available()))
data =ble_read();

if (data==‘1’)
Serial.print(""LED on);


my problem is nothing happens when I send “1” from my smartphone I mean the LED doesnt go on. Can someone help me??

Thanks in Advance