Materials
-
micro:bit Step Counter Activity
https://microbit.org/projects/make-it-code-it/step-counter/ -
Step counter introduction video
https://youtu.be/bSANf_njTSk?si=SOehJaW1su3_HO19 -
Step counter coding
https://youtu.be/PI0L19vbhtc?si=oaqMSXX8jy-ymYJw -
Example MakeCode
https://makecode.microbit.org/#pub:_E6uhUWKEqL1L
Activity Instructions
- Introduce the Activity, Discuss:
- Have you ever used a smartwatch or fitness tracker?
- How does it know how many steps you take?
- Today, you’re going to build your own step counter using the BBC micro:bit
- Introduce the Concept
- The micro:bit has a motion sensor called an accelerometer.
- It can detect movement—like when your foot steps. We’ll use that movement to count steps.
- Optional: Watch the accelerometer video from BBC micro:bit
- Build the Code
- Walk students through creating the code or use the provided link to share the completed code with students.
- Model in MakeCode
- Download and Test the Step Counter
- Students should:
- Download their code to their micro:bit
- The micro:bit can be worn or held while walking to detect steps
- If attaching the micro:bit to their body use a shoe, ankle, sock, etc.
- Walk around
- TIP: have students mentally count their steps to use to verify their micro:bit data steps
- Analyze Accuracy, discuss:
- Does it count steps accurately?
- Did it count every step?
- Did it overcount or undercount?
- Introduce the Activity, Discuss:
- Have you ever used a smartwatch or fitness tracker?
- How does it know how many steps you take?
- Today, you’re going to build your own step counter using the BBC micro:bit
- Introduce the Concept
- The micro:bit has a motion sensor called an accelerometer.
- It can detect movement—like when your foot steps. We’ll use that movement to count steps.
- Optional: Watch the accelerometer video from BBC micro:bit
- Build the Code
- Walk students through creating the code or use the provided link to share the completed code with students.
- Model in MakeCode
- Download and Test the Step Counter
- Students should:
- Download their code to their micro:bit
- The micro:bit can be worn or held while walking to detect steps
- If attaching the micro:bit to their body use a shoe, ankle, sock, etc.
- Walk around
- TIP: have students mentally count their steps to use to verify their micro:bit data steps
- Students should:
- Analyze Accuracy, discuss:
- Does it count steps accurately?
- Did it count every step?
- Did it overcount or undercount?
- Introduce the Activity, Discuss:
- Have you ever used a smartwatch or fitness tracker?
- How does it know how many steps you take?
- Today, you’re going to build your own step counter using the BBC micro:bit
- Introduce the Concept
- The micro:bit has a motion sensor called an accelerometer.
- It can detect movement—like when your foot steps. We’ll use that movement to count steps.
- Optional: Watch the accelerometer video from BBC micro:bit
- Build the Code
- Walk students through creating the code or use the provided link to share the completed code with students.
- Model in MakeCode
- Download and Test the Step Counter
- Students should:
- Download their code to their micro:bit
- The micro:bit can be worn or held while walking to detect steps
- If attaching the micro:bit to their body use a shoe, ankle, sock, etc.
- Walk around
- TIP: have students mentally count their steps to use to verify their micro:bit data steps
- Students should:
- Analyze Accuracy, discuss:
- Does it count steps accurately?
- Did it count every step?
- Did it overcount or undercount?
Assessment Opportunities
Reflection:
- What was the input in your program?
- What did the variable do?
- How accurate was your device?
Reflection:
- What was the input in your program?
- What did the variable do?
- How accurate was your device?
Reflection:
- What was the input in your program?
- What did the variable do?
- How accurate was your device?
Extension Opportunities
- Show steps only when a button is pressed
- Multiply steps by 2 if undercounting
- Calculate distance traveled
- Show steps only when a button is pressed
- Multiply steps by 2 if undercounting
- Calculate distance traveled
- Show steps only when a button is pressed
- Multiply steps by 2 if undercounting
- Calculate distance traveled