esp32 bloetooth mouse
Posted: Thu Feb 01, 2024 9:20 am
hello everyone... I want to make a bluetooth mouse with ESP32. only I'm still confused about creating GPIO parameters to activate the buttons on each board. can anyone help?
this is the code I use
#include <BleMouse.h>
BleMouse bleMouse;
#define Back 25
void setup() {
pinMode(Back,INPUT_PULLUP);
digitalWrite(Baack,HIGH);
Serial.begin(115200);
Serial.println("Starting BLE work!");
bleMouse.begin();
}
void loop() {
if(bleMouse.isConnected()) {
if(digitalRead(Back==LOW)){
Serial.println("Back button click");
bleMouse.click(MOUSE_BACK);
delay(500);}
}
this is the code I use
#include <BleMouse.h>
BleMouse bleMouse;
#define Back 25
void setup() {
pinMode(Back,INPUT_PULLUP);
digitalWrite(Baack,HIGH);
Serial.begin(115200);
Serial.println("Starting BLE work!");
bleMouse.begin();
}
void loop() {
if(bleMouse.isConnected()) {
if(digitalRead(Back==LOW)){
Serial.println("Back button click");
bleMouse.click(MOUSE_BACK);
delay(500);}
}