Bluetooth Connection Indication Bit?


#1

Hello!

I’m wondering if there is some internal bit or register that I can use within my Nano program to indicate whether a device is connected via Bluetooth or not.

For example, let’s say I want my Nano to actuate a relay when I connect to it with my phone. How can this be accomplished?

Thank you!


#2

Hi,

In mbed and Arduino environments you can simple use: ble.getGapState().connected

Cheers