... | ... | @@ -106,50 +106,46 @@ If you don't remember how to flash code to your Micro::Bit, see the instructions |
|
|
* What method do you use to run a block of code every time data is received?
|
|
|
* How do you find the total acceleration from the x-acceleration, y-acceleration, and z-acceleration?
|
|
|
|
|
|
2) Read the **running instructions** below to get an idea of how the final program should work.
|
|
|
|
|
|
3) Follow the instructions in the Python or Javascript fitTrack_base file to complete the program
|
|
|
|
|
|
4) Find a partner that programmed their Micro::Bit in the same language as you (so if you used JavaScript, find someone who also used JavaScript).
|
|
|
|
|
|
5) Begin by choosing who will be the tracker and who will be the hacker. The tracker will be the user of a fitness tracker. They will use their Micro::Bit to collect data about their movements. The other partner, the hacker, will obtain their data. See the **running instructions** for how to run the experiment.
|
|
|
|
|
|
6) Follow the **running instructions** to run the program and analyze the data. These instructions will explain how to graph the data. From the graph, the hacker should make a guess about the activities that the tracker was doing (walking, running, jumping, and so on).
|
|
|
5) Begin by choosing who will be the tracker and who will be the hacker. The tracker will be the user of a fitness tracker. They will use their Micro::Bit to collect data about their movements. The other partner, the hacker, will obtain their data.
|
|
|
|
|
|
7) Switch hacker and tracker roles and run again. After analyzing the data, have the new hacker make a guess about the activities of the new tracker.
|
|
|
6) Load your code onto your Micro::Bits. A check mark will appear to show the Micro::Bits are ready.
|
|
|
|
|
|
8) Chat with your partner about the issues with wireless data transmission. What are some potential solutions to these problems? Can you think of a simple encryption solution that allows you to mask the data being sent? Can you reverse the encryption to use the data?
|
|
|
7) Run the program and analyze the data. The instructions below will explain how to graph the data. From the graph, the hacker should make a guess about the activities that the tracker was doing (walking, running, jumping, and so on).
|
|
|
|
|
|
* Double click on serial_reader.py in the code directory (recommended) or use the chrome extension: [here](https://chrome.google.com/webstore/detail/serial-monitor/ohncdkkhephpakbbecnkclhjkmbjnmlo?hl=en).
|
|
|
|
|
|
9) With your partner, employ a solution in your code. Run the experiment one last time and to see if your solution worked. What worked well in your solution? How could your solution be improved?
|
|
|
* If you are using the chrome extension, launch the application and select the appropriate COM port (if you only have one device plugged in there will only be one option). Select a Baud Rate of 115200 and click on connect.
|
|
|
|
|
|
### Running Instructions
|
|
|
1) Designate 1 Micro::Bit as the receiver and 1 as the fitness tracker, both will have the same program written to them. However, one must be plugged into the computer to receive the data.
|
|
|
* To start gathering data, hit the A button on the fitness tracker and a heart will appear.
|
|
|
|
|
|
2) A check mark will appear to show the Micro::Bits are ready.
|
|
|
* To stop gathering data, hit the B button on the fitness tracker and the check mark will reappear.
|
|
|
|
|
|
3) Double click on serial_reader.py in the code directory (recommended) or use the chrome extension: [here](https://chrome.google.com/webstore/detail/serial-monitor/ohncdkkhephpakbbecnkclhjkmbjnmlo?hl=en).
|
|
|
* When you are done sending data, hit the A and B buttons at the same time to finish and a happy face will appear.
|
|
|
|
|
|
4) If you are using the chrome extension, launch the application and select the appropriate COM port (if you only have one device plugged in there will only be one option). Select a Baud Rate of 115200 and click on connect.
|
|
|
* If you used serial_reader.py, a graph of the data will automatically plot. If you used the chrome extension, continue to step 8.
|
|
|
|
|
|
5) To start gathering data, hit the A button on the fitness tracker and a heart will appear.
|
|
|
* Copy and paste the data from chrome to Excel or Google Spreadsheets (select comma-separated when you paste the numbers).
|
|
|
|
|
|
6) To stop gathering data, hit the B button on the fitness tracker and the check mark will reappear.
|
|
|
* Obtain the total acceleration for each row. This is calculated by squaring each value and taking the square root of the sum. In other words, in cell D1, paste this:
|
|
|
|
|
|
7) When you are done sending data, hit the A and B buttons at the same time to finish and a happy face will appear.
|
|
|
```
|
|
|
=SQRT((A1)^2+(B1)^2+(C1)^2)
|
|
|
```
|
|
|
|
|
|
8) If you used serial_reader.py, a graph of the data will automatically plot. If you used the chrome extension, continue to step 8.
|
|
|
* Click on the bottom right corner of D1 and drag down to the bottom of your data. This will make the same calculation for each row.
|
|
|
|
|
|
9) Copy and paste the data from chrome to Excel or Google Spreadsheets (select comma-separated when you paste the numbers).
|
|
|
* 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.
|
|
|
|
|
|
10) Obtain the total acceleration for each row. This is calculated by squaring each value and taking the square root of the sum. In other words, in cell D1, paste this:
|
|
|
|
|
|
```
|
|
|
=SQRT((A1)^2+(B1)^2+(C1)^2)
|
|
|
```
|
|
|
8) Switch hacker and tracker roles and run again. After analyzing the data, have the new hacker make a guess about the activities of the new tracker.
|
|
|
|
|
|
11) Click on the bottom right corner of D1 and drag down to the bottom of your data. This will make the same calculation for each row.
|
|
|
9) Chat with your partner about the issues with wireless data transmission. What are some potential solutions to these problems? Can you think of a simple encryption solution that allows you to mask the data being sent? Can you reverse the encryption to use the data?
|
|
|
|
|
|
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.
|
|
|
10) With your partner, employ a solution in your code. Run the experiment one last time and to see if your solution worked. What worked well in your solution? How could your solution be improved?
|
|
|
|
|
|
|
|
|
### Step 7: Further Exploration
|
... | ... | |