Skip to content

This MakeCode package adds the ability to pass messages back and forth with the BlockyTalkyBLE App Inventor Extension

License

Notifications You must be signed in to change notification settings

LaboratoryForPlayfulComputation/pxt-BlockyTalkyBLE-UART

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BlockyTalkyBLE

MakeCode Microbit package used to communicate over the Bluetooth Low Energy UART with a simple read and write of key value pairs. Requires Microbit Bluetooth package. Cannot be used with Radio package.

To use:

BlockyTalkyBLE has 4 blocks/functions:

  • on string received - An event handler that fires when a correctly formed message containing a string value is received over Bluetooth. Add blocks for your eventhandler inside this block. Set the key to the expected string. Use the string received in the message as a variable within the block.
  • on number received - An event handler that fires when a correctly formed message containing a number value is received over Bluetooth. Add blocks for your eventhandler inside this block. Set the key to the expected string. Use the number received in the message as a variable within the block.
  • send string key value - Send message over Bluetooth. Key and value are both strings.
  • send string key value - Send message over Bluetooth. Key is a string and value is a number.

Clients devices must be paired with the microbit (depending on the pairing method chosen in the editor's Project Settings).

A couple tips:

  • It is helpful while building a project for the microbit to show whether the microbit is connected or not. Use the Bluetooth.onBluetoothConnected() and Bluetooth.onBluetoothDisonnected() event handler to display a 'c' or 'd' respectively when connection changes.
  • If messages are not being received as expected, ensure the keys match (including case) on microbit program and client app.

Supported targets

  • for PXT/microbit

Examples

Please see our getting started guide and videos here: http://www.playfulcomputation.group/blockytalkyble.html

About

This MakeCode package adds the ability to pass messages back and forth with the BlockyTalkyBLE App Inventor Extension

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors 4

  •  
  •  
  •  
  •