tell remote control to

Control the presentation of media content available on a remote device using the tell remote control to function.

For another device like a smartphone to use any of the Bluetooth “services” which the micro:bit has, it must first be paired with the micro:bit. Once paired, the other device may connect to the micro:bit and exchange data relating to many of the micro:bit’s features.

devices.tellRemoteControlTo(MesRemoteControlEvent.play)

Parameters

  • event - an event identifier

Event values

  • play
  • stop
  • pause
  • forward
  • rewind
  • volume up
  • volume down
  • previous track
  • next track

Examples

To tell the connected device to start playing:

devices.tellRemoteControlTo(MesRemoteControlEvent.play)

To tell the connected device to stop playing

devices.tellRemoteControlTo(MesRemoteControlEvent.stop)

To tell the connected device to go to next track

devices.tellRemoteControlTo(MesRemoteControlEvent.nextTrack)

To tell the connected device to go to previous track

devices.tellRemoteControlTo(MesRemoteControlEvent.previousTrack)

To tell the connected device to go forward

devices.tellRemoteControlTo(MesRemoteControlEvent.forward)

To tell the connected device to rewind

devices.tellRemoteControlTo(MesRemoteControlEvent.rewind)

To tell the connected device volume up

devices.tellRemoteControlTo(MesRemoteControlEvent.volumeUp)

To tell the connected device volume down

devices.tellRemoteControlTo(MesRemoteControlEvent.volumeDown)

See also

tell camera to, raise alert to

devices