{"id":29787498,"url":"https://github.com/T-vK/ESP32-BLE-Mouse","last_synced_at":"2025-07-27T20:03:38.653Z","repository":{"id":39707706,"uuid":"200223585","full_name":"T-vK/ESP32-BLE-Mouse","owner":"T-vK","description":"Bluetooth LE Mouse library for the ESP32 (Arduino IDE compatible)","archived":false,"fork":false,"pushed_at":"2024-01-15T23:47:29.000Z","size":28,"stargazers_count":840,"open_issues_count":57,"forks_count":164,"subscribers_count":32,"default_branch":"master","last_synced_at":"2025-05-23T20:06:03.668Z","etag":null,"topics":["arduino","arduino-ide","arduino-library","ble","bluetooth","bluetooth-le","esp32","mouse"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/T-vK.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-08-02T11:31:08.000Z","updated_at":"2025-05-22T07:20:07.000Z","dependencies_parsed_at":"2024-11-14T13:29:33.745Z","dependency_job_id":"cfe92094-536a-44a6-bf87-31cef63e3121","html_url":"https://github.com/T-vK/ESP32-BLE-Mouse","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/T-vK/ESP32-BLE-Mouse","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/T-vK%2FESP32-BLE-Mouse","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/T-vK%2FESP32-BLE-Mouse/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/T-vK%2FESP32-BLE-Mouse/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/T-vK%2FESP32-BLE-Mouse/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/T-vK","download_url":"https://codeload.github.com/T-vK/ESP32-BLE-Mouse/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/T-vK%2FESP32-BLE-Mouse/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267417646,"owners_count":24083838,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-27T02:00:11.917Z","response_time":82,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["arduino","arduino-ide","arduino-library","ble","bluetooth","bluetooth-le","esp32","mouse"],"created_at":"2025-07-27T20:01:36.306Z","updated_at":"2025-07-27T20:03:38.647Z","avatar_url":"https://github.com/T-vK.png","language":"C++","funding_links":[],"categories":["C++"],"sub_categories":[],"readme":"# ESP32 BLE Mouse library\n\nThis library allows you to make the ESP32 act as a Bluetooth Mouse and control what it does. E.g. move the mouse, scroll, make a click etc.\n\nYou might also be interested in:\n- [ESP32-BLE-Abs-Mouse](https://github.com/sobrinho/ESP32-BLE-Abs-Mouse)\n- [ESP32-BLE-Keyboard](https://github.com/T-vK/ESP32-BLE-Keyboard)\n- [ESP32-BLE-Gamepad](https://github.com/lemmingDev/ESP32-BLE-Gamepad)\n\n## Features\n\n - [x] Left click\n - [x] Right click\n - [x] Middle click\n - [x] Back/Forwards click\n - [x] Move mouse pointer left/right\n - [x] Move mouse pointer up/down\n - [x] Scroll up/down\n - [x] Scroll left/right\n - [x] Report optional battery level to host (basically works, but it doesn't show up in Android's status bar)\n - [x] Customize Bluetooth device name/manufacturer\n - [x] Compatible with Android\n - [x] Compatible with Windows\n - [x] Compatible with Linux\n - [x] Compatible with MacOS X (not stable, some people have issues, doesn't work with old devices)\n - [x] Compatible with iOS (not stable, some people have issues, doesn't work with old devices)\n \n## Installation\n- (Make sure you can use the ESP32 with the Arduino IDE. [Instructions can be found here.](https://github.com/espressif/arduino-esp32#installation-instructions))\n- [Download the latest release of this library from the release page.](https://github.com/T-vK/ESP32-BLE-Mouse/releases)\n- In the Arduino IDE go to \"Sketch\" -\u003e \"Include Library\" -\u003e \"Add .ZIP Library...\" and select the file you just downloaded.\n- You can now go to \"File\" -\u003e \"Examples\" -\u003e \"ESP32 BLE Mouse\" and select any of the examples to get started.\n\n## Example\n\n``` C++\n/**\n * This example turns the ESP32 into a Bluetooth LE mouse that scrolls down every 2 seconds.\n */\n#include \u003cBleMouse.h\u003e\n\nBleMouse bleMouse;\n\nvoid setup() {\n  Serial.begin(115200);\n  Serial.println(\"Starting BLE work!\");\n  bleMouse.begin();\n}\n\nvoid loop() {\n  if(bleMouse.isConnected()) {\n    Serial.println(\"Scroll Down\");\n    bleMouse.move(0,0,-1);\n  }\n  delay(2000);\n}\n```\n\n## API docs\nThe BleMouse interface is almost identical to the Mouse Interface, so you can use documentation right here:\nhttps://www.arduino.cc/reference/en/language/functions/usb/mouse/\n\nJust remember that you have to use `bleMouse` instead of just `Mouse` and you need these two lines at the top of your script:\n```\n#include \u003cBleMouse.h\u003e\nBleMouse bleMouse;\n```\n\nThis library supports a few additional features that the Mouse library does not support at the time of writing:\n\n- Scrolling left/right E.g.: `bleMouse.move(0,0,0,1)` (Scroll left) and `bleMouse.move(0,0,0,-1)` (Scroll right)\n- Using the back and forward buttons E.g.: `bleMouse.click(MOUSE_BACK)` and `bleMouse.click(MOUSE_FORWARD)`\n\nThere is also Bluetooth specific information that you can use (optional):\n\nInstead of `BleMouse bleMouse;` you can do `BleMouse bleMouse(\"Bluetooth Device Name\", \"Bluetooth Device Manufacturer\", 100);`.\nThe third parameter is the initial battery level of your device. To adjust the battery level later on you can simply call e.g.  `bleMouse.setBatteryLevel(50)` (set battery level to 50%).\nBy default the battery level will be set to 100%, the device name will be `ESP32 Bluetooth Mouse` and the manufacturer will be `Espressif`.\n\n\n## Credits\n\nCredits to [chegewara](https://github.com/chegewara) as this library is based on [this piece of code](https://github.com/nkolban/esp32-snippets/issues/230#issuecomment-473135679) that he provided.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FT-vK%2FESP32-BLE-Mouse","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FT-vK%2FESP32-BLE-Mouse","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FT-vK%2FESP32-BLE-Mouse/lists"}