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

Send a string by default over microbit UART when program removed #262

Open
brettfiedler opened this issue Jul 24, 2024 · 1 comment
Open
Assignees

Comments

@brettfiedler
Copy link
Member

When a Bluetooth component is added:

  • Start a UART service and write (microbit UART RX) onProgramRemoved code to send a string delimiter "#". Keep the starting and stopping delimiters for now. The whole message will read "$#|"

The MakeCode program will look for the "#" delimiter to act on the message sent when a program is removed.

No additional UI needed. Need to note its existence in the documentation, as well as the functions we added to abstract some of the data types for sending to and from the microbit.

@jessegreenberg
Copy link
Contributor

OK, this is done. I tested in a simple case with a small change to the microbit code.

  1. When a BLE component is removed, we send a microbit specific UART message. It looks like this: $#45| where
  • $ is the start delimiter
  • # is the 'removal' delimiter
  • 45 is the number of the program removed (so this can be any number)
  • | is the end delimiter
  1. I added this bit in makecode to test it
    image

  2. Note this feature is specific to microbit UART RX.

@brettfiedler would you like to verify anything for this or are there any other changes needed here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants