Help bluetooth keyboard from 2 buttons

i would like to have 2 buttons (for exemple 1 for “Enter” the other for “Space”) on an arduino, when i press one of them the bluetooth connection with the android tablet will replicate it on the screen.
Basically i want to do a pageflip with bluetooth but when i do it with my purchased pedal it is connected as a keyboard and the one i made android refuse to connect to it but with serial bluetooth applications it works

So i would like some help with the connection maybe i don’t have the bluetooth module for that usage.

I post the code below it works

Thanks for your help

Projet_FlipPedal.ino (1.09 KB)

Can you rephrase the question? It’s not quite clear to me what the problem is.

OP’s code, so we don’t have to download it

#include <SoftwareSerial.h>
#include <TimerOne.h>
#define PIN1 2
#define PIN2 3

SoftwareSerial ARDBT(15, 14); // (RX, TX) (pin Rx BT, pin Tx BT)

#define CAR_D "d"
#define CAR_G "g"

volatile boolean g, d;

void gauche(){
    g = false;
void droit(){
    d = false;

void temps(){
  g = true;
  d = true;

void setup()
    // Ouvre la voie série avec l'ordinateur
    // Ouvre la voie série avec le module BT
    Serial.println("Initialisation OK");
    g = true;
    d = true;

void loop() // run over and over
    if (ARDBT.available()) {
    if (Serial.available()) {

@AnotherBeginner, please read, specifically point #7 about posting code. Your code is small enough and and it allows people with cell-phones to check it as well.

Ok so I want to make a page flip on an arduino (so in a box in the end), so my pageflip will need 2 buttons one forward and one backward (think a pdf for exemple)

So the arduino part works fine, the code works in serial bluetooth but i can't connect my tablet on the bluetooth network (made by a HC05) i says "unsecured network " and i can't figure out how to make the bluetooth arduino a keyboard on the tablet

I used a Samsung tablet and it's the same now with huawai tablet (the pageflip is not even recognised now)

Hey i really need help for this this project is almost done but the bluetooth part is still not working