Changing frequencies is a common practice for aircraft and watercraft radio operators. As airplanes near certain airports, their pilots will switch their radio frequencies to communicate on the airport’s channel. The same applies to ships which use certain radio channels when communicating offshore and other channels when in certain ports.
The send_radio_test_message script can be modified to send different messages on different channels. Then, the receiver micro:bit will then display only the messages that go to whatever channel it’s set to.
# send_radio_test_message_try_this # change from microbit import * import radio radio.on() sleep(1000) print("micro:bit radio sender") while True: radio.config(channel = 7) # move to here message = "Hello from channel 7!" # change print("Send: ", message) radio.send(message) sleep(1000) # add radio.config(channel = 14) # add message = "Hello from channel 14!" # add print("Send: ", message) # add radio.send(message) # add print("Done!") sleep(1000) # change
radio.config(channel = 7)
radio.config(channel = 14)