On the Android device, the plug-in “bluetooth-demo” of Scott Harrison in the original version is installed (the device tried different-a tablet GS700 with android 4.4.2, a smartphone Sony Xperia M5 with android 6.0 and Samsung Galaxy J1 MiniPrime with android 6.1).
HC-06 is connected to Arduino UNO and a simple sketch is filled:
int LED = 13;
void setup()
{
Serial.begin(9600);
pinMode(LED, OUTPUT);
}
void loop()
{
delay(1000);
Serial.print(“0123456789”);
delay(1000);
}
The connection is established normally, a message pops up:
if (event.type == “connected”) then native.showAlert( “Connected to device”, “Name:”…event.deviceName, {“Ok”} )
But the message does not come, i.e. the message delivery window does not pop up:
if (event.type == “message”) then native.showAlert( “Message Received”, “Name:”…event.error, {“Ok”} )
We need to get a string from Arduino to Android.
Please tell me where there may be a mistake?
Additional information to help:
With the help of this plug-in installed on the Android device, we can send messages to Arduino with the Bluetooth module HC-06. It works well.
With the help of the bluetooth terminal installed on android, it is possible to both receive and send messages to Arduino.