Hi team, I have this very simple sketch (see below) aimed to continuously send a sequence of characters "RGB" from an ESP32C3 board to an Android device. The sketch works fine when I connect to an Apple device (mac or phone) but on Android sometimes it works and most often it doesn't.
In order to test the sketch I just pair the board with the target device using the operating system BlueTooth pairing tool and then open any note taking application which should receive the R, G and B characters for ever, but as I said most of the times nothing is received even after unpairing and pairing the board...
Any hints of what am I missing?
Any help will be greatly appreciated, I have been hiding my head for two days now....
#include <BleKeyboard.h>
BleKeyboard bleKeyboard("BT_Referi2");
void setup() {
bleKeyboard.begin();
delay (5000);
}
void loop() {
if(bleKeyboard.isConnected()) {
bleKeyboard.print("R");
delay(5000);
}
if(bleKeyboard.isConnected()) {
bleKeyboard.print("G");
delay(5000);
}
if(bleKeyboard.isConnected()) {
bleKeyboard.print("B");
delay(5000);
}
}