I hope you all are in good health.
I am using Redbear Nano v1.5 to transmit EMG signals from the human body to the computer using two Ble Nano modules. Even though I understand that the signal sampling period is very slow, I wanted to sample the signal as quickly as possible. I am using the Arduino IDE, and it has only been three weeks that I have been using BLE.
I have been consulting the forums, but still I have found the solution to the problem of setting the connection interval. I am using the code below in the void setup of the BLE_SimplePeripheral.
connectionParams.minConnectionInterval = 12;
connectionParams.maxConnectionInterval = 12;
connectionParams.slaveLatency = 0;
connectionParams.connectionSupervisionTimeout = 500;
// set adv_type(enum from 0)
// add service
dfuService = new DFUService(ble);
hrService = new HeartRateService(ble, hrmCounter, HeartRateService::LOCATION_FINGER);
deviceInfo = new DeviceInformationService(ble, “ARM”, “Model1”, “SN1”, “hw-rev1”, “fw-rev1”, “soft-rev1”);
// set device name
ble.setDeviceName((const uint8_t *)DEVICE_NAME);
// set tx power,valid values are -40, -20, -16, -12, -8, -4, 0, 4
// set adv_interval, 100ms in multiples of 0.625ms.
// set adv_timeout, in seconds
// ger BLE stack version
Serial.print("BLE stack verison is : ");
// start advertising
Serial.println("start advertising ");
It can be seen that I attempt to change the connection interval of the device. However, while monitoring using the CentralTest, both Min and Max ConnectionIntervals are set to 64. I would be very grateful for your responses. I must say that during my engineering, I was only trained in simple microcontroller C programming and not intricate data structures.
I will be awaiting your responses.