You will create and program different “actions.” You will create an action for a “rest” motion and a “wave” motion. By the end of this lesson, you will be able to:
- Describe the key features of the CreateAI Data Sample page
- Create a dataset using the micro:bit
- List the total number of samples in my dataset
- Describe the type of data collected, how it was measured, and units of measurement
- Describe patterns in collected data samples, including outliers
Follow the tutorial below to get a better understanding of CreateAI!
Connect micro:bit to CreateAI
First, we need to establish a connection between our micro:bit and CreateAI.
Start a New Session
Connect with USB
Power with CHARGE
Pair via Bluetooth
Now that we have connected our Micro:bit, we are ready to start collecting data. We will begin by creating different “actions” in CreateAI, for this project we will be creating a “wave” and “rest” action.
Then we will provide unique sample data for each action. The more sample data you give to each action, the more accurate your model will be! As you create these actions, the Micro:bit will sense itself moving in three directions (X, Y, and Z); you’ll see that reflected in the live data graph.

Follow the instructions below for each action you want to create. NOTE: the more actions you have, the harder it will be for you model to differentiate between them; make sure you provide each unique “action” with plenty of sample data.
Create a New Action
Record Sample Movement
Add More Actions
Extra Steps: Improve Your Model
- Add New Actions: Create different actions for the micro:bit to learn. Try increasing speed or direction.
- Increase Accuracy: As you increase the amount of actions your AI will have a more difficult time discerning between them. See how accurate you can make your model by adding additional readings to your model.
- Look at the live data graph as you perform different types of waves. Perform a “Wild Wave”—change your speed and hand height constantly.
- How did the shape of the distribution change on the graph?
- If you trained an AI on a “Normal Wave,” why might it struggle to recognize your “Wild Wave”? (Hint: Think about the consistency of the pattern.)
Learning Assessment
Once you have programmed your machine learning model, use these questions to help reinforce your understanding! If you get stuck, scroll down to see the sample answers.
1. Define the “action” element and how many actions are required.
2. Define the “data samples” element. How many data samples are required in an action?
3. For each action, list how many data samples (observations) you trained. What is the total number of data samples (observations) in your model?
4. What is being measured (the attribute)?
5. How was it measured?
6. What is the unit of measurement?
7. Look at all of the data samples in one action and identify any patterns you notice.
8. Are there any large gaps or missing data in the collected data? Why, or why not?
9. Are the data samples consistent? Are there any outliers (striking deviations)? Why, or why not?
Sample Answers
1. Define the “action” element and how many actions are required.
Sample answer: An action is a type of movement for CreateAI to recognize (like a category). At least 2 actions are required.
2. Define the “data samples” element. How many data samples are required in an action?
Sample answer: A data sample is a short recording of movement (X, Y, Z) data lasting 1 second. At least 3 data samples are required for each action.
3. For each action, list how many data samples (observations) you trained. What is the total number of data samples (observations) in your model?
Sample answer:
4. What is being measured (the attribute)?
Sample answer: The actions: rest, wave.
5. How was it measured?
Sample answer: Data samples of the micro:bit accelerometer.
6. What is the unit of measurement?
Sample answer: X, Y, Z movement in one second.
7. Look at all of the data samples in one action and identify any patterns you notice.
Example of a pattern: The student consistently waves in a similar manner across all data samples. All of the graphs look similar, but may be shifted slightly (for example, starting left-to-right vs. right-to-left). Students may observe other connections between how they physically move the micro:bit and the resulting graph.
8. Are there any large gaps or missing data in the collected data? Why, or why not?
Sample answer: Large gap: the student is not moving while recording data, so their graph has large gaps in the X, Y, and Z axes. The range for all three axes is very small. Another example: side-to-side waving (X) may produce a larger spread on one axis than the others.
9. Are the data samples consistent? Are there any outliers (striking deviations)? Why, or why not?
Example of a data outlier: The student recorded an action for “rest” and then began moving. They can remove the outlier to clean the data. Removing outliers can improve the effectiveness of the machine learning model.