Make a Wearable Pedometer With Micro:bit
by ElecFreaks in Circuits > Electronics
123 Views, 0 Favorites, 0 Comments
Make a Wearable Pedometer With Micro:bit
![fp.jpg](/proxy/?url=https://content.instructables.com/FMT/SAXZ/JCGK7MUB/FMTSAXZJCGK7MUB.jpg&filename=fp.jpg)
Introduction
Micro:bit has integrated accelerometer on the board. With this accelerometer, we can realize pedometer function by shaking our hands. If we combine it with a button battery, then a simple pedometer is created!
Tools&Materials:
![1.jpg](/proxy/?url=https://content.instructables.com/FPC/JYB8/JDCBPR5Q/FPCJYB8JDCBPR5Q.jpg&filename=1.jpg)
1 x ELECFREAKS Power:bit For Micro:bit
1 x BBC Micro:bit Board for Coding & Programming
1 x Acrylic Base Board
1 x Watch Band
7 x 3*5 Screws
Hardware Introduction
![1.png](/proxy/?url=https://content.instructables.com/FM8/009H/JDCBPR5Y/FM8009HJDCBPR5Y.png&filename=1.png)
ELECFREAKS Power:bit is a kind of micro:bit extension board with minimum size. It is powered by two 2025/2032 button batteries and carries a buzzer on the board.
You can refer to the picture below to cut your acrylic board.
How to Make
![2.jpg](/proxy/?url=https://content.instructables.com/FZ1/Q5M9/JDCBPTAJ/FZ1Q5M9JDCBPTAJ.jpg&filename=2.jpg)
![3.jpg](/proxy/?url=https://content.instructables.com/F5M/XOPC/JDCBPTAK/F5MXOPCJDCBPTAK.jpg&filename=3.jpg)
![4.jpg](/proxy/?url=https://content.instructables.com/F71/K4QM/JDCBPTAN/F71K4QMJDCBPTAN.jpg&filename=4.jpg)
Firstly, fix your micro:bit onto power:bit.
Then use 2 screws to fix the acrylic base board onto power:bit.
Programming
![5.png](/proxy/?url=https://content.instructables.com/F4P/HHGA/JDCBPTCY/F4PHHGAJDCBPTCY.png&filename=5.png)
![6.png](/proxy/?url=https://content.instructables.com/FCU/71IU/JDCBPTD1/FCU71IUJDCBPTD1.png&filename=6.png)
![7.png](/proxy/?url=https://content.instructables.com/F3M/VCAJ/JDCBPTD3/F3MVCAJJDCBPTD3.png&filename=7.png)
Click to open Microsoft Makecode, write your code in the editor area.
Click Edit in the upper right corner to edit your program, then click Download in the bottom to save your code into micro:bit.
Code Explain
Set start image and initialize the count.
When a vibration is detected, the count number will increase 1.
Press button A to display the count number of your foot steps.
Succeed
Now you have create a pedometer by your own. Let's try it!
Source
This article is from: https://www.elecfreaks.com/12298.html
If you have any questions, you can contact: louise@elecfreaks.com.