summaryrefslogtreecommitdiff
path: root/.pio/libdeps/esp32-s3-n16r8/ESP32 BLE Mouse/examples/MouseButtons
diff options
context:
space:
mode:
authorkrolyxon <me@krolyxon.com>2026-06-08 23:10:46 +0530
committerkrolyxon <me@krolyxon.com>2026-06-08 23:10:46 +0530
commit3120783000d0025b183b0397acaa8b769499eb38 (patch)
tree1c4f93be213f1b1d48f59e554562d847b4e7c25e /.pio/libdeps/esp32-s3-n16r8/ESP32 BLE Mouse/examples/MouseButtons
Initial gh-pages firmware hosting
Diffstat (limited to '.pio/libdeps/esp32-s3-n16r8/ESP32 BLE Mouse/examples/MouseButtons')
-rw-r--r--.pio/libdeps/esp32-s3-n16r8/ESP32 BLE Mouse/examples/MouseButtons/MouseButtons.ino45
1 files changed, 45 insertions, 0 deletions
diff --git a/.pio/libdeps/esp32-s3-n16r8/ESP32 BLE Mouse/examples/MouseButtons/MouseButtons.ino b/.pio/libdeps/esp32-s3-n16r8/ESP32 BLE Mouse/examples/MouseButtons/MouseButtons.ino
new file mode 100644
index 0000000..2859377
--- /dev/null
+++ b/.pio/libdeps/esp32-s3-n16r8/ESP32 BLE Mouse/examples/MouseButtons/MouseButtons.ino
@@ -0,0 +1,45 @@
+/**
+ * This example turns the ESP32 into a Bluetooth LE mouse that continuously moves the mouse.
+ */
+#include <BleMouse.h>
+
+BleMouse bleMouse;
+
+void setup() {
+ Serial.begin(115200);
+ Serial.println("Starting BLE work!");
+ bleMouse.begin();
+}
+
+void loop() {
+ if(bleMouse.isConnected()) {
+ Serial.println("Left click");
+ bleMouse.click(MOUSE_LEFT);
+ delay(500);
+
+ Serial.println("Right click");
+ bleMouse.click(MOUSE_RIGHT);
+ delay(500);
+
+ Serial.println("Scroll wheel click");
+ bleMouse.click(MOUSE_MIDDLE);
+ delay(500);
+
+ Serial.println("Back button click");
+ bleMouse.click(MOUSE_BACK);
+ delay(500);
+
+ Serial.println("Forward button click");
+ bleMouse.click(MOUSE_FORWARD);
+ delay(500);
+
+ Serial.println("Click left+right mouse button at the same time");
+ bleMouse.click(MOUSE_LEFT | MOUSE_RIGHT);
+ delay(500);
+
+ Serial.println("Click left+right mouse button and scroll wheel at the same time");
+ bleMouse.click(MOUSE_LEFT | MOUSE_RIGHT | MOUSE_MIDDLE);
+ delay(500);
+
+ }
+} \ No newline at end of file