... | ... | @@ -93,27 +93,23 @@ 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. Complete the base code. You will program the LED's to provide feedback as to what is happening with the fitTracker. You will also grab the acceleration from the Micro::Bit to send over the radio. Follow the comments in the code as well
|
|
|
2. Complete the base code. You will program the LED's to provide feedback as to what is happening with the fitTracker. You will also grab the acceleration from the Micro::Bit to send over the radio.
|
|
|
* Get the Micro::Bit's x, y, and z acceleration values
|
|
|
* Send the acceleration values over the radio to the receiver
|
|
|
* Display a happy face when ready to start measuring data
|
|
|
* Display a heart when measuring data
|
|
|
* Dispaly a check mark when finished measuring data
|
|
|
|
|
|
### Run The Program
|
|
|
1. Flash your code base! If you don't remember how to flash code to your Micro::Bit, see the instructions [here](how-to-flash).
|
|
|
|
|
|
1. 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).
|
|
|
3. 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).
|
|
|
|
|
|
2. 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.
|
|
|
4. 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.
|
|
|
|
|
|
3. Load your code onto your Micro::Bits. A check mark will appear to show the Micro::Bits are ready.
|
|
|
5. Flash your completed code onto your Micro::Bits.
|
|
|
|
|
|
4. 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).
|
|
|
6. Test your program by analyzing data from your partner. 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).
|
|
|
|
|
|
* 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.
|
|
|
* 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). 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.
|
|
|
|
|
|
* To start gathering data, hit the A button on the fitness tracker and a heart will appear.
|
|
|
|
... | ... | @@ -121,7 +117,7 @@ If you don't remember how to flash code to your Micro::Bit, see the instructions |
|
|
|
|
|
* When you are done sending data, hit the A and B buttons at the same time to finish and a happy face will appear.
|
|
|
|
|
|
* If you used serial_reader.py, a graph of the data will automatically plot. If you used the chrome extension, continue to step 8.
|
|
|
* If you used serial_reader.py, a graph of the data will automatically plot. If you used the chrome extension, continue to the following steps.
|
|
|
|
|
|
* Copy and paste the data from chrome to Excel or Google Spreadsheets (select comma-separated when you paste the numbers).
|
|
|
|
... | ... | @@ -136,11 +132,11 @@ If you don't remember how to flash code to your Micro::Bit, see the instructions |
|
|
* 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.
|
|
|
|
|
|
|
|
|
5. 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.
|
|
|
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. 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?
|
|
|
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. 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?
|
|
|
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?
|
|
|
|
|
|
## Step 7: Further Exploration
|
|
|
* Can you think of a way to track steps instead of acceleration? Maybe the fitness Tracker could also detect temperature? What else can be deduced from knowing someone's acceleration throughout the day? Spend some time exploring with your Micro::Bit and see what kind of improvements you can make. Try to steal data from other group's fitness Trackers.
|
... | ... | |