element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet & Tria Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      • Japan
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Vietnam
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
STEM Academy
  • Learn
  • Learning Center
  • STEM Academy
  • More
  • Cancel
STEM Academy
Blog MicroBit Send and Receive Radio Game
  • Blog
  • Forum
  • Documents
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join STEM Academy to participate - click to join for free!
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: mikedavis
  • Date Created: 2 May 2018 4:25 PM Date Created
  • Views 1076 views
  • Likes 5 likes
  • Comments 3 comments
  • stem
  • education
  • microbit
  • bbc microbit
  • stem education
Related
Recommended

MicroBit Send and Receive Radio Game

mikedavis
mikedavis
2 May 2018

This game is a variation on the one I posted previously.  In this version, a person is walking around with a MicroBit.  Every time they walk up to a Sign Post, they press a button and then receive instructions on their own MicroBit, making it a transceiver.

 

Treasure Hunt - Send and Receive

 

Description: This is another version of the Treasure Hunt Game.  In this version of the game, a treasure is hidden somewhere.  A group of treasure hunters will follow directions from Sign Posts to locate it.  In this version, the treasure hunters will approach a signpost, press a button on their MicroBit, and then receive instructions on their MicroBit.  The game is over when the Treasure Hunters find the treasure.

 

Sign Post: The sign posts are meant to be little stations that will let the treasure seeker know how far, and in what direction they should go to find the next signpost or the treasure. 

 

I want:  The MicroBit will be in a rest state, and it will be listening on a radio channel.  When it receives something, it will broadcast a direction (left or right) and a certain number of steps.

 

Python Code

 

# Add your Python code here. E.g.
from microbit import *
import radio

radio.on() #turn on the radio
radio.config(channel=10)
radio.config(power=7)

direction = "GO RIGHT"
steps = "20 paces"

while True:
  incoming=radio.receive()
  if incoming is not None:
      display.scroll("SENT")
      radio.send(direction)
      sleep(1000)
      radio.send(steps)

 

 

Treasure Hunter:  The treasure hunters have Microbits that can signal a Sign Post for directions.  They will press the ‘A’ button and see what the signpost tells them.

 

I want:  The MicroBit will be in a rest state, and it will be on a radio channel.  When the ‘A’ button is pressed it will send a message. The SignPost will receive the message, then send a two part message including direction and steps.  The MicroBit will receive the message and scroll it through the LEDs.

 

Python Code
# Add your Python code here. E.g.
from microbit import *
import radio

radio.on() #turn on the radio
radio.config(channel=10)
radio.config(power=7)

message = "TEST"

while True:
    incoming=radio.receive()
    if button_a.is_pressed():
      radio.send(message)
      display.scroll("Sent")
    if incoming is not None:
        display.scroll(incoming)



The game is over when the Treasure Hunters find the treasure.

  • Sign in to reply

Top Comments

  • mikedavis
    mikedavis over 7 years ago in reply to neilk +1
    Yep, it works really well. This fits into our piece on communication between devices.
  • mikedavis
    mikedavis over 7 years ago in reply to neilk

    Yep, it works really well.  This fits into our piece on communication between devices.

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • neilk
    neilk over 7 years ago

    Another great idea image. Is this one working?

     

    Neil

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • genebren
    genebren over 7 years ago

    Sounds like a fun little app/game.  I really like that there are fun ways for kids to learn more about programming.

    Gene

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube