Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kshoji/pxt-bluetooth-mouse
BLE HID Mouse module for micro:bit
https://github.com/kshoji/pxt-bluetooth-mouse
ble hid microbit mouse pxt
Last synced: 3 months ago
JSON representation
BLE HID Mouse module for micro:bit
- Host: GitHub
- URL: https://github.com/kshoji/pxt-bluetooth-mouse
- Owner: kshoji
- License: mit
- Created: 2017-10-13T04:05:31.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2023-08-30T08:32:16.000Z (11 months ago)
- Last Synced: 2024-01-26T07:04:17.352Z (6 months ago)
- Topics: ble, hid, microbit, mouse, pxt
- Language: C++
- Homepage:
- Size: 133 KB
- Stars: 3
- Watchers: 3
- Forks: 5
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Lists
- awesome-microbit - Bluetooth Mouse - MakeCode extension for BLE HID Mouse module for micro:bit V1. (👩💻 Programming / 🗿 JavaScript and MakeCode)
README
# bluetooth-mouse
This PXT package allows the micro:bit to act as a Mouse peripheral.
## Usage
Place a ``||bluetooth start mouse service||`` block in your program to enable Bluetooth LE Mouse.
With this block, the `micro:bit` starts advertise BLE packets as a Mouse peripheral.```blocks
bluetooth.startMouseService();
```For example, hold left mouse button :
```blocks
bluetooth.setMouseButton(MouseButton.MOUSE_BUTTON_LEFT, ButtonState.BUTTON_DOWN);
```For example, move mouse pointer using acceleration of micro:bit :
```blocks
basic.forever(() => {
bluetooth.setMouseSpeed(input.acceleration(Dimension.X) / 8, input.acceleration(Dimension.Y) / 8, 0);
}
```## Supported Platforms
Currently, tested with `micro:bit` and `Android` host only.
Mac OS X can connect with `micro:bit`, but it can't receive Mouse message.## Supported targets
* for PXT/microbit
(The metadata above is needed for package search.)
## License
MIT
icon.png : copyright By Darkone - Own work, CC BY-SA 2.5, https://commons.wikimedia.org/w/index.php?curid=235633
```package
bluetooth
bluetooth-mouse=github:kshoji/pxt-bluetooth-mouse
```