Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update ble_hid.md - Fixed Bad Instruction #519

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 5 additions & 9 deletions docs/ble_hid.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,9 @@
Bluetooth connections help clean up the wire mess!

## CircuitPython
If not running KMKPython, this does require the adafruit_ble library from Adafruit.
This can be downloaded
[here](https://github.com/adafruit/Adafruit_CircuitPython_BLE/tree/master/adafruit_ble).
It is part of the [Adafruit CircuitPython Bundle](https://github.com/adafruit/Adafruit_CircuitPython_Bundle).
Simply put this in the "root" of your CircuitPython device. If unsure, it's the folder with main.py in it, and should be the first folder you see when you open the device.
If not running KMKPython, this does require the [adafruit_ble library from Adafruit](https://github.com/adafruit/Adafruit_CircuitPython_BLE/tree/master/adafruit_ble).
baconspoon85 marked this conversation as resolved.
Show resolved Hide resolved
It's part of the Adafruit CircuitPython Bundle, which can be downloaded [here](https://github.com/adafruit/Adafruit_CircuitPython_Bundle/releases/tag/20220715).
baconspoon85 marked this conversation as resolved.
Show resolved Hide resolved
Get the bundle version that corresponds to the CircuitPython version installed on your device. Unzip the bundle and open the "lib" folder to locate the "adafruit_ble" library. Selectively copy that library (the entire "adafruit_ble" folder) and place it into the "lib" folder located at the root of your CIRCUITPY device. If unsure, the root is the main device storage folder where your main.py (or code.py) file is located. The "lib" folder should have been created when you installed CircuitPython. If not, just create one to place the ble library.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why doesn't the device root work? Is there some specific code somewhere that explicitly sources from lib?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Our standard convention seems to be on the root of the drive. If that library somehow only magically works only under /lib then an exception can be made, however that shouldn't be the case last I worked on BLE


## Enabling BLE

Expand All @@ -22,12 +20,10 @@ if __name__ == '__main__':

## Changing the advertise name
There are two ways to change the advertising name. The first would be to
[change the name of the drive](https://learn.adafruit.com/welcome-to-circuitpython/the-circuitpy-drive).
[change the name of the drive](https://learn.adafruit.com/welcome-to-circuitpython/renaming-circuitpy).
The second would be to change the keyboard.go() like this.

```python
if __name__ == '__main__':
keyboard.go(hid_type=HIDModes.BLE, ble_name='KMKeyboard')
keyboard.go(hid_type=HIDModes.BLE, ble_name='KMKKeyboard')
```