A COVID-19 Participatory Simulation Classroom Activity Using Micro:bits

by DavidP56 in Teachers > 8

1165 Views, 8 Favorites, 0 Comments

A COVID-19 Participatory Simulation Classroom Activity Using Micro:bits

microbits.jpg

The original idea

This classroom activity is based on a participatory simulation, where a group of learners participates in a simulation of the spread of COVID-19 using micro:bits. The idea is based on research that was done for a Master's thesis by Vanessa Colella at MIT in the late 90s using specialist hardware (supervised by Mitch Resnick of Scratch fame). This version uses the easily accessible and affordable micro:bit, taking advantage of the radio channel communication feature.

Learning outcomes

There are two aspects to the learning outcomes from this activity. Some are related to the technology of the micro:bit (these are introductory and not the main focus of the learning)

At the end of this activity, the learner will:

  • Have experienced the use of the micro:bit radio communication channel and seen how it can be included in code in the MakeCode editor
  • Have seen how the radio channel and strength can be configured in the code
  • Be able to connect (and disconnect) a micro:bit to a battery pack
  • Be able to interact with a micro:bit using input and output channels

Other learning outcomes are related to exploring aspects of the spread of disease, and these are the main goals of the learning

At the end of this activity the learner will:

  • Have experienced the different outcomes of disease spread based on social distancing
  • Have experienced the different outcomes of disease spread based on the infectiousness of the disease variant
  • Have experienced the importance of contact tracing mechanisms in controlling the spread of disease
  • Have discussed the impact of the activity on their perceptions of how infectious diseases such as COVID-19 may be managed

Supplies

For this activity you will need:

  • A computer running the MakeCode editor: https://makecode.microbit.org/
  • A class set of micro:bits (can be version 1 or version 2), enough for each learner to have their own device
  • A battery pack for each micro:bit
  • At least one micro:bit USB cable
  • A screen large enough to show the class some code
  • A large enough space for the group to be able to socially distance

How the Participatory Simulation Works

COVID state machine (2).png

The basic idea behind this participatory simulation is that each member of the class role plays a person who does not have COVID-19 but is exposed to possible infection in a series of different scenarios. These scenarios are intended to give participants a concrete experience of the impacts of issues such as social distancing, more infectious disease variants, and the importance of contact tracing.

The implementation

The implementation of the simulation is based on using the radio transmitter/receiver built into the micro:bit. The facilitator of the class has a micro:bit that is already "infected" and can send out radio signals to simulate an infected person being in close contact with others. The learners in the simulation have micro:bits that may receive those signals and, if they do, may themselves become infectious. The signals send random numbers, which are potentially matched by random numbers generated by the receivers. The unpredictability of random numbers, combined with variations in signal power and physical behavior combine to create a reasonably realistic simulation of the spread of COVID-19 in different scenarios.

The state transition diagram above shows the different states that the micro:bits used by the class can go through during the simulation.

Creating the MakeCode Projects

projects.jpg

To prepare for this activity you need to create two different projects in the MakeCode editor.

  1. "COVID Carrier" - This project will contain the code for a micro:bit that represents a person who is already infected with COVID-19.
  2. "COVID Person At Risk" - This project will contain the code for all the other micro:bits in the simulation, representing people who are not yet infected with COVID-19.

Follow these instructions to create these two projects (we will start adding code to them in the next step)

  1. Open the MakeCode editor at https://makecode.microbit.org/
  2. Click on the "New Project" button and name the project "COVID Carrier". This will open the project, but don't do anything to the code just yet.
  3. Click on the "micro:bit" link (top left of the editor) to take you back to the front page that lists your projects
  4. Add another new project called "COVID Person At Risk"
  5. Click on the "micro:bit" link again to take you back to the front page. You should now see both projects listed (as in the picture above)

Coding the COVID Carrier

covid carrier.jpg

Adding blocks to the COVID Carrier project

There are two different blocks of code that need to be added to the "COVID Carrier" project. These have the following tasks:

  1. To initialize the LED display, set up the radio channel (transmit power and group) and set a variable counter ("sneezes") that will count possible COVID transmission events.
  2. To respond to button A being pressed on the micro:bit by sending out a random number to the radio channel, up to a maximum of ten button presses. After ten presses no more radio signals are sent and the LED display changes to a skull icon to indicate that the virus in dead.

You can see the code in the image above, and also in this shared project file

https://makecode.microbit.org/_6211XEK4q0Ew

Not that the radio transmit power is set initially to 1. If you are working with a small group in a small space you can set this to 0 (the minimum). For a large group in a large space you might set this to 2. The power value will impact on how far away surrounding micro:bits can receive signals.

Note also that the radio group number has been set to 1. It doesn't matter what this value is (the possible range is 0 to 255) but it is essential that all the micro:bits used in the simulation are set to the same radio group number so they can communicate with each other.

Coding the COVID Person at Risk

covid person at risk.jpg

Adding blocks to the COVID Person At Risk project

There are three different blocks of code that need to be added to the "COVID Person At Risk" project. These have the following tasks:

  1. to initialize the LED display, set up the radio channel, set a variable counter ("sneezes") that will count possible COVID transmission events and another variable ("hasCovid") that checks if the device has been infected.
  2. To respond to receiving a random number via a radio transmission by generating another random number. If the two numbers match then the micro:bit transitions into a "hasCovid" state. After a few seconds it is then able to spread the infection to other micro:bits
  3. To respond to button A being pressed on the micro:bit by sending out a random number to the radio channel, up to a maximum of ten button presses, if the micro:bit is infected (otherwise button A has no effect)

