Hi Guys I have a Bluno which is an Arduino Uno compatible board with built in Blootooth 4.0
I am trying to create a protocol to control it from an Android smartphone.
I would like to know how to detect that it is connected.
Serial.available() simply returns true if there is something in the buffer
Serial.begin(115200) returns nothing other than setting up the board so a repeat Serial.begin(115200) while connected will not help.
I connect to the bluno with an android phone over blue tooth. When I connect, a little led turns on, on the board and I can now send and receive bytes over Bluetooth. I'd like to know from within the bluno program that I am now connected with a device.
For example, While connected, I can't send a new sketch to the bluno because the com port is engadged with the android device. If I disconnect from the android device, the led on the bluno board switches off and the serial port becomes available.