-1

I can't figure out what it is.

      from microbit import*
      # what is the words that trigger it?
  • Please explain what you are trying to achieve. Is it something that isn't explained in the [documentation](https://microbit-micropython.readthedocs.io/en/latest/tutorials/radio.html)? – nekomatic Dec 12 '19 at 16:36

2 Answers2

1

The micro:bit MicroPython documentation for the radio module shows you what's available: https://microbit-micropython.readthedocs.io/en/latest/radio.html

And the radio tutorial is a good introduction to what it can do: https://microbit-micropython.readthedocs.io/en/latest/tutorials/radio.html

carlosperate
  • 594
  • 4
  • 11
0

Here is a quick demo for radio messaging system between two micro:bits, the first one plays sender role, and the second on is a receiver.

1st board:

from microbit import *
import radio
radio.config(group=5)
radio.on()

while True:        
    if button_a.is_pressed():
        radio.send('A is pressed')

2nd board:

from microbit import *
import radio
radio.config(group=5)
radio.on()
while True:
    message = radio.receive()
    if message == 'A is pressed':
        display.scroll(message)
Meqdad Dev
  • 131
  • 1
  • 2
  • 10