Physical Literacy & Coding – MicroBit Step Counter

0
Physical Literacy & Coding - MicroBit Step Counter
Tweet about this on TwitterShare on FacebookPin on PinterestShare on LinkedInShare on Google+Share on TumblrEmail this to someoneShare on StumbleUponShare on RedditDigg this

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.

 

Tweet about this on TwitterShare on FacebookPin on PinterestShare on LinkedInShare on Google+Share on TumblrEmail this to someoneShare on StumbleUponShare on RedditDigg this
(Visited 317 times, 1 visits today)

Leave a Reply

Name
Name*
Email
Email *
Website
Website