add getPeerName to examples

This commit is contained in:
hathach committed 2017-07-10 13:01:01 +07:00
1 parent f973a13aaf
commit c36df89fce
3 files changed
+19 -3

No files matched your search

@@ -156,7 +156,11 @@ void setupHRM(void)
void connect_callback(void)
{
Serial.println("Connected");
char central_name[32] = { 0 };
Bluefruit.Gap.getPeerName(central_name, sizeof(central_name));
Serial.print("Connected to ");
Serial.println(central_name);
}
void disconnect_callback(uint8_t reason)
@@ -115,7 +115,13 @@ void setupAdv(void)
void connect_callback(void)
{
Serial.println("Connected ! Please select 'Uart' tab and send any characters");
char central_name[32] = { 0 };
Bluefruit.Gap.getPeerName(central_name, sizeof(central_name));
Serial.print("Connected to ");
Serial.println(central_name);
Serial.println("Please select 'Uart' tab and send any characters");
}
@@ -94,7 +94,13 @@ void setupAdv(void)
void connect_callback(void)
{
Serial.println("Connected !! Please select the 'Neopixels' tab, click 'Connect' and have fun");
char central_name[32] = { 0 };
Bluefruit.Gap.getPeerName(central_name, sizeof(central_name));
Serial.print("Connected to ");
Serial.println(central_name);
Serial.println("Please select the 'Neopixels' tab, click 'Connect' and have fun");
}
void loop()