Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/Microsoft/pxt-bluedot
A PXT package to support the BlueDot app - beta
https://github.com/Microsoft/pxt-bluedot
Last synced: 3 months ago
JSON representation
A PXT package to support the BlueDot app - beta
- Host: GitHub
- URL: https://github.com/Microsoft/pxt-bluedot
- Owner: microsoft
- License: mit
- Created: 2017-05-01T12:37:32.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2023-06-13T15:10:55.000Z (about 1 year ago)
- Last Synced: 2024-04-08T00:52:11.534Z (3 months ago)
- Language: C++
- Homepage: https://pxt.microbit.org/pkg/Microsoft/pxt-bluedot
- Size: 14.6 KB
- Stars: 4
- Watchers: 10
- Forks: 7
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Security: SECURITY.md
Lists
- awesome-microbit-zh - BlueDot - 支持BlueDot app的PXT库(测试版). (编程 / JavaScript 和 MakeCode)
- awesome-microbit - BlueDot - PXT package to support the BlueDot app - beta. (👩💻 Programming / 🗿 JavaScript and MakeCode)
README
# bluedot
### ~ hint
WORK IN PROGRESS
### ~
A sample of Bluetooth Low Energy port of the [BlueDot](https://github.com/martinohanlon/BlueDot/) protocol
for the micro:bit.## Bluetooth Low Energy Service
The BlueDot service contains 2 characteristic for the button pressure and the position.
* Service UUID: ``cf638d8f-ea58-4015-90a6-76f1f11aaa4f``
### Button Characteristic
An unsigned byte that represents the button pressure. ``0`` means not pressed, positive values means pressed.
* Mandatory
* UUID: ``cf6363c2-ea58-4015-90a6-76f1f11aaa4f``
* Access: write wo response, notify### Position Characteristic
An ``unsigned int`` which contains the X and Y positions.
* Mandatory
* UUID: ``cf63f012-ea58-4015-90a6-76f1f11aaa4f``
* Access: write wo response, notifyEach values is mapped onto an ``unsigned short`` where ``0`` is the left or bottom position.
## Usage
```blocks
bluedot.startService();
bluedot.onButton(BlueDotButtonState.Down, () => {
led.unplot(0, 2);
})
bluedot.onButton(BlueDotButtonState.Up, () => {
led.plot(0, 2);
})
```## License
MIT
# Contributing
This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [[email protected]](mailto:[email protected]) with any additional questions or comments.## Supported targets
```package
bluedot=github:microsoft/pxt-bluedot
```