MobileSheets Forums

Full Version: PageTurner with ESP32 and bleKeyboard Library
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi,
I'm just trying to make a DIY Bluetooth Page turner with the ESP32 
The Program is working but if I try to connect it with the Pedal via Tasten Input,(settings/Touch and Pedal Settings/Pedal-Actions)
I can't see any Command Line, but only the highlighted Frame.
If I test it with apple books or other apps  the Command are working. Here is the short program line within the Arduino scetch.

#include <BleKeyboard.h>

BleKeyboard bleKeyboard("ESP32-K2", "Me", 100);
#define BUTTON_PIN 4

void setup() {
  pinMode(BUTTON_PIN, INPUT_PULLUP);
  Serial.begin(115200);
  Serial.println("Starting BLE work!");
  bleKeyboard.begin();}

void loop() {
  static int debug = 0, counter = 0;
  char button = digitalRead(BUTTON_PIN) == LOW;

 
  if(bleKeyboard.isConnected() && button) {
    Serial.println("KEY Sending");
 
    bleKeyboard.write( KEY_PAGE_DOWN);
    delay(1000);
    bleKeyboard.releaseAll();

  }

Any tipps to get it running?
Regards john92648
(11-22-2023, 02:50 AM)john92648 Wrote: [ -> ]Hi John,
In the pedal actions dialogue, you can press "PEDAL 1" and then "Teach" the button on the BLE switch to assign it.
You can either tap PEDAL 1 as blauhorn suggested or you can tap the Keys field to bring up the dialog to assign the key command. If you bring up that dialog, then tap clear, is the key registered correctly when you press the switch on your page turner?

Mike