1
TinyDuino Processors & TinyShields / Re: detect other BlueNRG
« on: August 01, 2023, 06:32:08 AM »
void loop() {
uint8_t sendBuffer[21]="hello\0";
uint8_t sendLength = 6;
aci_loop(); //Process any ACI commands or events from the NRF8001- main BLE handler, must run often. Keep main loop short.
if (ble_rx_buffer_len) {//Check if data is available
if (SerialMonitorInterface.available()) {
SerialMonitorInterface.print(ble_rx_buffer_len);
SerialMonitorInterface.print(" : ");
SerialMonitorInterface.println((char*)ble_rx_buffer);
}
contact();
ble_rx_buffer_len = 0;//clear afer reading
}
else {
lib_aci_send_data(PIPE_UART_OVER_BTLE_UART_TX_TX, (uint8_t*)sendBuffer, sendLength);
}
}
uint8_t sendBuffer[21]="hello\0";
uint8_t sendLength = 6;
aci_loop(); //Process any ACI commands or events from the NRF8001- main BLE handler, must run often. Keep main loop short.
if (ble_rx_buffer_len) {//Check if data is available
if (SerialMonitorInterface.available()) {
SerialMonitorInterface.print(ble_rx_buffer_len);
SerialMonitorInterface.print(" : ");
SerialMonitorInterface.println((char*)ble_rx_buffer);
}
contact();
ble_rx_buffer_len = 0;//clear afer reading
}
else {
lib_aci_send_data(PIPE_UART_OVER_BTLE_UART_TX_TX, (uint8_t*)sendBuffer, sendLength);
}
}