This commit is contained in:
Peli de Halleux 2018-02-16 14:49:03 -08:00
commit 8d10987d19
4 changed files with 42 additions and 40 deletions

View File

@ -3,7 +3,7 @@
![earthquake data](/static/courses/ucp-science/gravity/earthquake.png) ![earthquake data](/static/courses/ucp-science/gravity/earthquake.png)
Give students real world experience with coding, collecting data, analyzing data, and reporting results using [MakeCode for micro:bit Windows App](https://www.microsoft.com/store/productId/9PJC7SV48LCX) and a microbit with its sensors. Gravity is the attraction of one particle or body to another. Larger masses have a stronger gravitational force, or the measurement of the pull of gravity, than smaller masses. The @boardname@ can sense acceleration and can measure the force of motion. This lesson measures forces of motion with one @boardname@ and sends the data to a recording @boardname@. The experiment provides a basis for further force measurement activities.
## Contents ## Contents

View File

@ -6,37 +6,39 @@
Develop and use a model to describe the role of gravity and inertia in orbital motions of objects Develop and use a model to describe the role of gravity and inertia in orbital motions of objects
in our solar system. As you read, focus on systems, an organized group of related objects. In this in our solar system. As you read, focus on systems, an organized group of related objects. In this
section, it is important to examine how the objects in our solar system are affected by gravity and inertia.Most of the objects that are part of our solar system are constantly orbiting the Sun, the section, it is important to examine how the objects in our solar system are affected by gravity and inertia. Most of the objects that are part of our solar system are constantly orbiting the Sun, the star of our solar system. Mass is a measure of the amount of matter in an object. Everything that has mass also has gravity. Gravity is the attraction of one particle or body to another. You have gravity. Your pencil has gravity. Larger masses have a stronger gravitational force, or the measurement of the pull of gravity, than smaller masses.
star of our solar system. Mass is a measure of the amount of matter in an object. Everything that has mass also has gravity. Gravity is the attraction of one particle or body to another. You have gravity. Your pencil has gravity. Larger masses have a stronger gravitational force, or the measurement of the pull of gravity, than smaller masses.
![Two micro:bit showing 0 and 6](/static/courses/ucp-science/gravity/06.png) ![Force arrow pushing down on the earth](/static/courses/ucp-science/gravity/push-down.jpg)
The greater the mass of an object, the greater the gravitational pull it has on other objects. (ck12.org. Sixth Grade Science, p 26) https://eq.uen.org/emedia/items/dae58176-b839-4b26-87e4-09ca5ed98875/1/Grade6RS.pdf) The greater the mass of an object, the greater the gravitational pull it has on other objects ([ck12.org - Sixth Grade Science, Gravity and Inertia, p 26](https://eq.uen.org/emedia/items/dae58176-b839-4b26-87e4-09ca5ed98875/1/Grade6RS.pdf)).
## Project Goal ## Project Goal
Give students real world experience with coding, collecting data, analyzing data, and reporting results using MakeCodes block programming and a microbit with its sensors. Give students real world experience with coding, collecting data, analyzing data, and reporting results using MakeCodes block programming and a @boardname@ with its sensors.
## Prior Knowledge ## Prior Knowledge
Students need to have a basic knowledge of how to code using block style programming (Microbit using the [Windows 10 MakeCode app](https://www.microsoft.com/store/productId/9PJC7SV48LCX)) and download a program to a microbit. Students need to have a basic knowledge of how to code using block style programming (@boardname@ using the [Windows 10 MakeCode app](https://www.microsoft.com/store/productId/9PJC7SV48LCX)) and download a program to a @boardname@.
## Student Outcomes ## Student Outcomes
Students will: Students will:
* create experiments to collect data using microbits and the acceleration sensor on them. * Create experiments to collect data using @boardname@s and the acceleration sensor on them.
* setup different experiments to observe the gravity effect. * Setup different experiments to observe the gravity effect.
* code the microbits to collect data remotely over the microbit radios. * Code the @boardname@s to collect data remotely over the @boardname@ radios.
* analyze the data collected. * Analyze the data collected.
### Materials Needed ### Materials Needed
* 2 microbits with batteries connected * 2 @boardname@s with batteries connected
* A longer USB microbit cable
![Two micro:bit showing 0 and 6](/static/courses/ucp-science/gravity/06.png)
* A longer USB @boardname@ cable
* [MakeCode for micro:bit Windows App](https://www.microsoft.com/store/productId/9PJC7SV48LCX) * [MakeCode for micro:bit Windows App](https://www.microsoft.com/store/productId/9PJC7SV48LCX)
* Spreadsheet for data analysis * Spreadsheet for data analysis
* Padding for one microbit for gravity testing * Padding for one @boardname@ for gravity testing
<br/> <br/>

View File

@ -1,4 +1,4 @@
# Setup & Procedure # Setup and procedure
## Setup ## Setup
@ -9,25 +9,24 @@
## Code ## Code
This project will use to @boardname@s to collect and record data using the Windows 10 MakeCode app as described in the Data Collection - Option 3 at the end of this document. This project will use to @boardname@s to collect and record data using the Windows 10 MakeCode app as described in [Data Collection - Option 3](/courses/ucp-science/data-collection/setup-procedure).
### Sender @boardname@ code ### Sender @boardname@ code
1. Code the first @boardname@ using MakeCode for Microbits. 1. Code the first @boardname@ using MakeCode for Microbits.
2. Name the project, “Gravity Sender”. 2. Name the project, “Gravity Sender”.
3. The “on Start” event will display the title and function of the @boardname@ in all caps, “GRAVITY SENDER”. 3. The ``||basic:on start||`` event will display the title and function of the @boardname@ in all caps, `"GRAVITY SENDER"`.
4. Add comments to the “on Start” event: Name the project, creator, and date created.
5. Set up a radio group using the “radio set group”. Both @boardname@s need the same radio group. 5. Set up a radio group using the “radio set group”. Both @boardname@s need the same radio group.
```blocks ```blocks
basic.showString("GRAVITY SENDER") basic.showString("GRAVITY SENDER")
radio.setGroup(99) radio.setGroup(99)
``` ```
#### Send the data
6. The “forever” event will constantly monitor the “strength” of the acceleration and send the value to any other @boardname@s that might be receiving radio signals in the same radio group. 6. The ``||basic:forever||`` event will constantly monitor the “strength” of the acceleration and send the value to any other @boardname@s that might be receiving radio signals in the same radio group.
7. Open the pull down menu in the acceleration block and and change the “x” value to the “strength” value. This maximizes the x, y, and z dimensions of the acceleration into 1 value. 7. Open the pull down menu in the acceleration block and and change the ``x`` value to the ``strength`` value. This maximizes the x, y, and z dimensions of the acceleration into 1 value.
8. Add a ``||led:toggle||`` block to indicate that data is coming out 8. Add a ``||led:toggle||`` block to indicate that data is being sent.
```blocks ```blocks
basic.showString("GRAVITY SENDER") basic.showString("GRAVITY SENDER")
@ -38,24 +37,25 @@ basic.forever(() => {
}) })
``` ```
### Receiver @boardname@ code ### Receiver @boardname@ code
1. Using the [Windows 10 MakeCode app](https://www.microsoft.com/store/productId/9PJC7SV48LCX) setup and code the second @boardname@. 1. Using the [Windows 10 MakeCode app](https://www.microsoft.com/store/productId/9PJC7SV48LCX) setup and code the second @boardname@.
2. This @boardname@ will remain connected to the computer through the USB cable and the Windows 10 MakeCode app to monitor the data being received. 2. This @boardname@ will remain connected to the computer through the USB cable and the Windows 10 MakeCode app to monitor the data being received.
3. Name the project, “Gravity Receiver”. 3. Name the project, “Gravity Receiver”.
4. The “on Start” event will display the title and function of the @boardname@ in all caps, “GRAVITY RECEIVER”. 4. The ``||basic:on start||`` event will display the title and function of the @boardname@ in all caps, `"GRAVITY RECEIVER"`.
5. Add comments to the “on Start” event: Name the project, creator, and date created. 6. Set up a radio group using the ``||radio:radio set group||``. Both @boardname@s need the same radio group.
6. Set up a radio group using the “radio set group”. Both @boardname@s need the same radio group.
```blocks ```blocks
basic.showString("GRAVITY RECEIVER") basic.showString("GRAVITY RECEIVER")
radio.setGroup(99) radio.setGroup(99)
``` ```
7. The “on Radio Received” event will constantly monitor radio signals from the radio group. #### Code the receive event
8. When a value is received from the group it is stored in the “gravity” variable.
9. The “serial write Value” sends 2 pieces of data back to the MakeCode app through the USB cable. First it sends a label “gravity” and then the value received as gravity from the acceleration method from the first @boardname@. 7. The ``||radio:on radio received||`` event will constantly monitor radio signals from the radio group.
10. Add a ``led.toggle`` to indicate that data has been received. Change ``x`` to 1 so that another LED blinks. 8. When a value is received from the group it is stored in the ``gravity`` variable.
9. The ``||serial:serial write Value||`` sends 2 pieces of data back to the MakeCode app through the USB cable. First it sends a label `"gravity"` and then the value received as gravity from the acceleration method from the first @boardname@.
10. Add a ``||led:toggle||`` to indicate that it's receiving data. Change ``x`` to `1` so that another LED blinks.
```blocks ```blocks
basic.showString("GRAVITY RECEIVER") basic.showString("GRAVITY RECEIVER")
@ -71,35 +71,35 @@ radio.onDataPacketReceived( ({ receivedNumber: gravity }) => {
1. With the @boardname@ code downloaded from the MakeCode app to the @boardname@ and the USB cable connected it will start receiving data from the first @boardname@. 1. With the @boardname@ code downloaded from the MakeCode app to the @boardname@ and the USB cable connected it will start receiving data from the first @boardname@.
2. Under the simulator in the app a purple outlined button shows up “Show data Device”. 2. Under the simulator in the app a purple outlined button shows up “Show data Device”.
3. By clicking on the “Show data Device” button a window opens up to the right showing values and graph of the gravity data being received. (The dips in the graph are 3 tosses of the @boardname@ in the air.) 3. By clicking on the **Show data Device** button a window opens up to the right showing values and graph of the gravity data being received (the dips in the graph are 3 tosses of the @boardname@ in the air).
4. The “Download” button in the red highlighted box allows the downloading of about the last 20 seconds of recorded data as a CSV file. 4. The **Download** button in the red highlighted box allows the downloading of about the last 20 seconds of recorded data as a CSV file.
![Toss sensor data](/static/courses/ucp-science/gravity/toss.png) ![Toss sensor data](/static/courses/ucp-science/gravity/toss.png)
5. When the data recorded is downloaded as a CSV spreadsheet file. It is named “data.csv”. (It will usually open in a spreadsheet but sometimes doesnt and it can be hard to find. A search of the C:\ drive may need to be made to find it.) When the data recorded is downloaded as a CSV spreadsheet file. It is named ``data.csv`` (it will usually open in a spreadsheet but sometimes doesnt and it can be hard to find. A search of the ``C:\`` drive might be necessary to find it).
![Toss sensor data](/static/courses/ucp-science/gravity/export.png) ![Toss sensor data](/static/courses/ucp-science/gravity/export.png)
Additional analysis and graphing can be done in a spreadsheet. Additional analysis and graphing can be done in a spreadsheet.
## Data Collection: ## Data Collection
There are several ways to collect data from an experiment. The simplest is having the data display on the LED screen and manually record the data on a paper. Data can also be collected using the Windows 10 MakeCode app. The third way is using 2 @boardname@s with one observing the data and then radioing the results to a second @boardname@ can allow the remote collection of data. There are several ways to collect data from an experiment. The simplest is having the data display on the LED screen and manually record the data on a paper. Data can also be collected using the Windows 10 MakeCode app. The third way is using 2 @boardname@s with one observing the data and then radioing the results to a second @boardname@ can allow the remote collection of data.
For additional information on data collection see [Data Collection](/courses/ucp-science/data-collection). For additional information on data collection, see the [Data Collection](/courses/ucp-science/data-collection) lesson.
## Extensions ## Extensions
### Sound Wave Sensor. ### Sound Wave Sensor
Sound causes vibrations which can be detected with the Microbit accelerator. Connect 2 @boardname@s using radio signals. Data Collection - Option 3. The “Gravity Sender” @boardname@ can be placed on or near a speaker. It will send a signal to the “Gravity Receiver” @boardname@ which can be connected to the Windows 10 MakeCode app. When the “Gravity Receiver” @boardname@ receives a gravity number it is sent to the monitoring data collection using the command “serial write value (“gravity”, gravity)”. The sound can be observed in the “Show data Device”. Sound causes vibrations which can be detected with the Microbit accelerator. Connect 2 @boardname@s using radio signals (see [Data Collection - Option 3](/courses/ucp-science/data-collection/setup-procedure)). The “Gravity Sender” @boardname@ can be placed on or near a speaker. It will send a signal to the “Gravity Receiver” @boardname@ which can be connected to the Windows 10 MakeCode app. When the “Gravity Receiver” @boardname@ receives a gravity number it is sent to the monitoring data collection using the method ``serial.writeValue("gravity", gravity)``. The sound can be observed in the **Show data Device**.
![Sound vibrations](/static/courses/ucp-science/gravity/soundvibrations.png) ![Sound vibrations](/static/courses/ucp-science/gravity/soundvibrations.png)
### Earthquake Detector ### Earthquake Detector
Earthquakes cause vibrations which can be detected with the Microbit accelerator. By placing the Gravity Sending” sending @boardname@ on a flat surface and having it “feel” minor changes in acceleration it can detect earthquakes or other vibrations in the earth. Connect 2 @boardname@s using radio signals. Data Collection - Option 3. The “Gravity Sender” @boardname@ can be placed on or near a speaker. It will send a signal to the “Gravity Receiver” @boardname@ which can be connected to the Windows 10 MakeCode app. When the “Gravity Receiver” @boardname@ receives a gravity number it is sent to the monitoring data collection using the command “serial write value (“gravity”, gravity)”. The movement of the object connected to the Earth can be observed in the “Show data Device”. Using a conditional statement that detects changes in the received gravity could be implemented to play “music” sound as an alarm when changes in movement are detected. Earthquakes cause vibrations which can be detected with the Microbit accelerator. By placing the "Gravity Sender" @boardname@ on a flat surface and having it “feel” minor changes in acceleration it can detect earthquakes or other vibrations in the earth. Connect 2 @boardname@s using radio signals (see [Data Collection - Option 3](/courses/ucp-science/data-collection/setup-procedure)). The “Gravity Sender” @boardname@ can be placed on or near a speaker. It will send a signal to the “Gravity Receiver” @boardname@ which can be connected to the Windows 10 MakeCode app. When the “Gravity Receiver” @boardname@ receives a gravity number it is sent to the monitoring data collection using the method ``serial.writeValue("gravity", gravity)``. The movement of the object connected to the Earth can be observed in the **Show data Device**. Using a conditional statement that detects changes in the received gravity could be implemented to play “music” sound as an alarm when changes in movement are detected.
![Earthquake vibrations](/static/courses/ucp-science/gravity/earthquake.png) ![Earthquake vibrations](/static/courses/ucp-science/gravity/earthquake.png)

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB