lancaster-university / microbit-v2-samples

CODAL build tools and sample programs for the micro:bit v2.x
MIT License
64 stars 83 forks source link

Missing BLE Sample #9

Closed microbit-sam closed 1 year ago

microbit-sam commented 3 years ago

microbit-v2-samples doesn't have an example for BLE Should Martin's BLE test program be pulled in?

https://github.com/martinwork/codal/blob/ble2-work/source/BLETest.needsble

adamstark commented 3 years ago

I'd also love to see an example for BLE - is one available? :)

microbit-sam commented 3 years ago

Hey Adam, I've created a PR with the examples from micro:bit v1 running on v2 that may interest you https://github.com/lancaster-university/microbit-v2-samples/pull/19

adamstark commented 3 years ago

Thanks @microbit-sam - I actually did some hacking around and got something working myself but this looks much more complete than what I've managed. Thank you! :)

RoufaidaLaidi commented 2 years ago

Hello, I would like to make a code to allow two Microbits V2 to communicate over BLE (central and peripheral), is this possible ? And if so, how to start ?

microbit-carlos commented 1 year ago

I'll close this issue as the PR with the BLE samples has been merged.

@RoufaidaLaidi To have one of the micro:bits configured as BLE central the CODAL project needs to be configured with SoftDevice S140. It currently uses S113, which only contains peripheral mode, as that saves some flash and RAM. You can update CODAL to use s140 instead, which it did originally a couple of years ago. The best way to start would be to have a look at this PR, and the PRs listed in the description, and revert them on top of the latest release:

If you have any question with respect to that please open an issue in the codal-microbit-v2 repo and we can help you over there: - https://github.com/lancaster-university/codal-microbit-v2/issues