blob: 3638a25c328ce9833fe855806f5f62634dfc8dec (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
# HOVER:BIT Bluetooth Controller software
This is software for controlling the HOVER:BIT kit with a progressive web app.
The web app lives in the [controller](https://github.com/JakobST1n/hoverbit-ble/tree/controller) branch, you can access it [here](http://jakobst1n.github.io/hoverbit-ble/). It works the best if you install it on your device, usually you should get a prompt to install it when accessing the site.
Only tested on __Google Chrome__! Will __NOT__ work on Safari (as apple doesn't allow web bluetooth). I have not tested on IOS, but it should work with chrome there as well.
## Usage
### Flashing the micro:bit
Get the last [hex file](https://github.com/JakobST1n/hoverbit-ble/releases/latest) from Releases, and flash your micro:bit with this file.
To do this, plug the micro:bit into your computer. The micro:bit will then appear as a removable flash drive, then simply copy (drag-drop)
the hex-file into the flash-drive folder.
### Controlling the hover:bit
Navigate to [the progressive web app](https://jakobst1n.github.io/hoverbit-ble/) on a phone, and press connect.
Press `arm` when you are connected, then you can use the throttle on the right, and rudder on the bottom to controll
the hover:bit.
## Compiling the hex-file yourself
Clone or fork this repo locally, and navigate to that folder in your terminal of choice. At this point you have two choises:
### Docker image
I have used a docker image to compile the source. The [Dockerfile](https://github.com/JakobST1n/hoverbit-ble/blob/master/Dockerfile) is in the root of this repo. Using a docker container is rather convenient and a lot less work to get up and running. Just build the container, and run it with a volume as a bind-mount to the code-directory.
```sh
# Build the image on your machine
docker build -t microbit-tools .
# Build the hex-file
docker run -v $(pwd):/app --rm microbit-tools
```
### Manually
[Refer to this repo's readme](https://github.com/lancaster-university/microbit-v2-samples). This is in theory not hard, but if you like me have a lot of toolchains for compiling to other architectures already installed, it could be a bit of work to make function properly.
## Known issues
Take a look at [active issues](https://github.com/JakobST1n/hoverbit-ble/issues). Submit a issue there if find any problems.
## Credits
- The [micro:bit Web Bluetooth](https://github.com/thegecko/microbit-web-bluetooth) library is used by the webapp for bluetooth communication with the MICRO:BIT.
- Joysticks on webapp is from the [nipplejs](https://yoannmoi.net/nipplejs/) library.
|