Hi all,
I'm building an application for IOS & Red bear lab BLE shield and Arduino. The phone acts as a remote control for a toy car that I built . It works decently, but I would like the response time to be faster. I want to make the data transfer rate faster between the phone and the arduino. Please let me know if there is any way I could speed up the data transfer rate. It takes around 1/4 a second to get the data from the phone to the arduino
This is How I am sending the data from the phone
UInt8 pktbuf[6];
pktbuf[0] = SYNC_BYTE;
pktbuf[1] = _direction;
pktbuf[2] = _angle;
pktbuf[3] = (int)(self.sldr.value * 255);
pktbuf[4] = _lightValue;
pktbuf[5] = _hornValue;
NSData *d = [[NSData alloc]initWithBytes:pktbuf length:6];
[ble write:d];
How i am recieving the data on arduino
*while(ble_available()){
if(0xa5 == ble_read()){
angleDirection = ble_read();
angle = ble_read();
motorSpeed = ble_read();
lightValue = ble_read();
hornValue = ble_read();
} }*
Any ideas or different ways to send data to speed this up?