Home Forums General Discussion Send button sign from Arduino to pc via bluetooth Reply To: Send button sign from Arduino to pc via bluetooth

#6025

Pankaj Verma
Keymaster

Hi George Kalandarishvili,

I have identified the problem. In the function declaration,

void bluetoothFunc(char button)
{
if (Bluetooth.available()) {
Bluetooth.write(Keyboard.write(button));
}
}

What you are doing here is wrong. You are sending button data if and only if there is bytes available on the Bluetooth. You just have to send the data, when button is pressed. Please try this code and it may work for you.

void bluetoothFunc(char button)
{
Bluetooth.write(Keyboard.write(button));
}