Step 1: Introduce it
First, watch the video
If you have not completed Tracking our physical activity as part of the playground survey, you can watch the BBC video to learn how the program on the micro:bit was trained using machine learning.
Or go straight to BBC Teach to watch the machine learning video and download the complete set of playground survey teacher instructions.

How it works
- In Tracking our physical activity, the micro:bit used its accelerometer with a machine learning model to estimate movements children did in the playground.
- We used lots of movement data samples from children to train this model.
- In this session, your class will work together to collect movement data samples to train your own machine learning model.

What you need
- a computer with the micro:bit machine learning tool website ready to use, ideally on a large screen
- 1 USB data lead
- 2 micro:bits
- 1 battery pack, 1 flexible micro:bit holder and 1 wearable strap (holders and straps are included in your BBC micro:bit - the next gen free pack)
Watch the video below to see how to attach the wearable strap to the micro:bit using the flexible micro:bit holder:
Step 2: Use the machine learning tool
Watch the 'how to' video on the tool page, then select ‘Start new session’ at the bottom of the page and follow the on-screen instructions to connect your micro:bits and train your model to recognise when a pupil is clapping or waving.
See BBC Teach guide for instructions on running the class session.
Step 3: Improve your model

Is your model not sure of a movement?
Try adding more data to help. Make sure your data samples are as 'clean' as possible. Start doing the movement before pressing record and carry on moving until after the recording stops.
Is your model confusing 2 movements?
If the movements are similar, it may have trouble detecting them. Try changing one of the movements to something that looks very different. Delete one set of movements and record new samples for the new movement.
Is your model missing some data?
Your model will only be able to estimate movements it has 'learned' from the data you give it. Try adding 'still' data to help it know when you are not doing these movements.
Make sure you re-train your model each time to add or change data samples.