microsoft / microsoft/pxt

Bluetooth UART Console feature

Open
#4,796 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Experiment
Dominant language
TypeScript
Stars
2.3k
Forks
641
Avg merge
12h 4m
Merged PRs (30d)
57

Description

bluetoothuartconsole

Description

Stream Bluetooth UART data into the console. UART data is typically emitted by a BLE capable device like the BBC micro:bit

How to enable it?

As soon as UART data is received the Console data button will show up.

If you cannot see that button and you editor supports this experiment, go to About, then click Experiments and Bluetooth Console. If you cannot see this card, your editor does not support yet this feature.

micro:bit example

The following code streams the acceleration value. Don't forget to add the bluetooth Extension to use this code.

bluetooth.startUartService()
basic.forever(function () {
    led.toggle(0, 0)
    bluetooth.uartWriteValue("a", input.acceleration(Dimension.X))
})

Feedback

Do you use this feature? Is there something you'd like to change? Did you encounter issues? Please drop a comment on this issue to send us your feedback.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the gearwheel menu's Pair Bluetooth flow, the Console data button, and the About > Experiments > Bluetooth Console setting. Check the Web Bluetooth and micro:bit UART behavior described here; because the issue requests feedback rather than a specific change, confirm the desired scope and completion criteria before implementing anything.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend, web-dev
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.