You will note that Task 1 is similar to Task 1 for the COVID Carrier project, while Task 3 is similar to the previous Task 2. The main difference is taking account of the "hasCovid" variable. Task 2 is different as it means the micro:bit can check any received radio messages to see if it has been infected by a COVID exposure event

You can see the code in the image above, and also in this shared project file

https://makecode.microbit.org/_LjiEzAAxKCVM

Preparing the Micro:bits

covid.jpg
tick.jpg

To run the class you need to have set up all the required micro:bits with pre-loaded code before the start of the session.

  1. Load the "COVID Carrier" code onto one micro:bit. You may find it helpful to also create a backup using a micro:bit of a different color for the final simulation.
  2. Load the "COVID Person At Risk" code onto as many micro:bits as you need for the number of participants. Each person needs their own micro:bit (with battery pack).

It is easy to check which code has been loaded on to a micro:bit by connecting it to a battery pack. A "COVID Carrier" micro:bit will show a COVID virus icon, while a "COVID Person At Risk" will show a tick icon

Running the Class

Once all the micro:bits are set up, the steps I have used so far to run the classroom session are as follows:

Intro

  1. Give a brief introduction to participatory simulations, and this one in particular - why are we doing this? What are the hoped-for learning outcomes?
  2. Explain the basics of the micro:bit, then ask each leaner to collect a micro:bit loaded with the "COVID Person At Risk" code and a battery pack, and connect them together. Explain that the tick icon means they are not "infected" with COVID.

Simulation 1 - lack of social distancing

  1. Ask everyone to gather around you closely to simulate lack of social distancing (you need to have the micro:bit that has been loaded with the "COVID Carrier" code).
  2. When a micro:bit is infected, it first scrolls a message before showing the COVID-19 icon. Peprare the learners to look out for this message.
  3. Press button A on your micro:bit up to 10 times (wait a few seconds between each press, and explain that each press is a possible infectious contact) and see how many other micro:bits have become infected.
  4. Encourage those who are infected to start pressing button A on their micro:bits too, to see how far the infection will spread. The outcome should be that many of the participants find their devices are infected after a short period of time.
  5. If you press button A 10 times and no other devices are infected (random numbers and radio signals are unpredictable), just press the reset button on the back of the micro:bit and start again until at least one other device is infected.

Simulation 2 - Social Distancing

  1. Ask the participants to reset their micro:bits to their initial (uninfected) state by pressing the reset button on the back of the micro:bit. Check that everyone's micro:bit is now showing the tick icon.
  2. Repeat the process as for simulation 1, but this time ask the participants to space themselves out as much as possible.
  3. You should find that the infection spreads much more slowly. Discuss this with the group.

Simulation 3 - More Transmissible Variant

  1. Open up the MakeCode editor on a computer connected to a screen large enough for everyone to see
  2. Connect the "COVID Carrier" micro:bit using the USB cable
  3. Draw the attention of the participants to the code block that sets the power of the radio signal. Initially you will have set this to 0, 1 or 2, depending on the size of the space and the number of participants.
  4. Change the value to 7 (the maximum radio power) and then download the updated code to the micro:bit - explain why you are doing this (to simulate a disease variant that can infect over larger distances) and how it will impact on the simulation.
  5. Repeat the social distancing simulation (simulation 2). You should find that the infection spreads more quickly even with social distancing.
  6. Note that there is no time to change everyone's radio power setting, but just changing the teacher's device has a significant impact on the simulation.

Simulation 4 - Importance of Contact Tracing

  1. Ask all the participants to disconnect their micro:bits from their battery packs
  2. Ask them to keep hold of their battery packs, but to pool their micro:bits together on a table (or other suitable surface).
  3. Once all the participants' micro:bits are on the table, add in your "COVID Carrier" micro:bit and shuffle the micro:bits so that no-one can tell which one is the COVID Carrier (since they are all disconnected from the battery packs the LEDs will not be showing any icons).
  4. Note: micro:bits come in different colors. It may be the case that some of the participants have noted the color of the micro:bit that you have been using. You can avoid this by having a second "COVID Carrier" micro:bit of a different color prepared that can go into the pool instead of the one you have been using so far.
  5. Explain that we are now going to simulate a situation where no-one knows who is "patient zero". Ask the participants to come and get one of the micro:bits and plug in their battery pack, being sure not to show anyone else their LED screen so that no-one sees who has the "COVID Carrier" micro:bit.
  6. Once everyone is ready, ask them to move around the room. Explain that the person who "has COVID" should secretly press button A as they move around the room.
  7. It is important to mention to the participants that if they try to hide the screen by enclosing the whole micro:bit in their hand, then they will block out the radio signal. Tell them that they need to avoid covering the top left hand corner of the micro:bit (where the radio is) so the signals can still be sent/received
  8. After a few minutes, ask whose device has contracted COVID-19 and if they think they know who infected it. Usually, they have no idea, or make incorrect guesses.
  9. Conclude the simulation by indicating that it is intended to illustrate how important contact tracing is in managing COVID-19.

Wrap Up

At the end of the simulations, open the class up for discussion. The following prompt questions may be useful for starting conversations:

  • Did the activities lead to you having any new thoughts about the ways that COVID is transmitted and managed?
  • Are there aspects of the simulation that could be improved or added?
  • Are there other real-world contexts that you think could be usefully explored using participatory simulation?
  • Can you think of any other learning activities that could use a similar technique (of radio communication between multiple micro:bits)?
  • Do you think that simulations like this have general educational value?

A good follow up task would be to have students create and run their own participatory simulations, or other radio-based learning experiences with the micro:bit.