|
|
# Fitness Tracker
|
|
|
## Lab Description
|
|
|
# Fitness Tracker Activity
|
|
|
|
|
|
### Estimated Time: 1 Hour
|
|
|
|
|
|
### Description
|
|
|
You will have the opportunity to mimic data interception from a fitness tracker using radio signals. After gathering data from your partner, you will be able to interpret and graph the results using simple techniques. From the interpreted data, you will be able to tell what kind of activities your partner is doing.
|
|
|
|
|
|
### Prerequisite Skills
|
|
|
### Step 0: The Basics
|
|
|
* Micro::Bit Coding Options
|
|
|
* [Click here to code with JavaScript/Blocks] (https://makecode.microbit.org)
|
|
|
* [Click here to code with MicroPython](https://python.microbit.org)
|
|
|
* Radio Signal Basics
|
|
|
* [Click here for information on radio signals](https://www.infoplease.com/encyclopedia/science-and-technology/computers-and-electrical-engineering/electrical-engineering/radio/transmission-and-reception-of-radio-waves)
|
|
|
* [Click here for Micro::Bit radio basics](https://makecode.microbit.org/reference/radio)
|
... | ... | @@ -14,25 +14,44 @@ You will have the opportunity to mimic data interception from a fitness tracker |
|
|
* [Click here for Micro::Bit serial basics](https://makecode.microbit.org/device/serial)
|
|
|
* Basic Math Skills
|
|
|
* We will be finding the acceleration in 3 different directions: x, y, and z.
|
|
|
* To find the total acceleration, you need the following equation: $\sqrt{x^2+y^2+z^2}$
|
|
|
|
|
|
### Learned Skills
|
|
|
* Radio signal basics
|
|
|
* Data-interception topics
|
|
|
* Encryption ideas
|
|
|
* To find the total acceleration, you need the following equation: $`Acceleration = \sqrt{x^2+y^2+z^2}`$
|
|
|
|
|
|
|
|
|
### Materials
|
|
|
### Step 1: Gather Materials
|
|
|
* Micro::Bit (1 per person / 2 per team)
|
|
|
* Micro-USB Cable
|
|
|
* Battery Pack (Equivalent to two AA batteries);
|
|
|
* Battery Pack (Equivalent to two AA batteries)
|
|
|
|
|
|
### Step 2: Get Familiar With Fitness Trackers
|
|
|
_03-talk about the most important remote control concept they need to know about super concisely_
|
|
|
|
|
|
_04-include the most absolute most basic code example you can think of_
|
|
|
|
|
|
|
|
|
### Step 3: Download The Files
|
|
|
* Download (click on) the following file to get started: _05-include directory here (called FitTrackLab.zip)_
|
|
|
|
|
|
* Unzip FitTrack.zip (right click on the FitTrackLab.zip and select "extract all". Then, just pick where you want to save your copy of these files). Notice there are three folders/directories in FitTrackLab:
|
|
|
* **HexFiles**: This folder/directory holds all of the .hex files, or files that are ready to be run on a Micro::Bit.
|
|
|
* **JavaScript**: This folder/directory holds all of the JavaScript code for the labs. This includes base code and completed code. The base code is code that you can start with instead of creating new projects from scratch. Completed code is code that members of the CEDAR lab completed that you can look at if you get stuck.
|
|
|
* **Python**: This folder/directory holds all of the Python code for the labs. This also includes base code and completed code.
|
|
|
|
|
|
![files_new](/uploads/db7d5badc4c093fab35c294881ace7e4/files_new.PNG)
|
|
|
|
|
|
### Step 4: Open your editor.
|
|
|
* For JavaScript/Blocks, you will use the Micro::Bit online editor: [MakeCode](https://makecode.microbit.org/). Here, you can switch back and forth between JavaScript and Blocks by clicking on the button/slider in the top center of the screen.
|
|
|
|
|
|
![blocks](/uploads/7061a5064100caa0790c714bdb1182c1/blocks.PNG)
|
|
|
|
|
|
* For Python, you can use Mu ([click here to see Mu]()) or the online editor ([click here to get to the online editor]())
|
|
|
|
|
|
### Potential Issues
|
|
|
* Python must be downloaded on your computer to run serial_reader.py. You can still complete this lab without serial_reader.py with a chrome extension [here](https://chrome.google.com/webstore/detail/serial-monitor/ohncdkkhephpakbbecnkclhjkmbjnmlo?hl=en).
|
|
|
* It is ideal to have teams of 2, however teams of 3 work well too.
|
|
|
|
|
|
## Instructions
|
|
|
|
|
|
### Lab Instructions
|
|
|
### Step 5: Flash the base code.
|
|
|
If you don't remember how to flash code to your Micro::Bit, see the instructions [here](how-to-flash).
|
|
|
|
|
|
### Step 6: Programming!
|
|
|
1) Read through the links under the prerequisite skills section. This will enable you to understand the basics of the lab. You want to be able to answer the following questions ([answers here]()):
|
|
|
|
|
|
* If someone sends a message over radio waves, who can access that message?
|
... | ... | @@ -83,21 +102,5 @@ You will have the opportunity to mimic data interception from a fitness tracker |
|
|
|
|
|
12) To graph the data, highlight the D column and click on the graph button. Some adjustments can be made to make the data easier to read, but the default is simply the total acceleration, ideal for showing different activities.
|
|
|
|
|
|
### Programming Instructions
|
|
|
1) Start coding by pulling up the base code. There are two languages to choose from, Javascript and Python and they both work the same. To pull up the base code, [click here]().
|
|
|
|
|
|
|
|
|
|
|
|
## JavaScript Code
|
|
|
|
|
|
### Base Code
|
|
|
|
|
|
### Completed Code
|
|
|
|
|
|
## Python Code
|
|
|
|
|
|
### [Python] Base Code
|
|
|
|
|
|
### [Python] Completed Code
|
|
|
|
|
|
|
|
|
### Step 7: Further Exploration
|
|
|
_07-2 or 3 thoughts for other things they could further their work with_ |
|
|
\ No newline at end of file |