You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+13-10Lines changed: 13 additions & 10 deletions
Original file line number
Diff line number
Diff line change
@@ -1,9 +1,5 @@
1
1
# ESP32 BLE Mouse library
2
2
3
-
Bluetooth LE Mouse library for the ESP32
4
-
5
-
## Intro
6
-
7
3
This 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.
8
4
9
5
## Features
@@ -13,15 +9,22 @@ This library allows you to make the ESP32 act as a Bluetooth Mouse and control w
13
9
-[x] Middle click
14
10
-[x] Back/Forwards click
15
11
-[x] Move mouse pointer left/right
16
-
-[] Move mouse pointer up/down (I'm working on it.)
12
+
-[x] Move mouse pointer up/down (I'm working on it.)
17
13
-[x] Scroll up/down
18
14
-[x] Scroll left/right
19
15
16
+
## Installation
17
+
- (Make sure you can use the ESP32 with the Arduino IDE. [Instructions can be found here.](https://github.com/espressif/arduino-esp32#installation-instructions))
18
+
-[https://github.com/T-vK/ESP32-BLE-Mouse/releases](Download the latest release of this library from the release page.)
19
+
- In the Arduino IDE go to "Sketch" -> "Include Library" -> "Add .ZIP Library..." and select the file you just downloaded.
20
+
- You can now go to "File" -> "Examples" -> "ESP32 BLE Mouse" and select any of the examples to get started.
20
21
21
-
22
-
### Example
22
+
## Example
23
23
24
24
```C++
25
+
/**
26
+
* This example turns the ESP32 into a Bluetooth LE mouse that scrolls down every 2 seconds.
27
+
*/
25
28
#include<BleMouse.h>
26
29
27
30
BleMouse bleMouse;
@@ -37,11 +40,11 @@ void loop() {
37
40
Serial.println("Scroll Down");
38
41
bleMouse.move(0,0,-1);
39
42
}
40
-
delay(1000);
43
+
delay(2000);
41
44
}
42
45
```
43
46
44
-
###API docs
47
+
## API docs
45
48
The BleMouse interface is almost identical to the Mouse Interface, so you can use documentation right here:
- Using the back and forward buttons E.g.: `bleMouse.click(MOUSE_BACK)` and `bleMouse.click(MOUSE_FORWARD)`
58
61
59
-
###Credits
62
+
## Credits
60
63
61
64
Credits 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.
0 commit comments