Micro:bit Wireless Trivia Buzzer System

Document created by teachontario.team on Aug 30, 2019Last modified by lisafloyd on Sep 2, 2019
Version 3Show Document
  • View in full screen mode

 

By Christian Landy

 

Students often enjoy playing trivia style games for consolidating and solidifying understanding of course content. The micro:bit, which is prevalent in the global education community and is now available in many schools, can add a physical dimension to trivia games, and can provide students with an opportunity to program digital learning tools that they can use within their classrooms.

 

Christian Landy, a newly qualified teacher and recently hired Occasional Teacher in the Thames Valley District School Board (TVDSB), has shared his trivia game idea, as well as the code for students and their teacher to upload onto micro:bits. The code, which Christian has created using the block editor in MakeCode.com, programs micro:bits to become a buzzer system for a trivia game, complete with a game master and contestants.

 

Below, you will find the code explained as well as some tips, constraints, additional challenges for students and the process Christian went through as he tested, debugged and retested his program. In order to use this buzzer system for your trivia game, you will need at least three micro:bits – one for the master micro:bit to reset everyone’s buzzers and the others for team members to buzz in when they want to submit their response. You can have as many “buzzers” as you wish, but it is recommended to have students working in teams as they buzz in to answer. The micro:bits will communicate wirelessly to one another, so they can be dispersed around the classroom once the code is uploaded.

 

Let us know if you try out Christian’s buzzer system when you play your next in-class trivia game or are practicing for your next Reach for the Top competition!

 

Find the link to the micro:bit code here.  

 

After opening the above link in your web browser, click on the Edit button to view and then edit the code.

 

 Edit button circled on microbit page as a screenshot

 

 

Instructions for compiling and uploading the code onto the micro:bit can be found here.  

 

Objectives:  Create a set of wireless trivia buzzers for class trivia competitions and make the buzzer system open to modification by students (e.g., clearly lay out code and document well).  Keep the coding exclusively on the micro:bit MakeCode block editor (no JavaScript) to keep the barrier of entry lower for students trying to understand the code.

 

Constraints:  In creating this system, I wanted it to be easy to implement, hence I wanted all of the micro:bits to be running the same code. This makes it easier for the user to upload the code onto each micro:bit and also cuts down on the potential for misplacing the game master micro:bit. At the same time, it makes the code a little trickier to create and understand as each micro:bit can potentially express one of two different roles (Quiz Master and Contestant).

 

I also wanted to create a system that was less prone to being hacked accidentally or intentionally by students (e.g., restarting their micro:bits and then making their device an additional game master mid game -- hijacking the game).  Hence, I decided to put a check in place that would keep them from doing this. The check that I created was to not allow any micro:bit to be set as the game master until they had checked that there was at least one other micro:bit with the potential to be the game master. When a game is in session, there are no active micro:bits that can become the game master. Also, two micro:bits would have to be reset simultaneously in order to try to overcome this check (which is unlikely). 

 

 

Important Things Learned:

 

  1. Only have one micro:bit attached to the computer when loading code. The computer (Windows 10) may encounter errors otherwise. That being said, the computer can be used to power multiple micro:bits once the code has been loaded or make use of the batteries for power.
  2. The micro:bit serial numbers can be negative. I was both surprised and lucky to find this out in testing. I encountered behaviour that I could not understand and then decided to print the serial number of one micro:bit to the screen. When I learned that it was negative, I had to modify the code to work with negative numbers as well. I was lucky to have been testing with one micro:bit that had a negative serial number because, if I hadn’t been, this error would have likely gone unnoticed for a while.
  3. Debugging software is a way of checking for errors or potential sources of error. It is important to debug thoroughly and regularly. If you make a lot of changes to code without debugging in between, then finding and correcting the errors can be a much more difficult task.
  4. In trying to pinpoint where things may be going wrong in your code, it is useful to have a copy of the code in front of you while testing on the micro:bits. You can look at what information the micro:bits are giving you and then work backwards to where things may be going wrong in your code. Using the Show code blocks (e.g., Show Number) can help you see what values are currently held in variables and improve your debugging practices.

 

Supporting videos:

 

 

 

 

 

 

 

Additional Challenges/Extensions for Students: 

 

  1. Get students to create personalized buzzer sounds that ring when their buzzer comes in first. For this challenge I would suggest having the game master connected to a speaker and not each individual micro:bit.   
  2. Get students to create a system that lets the game master mark each question as correct or false when answered. This evaluation could be communicated to the individual micro:bit so that students can see the number of questions they have answered correctly on their own micro:bit.
  3. Program the main micro:bit to receive information as to which team has buzzed in – very tricky!

 

Enjoy!

 

Christian Landy is an Occasional Teacher within the Thames Valley District School Board. He loves to teach about STEM and also to experiment with coding and technology. He recently graduated with distinction from the University of Western Ontario's Bachelor of Education program. Previous to this, he completed a Master of Science at the University of Guelph, using custom code run on supercomputers to answer research questions related to evolutionary biology.

 

Attachments

    Outcomes