Physical Literacy & Coding – MicroBit Step Counter

0
Physical Literacy & Coding - MicroBit Step Counter

In this challenge we are going to code the MicroBit to track steps.

 

Using the OnShake command, the Micro:Bit can detect movement. First you will want to create a variable. I called my “steps”. You’ll see from the screenshot below that I increment “steps” by one every time the device detects movement. I also use A button input to reset and B button input to display the total number of steps at anytime.

 

screen-shot-2016-09-09-at-1-28-10-pm

To see it in action, check out the video below.

 

For more lessons, activities and ideas, grab a copy of my book, Code Breaker, on Amazon here!

(Visited 2,108 times, 1 visits today)

Leave a Reply

Name
Name*
Email
Email *
Website
Website