diff --git a/docs/courses/ucp-science.md b/docs/courses/ucp-science.md
index 1a9314b2..4f570f40 100644
--- a/docs/courses/ucp-science.md
+++ b/docs/courses/ucp-science.md
@@ -14,7 +14,7 @@ This is a new course, so we're adding new lessons. All lessons will be available
The lesson series includes:
-* [micro:bit Data Collection Methods](/courses/ucp-science/data-collection)
+* [Data Collection Methods](/courses/ucp-science/data-collection)
* Population Trait Data Counter
* Temperature Data
* Soil Moisture Tester
diff --git a/docs/courses/ucp-science/data-collection.md b/docs/courses/ucp-science/data-collection.md
index 4044c057..b6b4dd2d 100644
--- a/docs/courses/ucp-science/data-collection.md
+++ b/docs/courses/ucp-science/data-collection.md
@@ -1,6 +1,8 @@
# Data collection
-This lesson introduces the student to using the micro:bit to take measurements and report the results. A few brief experiments are presented and data collected from the experiments is graphed in the MakeCode editor. The data is then available to download to a spreadsheet program for further analysis.
+![Graph of recorded temperature values](/static/courses/ucp-science/data-collection/temperature-graph.jpg)
+
+This lesson introduces the student to using the @boardname@ to take measurements and report the results. A few brief experiments are presented and data collected from the experiments is graphed in the MakeCode editor. The data is then available to download to a spreadsheet program for further analysis.
## Contents
diff --git a/docs/courses/ucp-science/data-collection/overview.md b/docs/courses/ucp-science/data-collection/overview.md
index 4edf3f9f..3fd38c94 100644
--- a/docs/courses/ucp-science/data-collection/overview.md
+++ b/docs/courses/ucp-science/data-collection/overview.md
@@ -4,13 +4,13 @@
Science is a way of knowing, a process for gaining knowledge and understanding of the natural world. Engineering combines the fields of science, technology, and mathematics to provide solutions to real-world problems. Students should be active learners who demonstrate their scientific understanding by using it. It is not enough for students to read about science; they must participate in the three dimensions of science. They should observe, inquire, question, formulate and test hypotheses, analyze data, report, and evaluate findings. The students, as scientists, should have hands-on, active experiences throughout the instruction of the science curriculum. These standards help students find value in developing novel solutions as they engage with complex problems.
-![microbit display side view](/static/courses/ucp-science/data-collection/mb-display-side.jpg)
+![@boardname@ display side view](/static/courses/ucp-science/data-collection/mb-display-side.jpg)
## Project goal
-To use a variety of methods to collect science experiment data using microbits and its sensors. The micro:bit is the result of companies and communities all around the world working together to help people learn to code, and become confident and creative with technology. The BBC’s Microbit is a small programmable device created in the UK and is given to all 7th graders to help them learn coding, to see the relationship between hardware and software, and how to use it in an innovative way.
+To use a variety of methods to collect science experiment data using @boardname@s and its sensors. The micro:bit is the result of companies and communities all around the world working together to help people learn to code, and become confident and creative with technology. The BBC’s Microbit is a small programmable device created in the UK and is given to all 7th graders to help them learn coding, to see the relationship between hardware and software, and how to use it in an innovative way.
-![microbit front side view](/static/courses/ucp-science/data-collection/mb-front-side.jpg)
+![@boardname@ front side view](/static/courses/ucp-science/data-collection/mb-front-side.jpg)
## micro:bit features
@@ -40,19 +40,19 @@ See [Using a micro:bit in 5 easy steps](http://microbit.org/guide/quick/) for a
Students will:
-* create experiments to collect data using microbits and its sensors.
+* create experiments to collect data using @boardname@s and its sensors.
* setup different experiments to observe the effects.
-* code a microbit to collect data by observing the data displayed on the LED screen.
-* code a microbit to collect data, graph it, and download it using a USB cable and a serial write value command.
-* code the microbits to collect data remotely over the microbit radios.
+* code a @boardname@ to collect data by observing the data displayed on the LED screen.
+* code a @boardname@ to collect data, graph it, and download it using a USB cable and a serial write value command.
+* code the @boardname@s to collect data remotely over the @boardname@ radios.
* analyze the data collected.
## Materials Needed
-* A microbit with a longer USB cable
+* A @boardname@ with a longer USB cable
* Windows 10 MakeCode app
-* 2 microbits with batteries connected
-* A longer USB microbit cable
+* 2 @boardname@s with batteries connected
+* A longer USB @boardname@ cable
* Spreadsheet program for data analysis
diff --git a/docs/courses/ucp-science/data-collection/resources.md b/docs/courses/ucp-science/data-collection/resources.md
index b44d82e3..91f2b641 100644
--- a/docs/courses/ucp-science/data-collection/resources.md
+++ b/docs/courses/ucp-science/data-collection/resources.md
@@ -1,13 +1,5 @@
# Resources
-## Utah Science with Engineering Education (SEEd)
-
-* [Utah Science Website](https://schools.utah.gov/curr/science)
-* [Utah Grades 6-8 SEEd Standards](https://schools.utah.gov/file/265a0b53-b6a7-48fb-b253-b6a5f38ffe19)
-* [Sixth grade OER Science text](https://eq.uen.org/emedia/items/dae58176-b839-4b26-87e4-09ca5ed98875/1/Grade6RS.pdf)
-* [Seventh grade OER Science text](https://eq.uen.org/emedia/items/afd89ff1-054c-4ac5-a712-67f4c6029644/1/Grade7RS.pdf)
-* [Eighth grade OER Science text](https://eq.uen.org/emedia/items/e5219302-32b9-4c2f-ad65-38f303da6654/1/Grade8RS.pdf)
-
## CSTA Standards
Computer Science Teachers Association (CSTA) Standards 2017.
@@ -38,6 +30,15 @@ http://www.csteachers.org/page/standards.
* 17 - Systematically test and refine programs using a range of test cases.
* 19 - Document programs in order to make them easier to follow, test, and debug.
+
+## Utah Science with Engineering Education (SEEd)
+
+* [Utah Science Website](https://schools.utah.gov/curr/science)
+* [Utah Grades 6-8 SEEd Standards](https://schools.utah.gov/file/265a0b53-b6a7-48fb-b253-b6a5f38ffe19)
+* [Sixth grade OER Science text](https://eq.uen.org/emedia/items/dae58176-b839-4b26-87e4-09ca5ed98875/1/Grade6RS.pdf)
+* [Seventh grade OER Science text](https://eq.uen.org/emedia/items/afd89ff1-054c-4ac5-a712-67f4c6029644/1/Grade7RS.pdf)
+* [Eighth grade OER Science text](https://eq.uen.org/emedia/items/e5219302-32b9-4c2f-ad65-38f303da6654/1/Grade8RS.pdf)
+
## micro:bit
* [Microbit.org](http://microbit.org)
diff --git a/docs/courses/ucp-science/data-collection/setup-procedure.md b/docs/courses/ucp-science/data-collection/setup-procedure.md
index 9e149a9f..81d81e68 100644
--- a/docs/courses/ucp-science/data-collection/setup-procedure.md
+++ b/docs/courses/ucp-science/data-collection/setup-procedure.md
@@ -16,7 +16,7 @@ basic.showNumber(input.temperature())
As data is displayed it can then be recorded on a paper for further analysis.
-Data can also be displayed graphically on the micro:bit using the ``||led:plot bar graph o||`` block from the ``||led:LED||`` toolbox.
+Data can also be displayed graphically on the micro:bit using the ``||led:plot bar graph||`` block from the ``||led:LED||`` toolbox.
```blocks
led.plotBarGraph(
@@ -26,11 +26,20 @@ led.plotBarGraph(
### Option 2 - micro:bit Windows 10 MakeCode app and a USB connection
-The Windows 10 MakeCode app allows data to be directly read from the micro:bit when it is attached using USB cable. Data can be sent from the micro:bit to the Windows 10 MakeCode app using serial data connection. The data collected over the serial connection can be graphed and the data can be downloaded. A limit of only about the last 20 seconds of data can be downloaded as a "data.csv" file. This allows the collection of data in real time. This file can be opened in a spreadsheet for further analysis. Many different kinds of experiments can be performed using this data logging technique.
+The Windows 10 MakeCode app allows data to be directly read from the micro:bit when it is attached using USB cable. Data can be sent from the micro:bit to the Windows 10 MakeCode app using serial data connection. The data collected over the serial connection can be graphed and the data can be downloaded. This file can be opened in a spreadsheet for further analysis. Many different kinds of experiments can be performed using this data logging technique.
You can download the [Windows 10 MakeCode](https://www.microsoft.com/store/apps/9PJC7SV48LCX) app.
-With the program downloaded from the MakeCode app to the micro:bit and the USB cable left connected and using the ``||serial:serial write value||`` block from the ``||serial:Serial||`` toolbox in the **Advanced** tool section.
+With the program downloaded from the MakeCode app to the micro:bit and the USB cable left connected, the
+``||led:plot bar graph||`` will automatically upload the data to the app.
+
+```blocks
+led.plotBarGraph(
+ input.temperature(), 0
+ )
+```
+
+Alternatively, you can the ``||serial:serial write value||`` block from the ``||serial:serial||`` toolbox in the **Advanced** tool section. This can be useful if you need to send different values, like temperature and light.
```blocks
serial.writeValue("Celsius", input.temperature())
@@ -55,14 +64,9 @@ In the starting of the code the title is displayed, radio group 99 is setup, and
In the forever loop the temperature is collected from the micro:bit sensor and stored in the ``temperature`` variable. The temperature is displayed on the LED display. A radio signal is sent to all micro:bit radios in group `99`. The program pauses for 1000 milliseconds and then loops again.
```blocks
-// Temperature Radio Sender
-// by C Lyman
-// January 2018
-temperature = 0
-basic.showString("TEMPERATURE RADIO REMOTE")
-radio.setGroup(99)
let temperature = 0
-// Forever Loop event
+basic.showString("TEMPERATURE REMOTE")
+radio.setGroup(99)
basic.forever(() => {
temperature = input.temperature()
basic.showNumber(temperature)
@@ -71,50 +75,36 @@ basic.forever(() => {
})
```
-Shared "Temperature Radio Sender" program: https://makecode.micro:bit.org/_DLmi641H5CP0
-
#### Radio receiver code
In the starting of the code the title is displayed, radio group 99 is setup, and the initial ``temperature`` variable is set to `0`.
In the radio received event, the temperature is received from sending the micro:bit radio. The received temperature is then displayed on the LED display. This is repeated whenever a radio signal is received.
-```typescript
-// Temperature Radio Receiver
-// by C Lyman
-// January 2018
-temperature = 0
-basic.showString("TEMPERATURE RADIO RECEIVER")
-radio.setGroup(99)
+```blocks
let temperature = 0
-// Radio Packet Received event
-radio.onDataPacketReceived( ({ receivedNumber: temperature }) => {
- basic.showNumber(temperature)
+radio.setGroup(99)
+basic.showString("TEMPERATURE RECEIVER")
+radio.onDataPacketReceived( ({ receivedNumber }) => {
+ basic.showNumber(receivedNumber)
})
```
-### micro:bit radio receiver code with serial write
+### Radio receiver code with serial write
This code is the same as above but one additional line of code is added to write to the word `"Celisus"` and the temperature to the MakeCode app to the USB serial connection. This is the same as described peviously in [Option 2](#option-2-micro-bit-windows-10-makecode-app-and-a-usb-connection).
-```typescript
-// Temperature Radio Receiver
-// by C Lyman
-// January 2018
-temperature = 0
-basic.showString("TEMPERATURE RADIO RECEIVER SERIAL")
-radio.setGroup(99)
+```blocks
let temperature = 0
-// Radio Data Packet Received event
-radio.onDataPacketReceived( ({ receivedNumber: temperature }) => {
- basic.showNumber(temperature)
- serial.writeValue("Celisus", temperature)
+basic.showString("TEMPERATURE RECEIVER SERIAL")
+radio.setGroup(99)
+radio.onDataPacketReceived( ({ receivedNumber }) => {
+ basic.showNumber(receivedNumber)
+ serial.writeValue("Celisus", receivedNumber)
})
```
-Shared "Temperature Radio Receiver" program: https://makecode.micro:bit.org/_44HRETXpC2ib
-
## Sample Project to Collect Accelerator Data
This sample project demonstrates the coding of the 2 micro:bits to collect data from the micro:bit accelerator sensor. It will also show the data collection and downloaded data to be further analyzed in a spreadsheet.
@@ -122,20 +112,11 @@ This sample project demonstrates the coding of the 2 micro:bits to collect data
### "Sender" micro:bit code
Code the first micro:bit using MakeCode for micro:bit. Name the project, "Gravity Sender".
-The ``||basic:on start||`` event will display the title and function of the micro:bit in all caps, `"GRAVITY SENDER"`. Add some comments to the ``||basic:on start||`` event:
-
-* Name of the project
-* Creator
-* Date created
-
-![Show comment block](/static/courses/ucp-science/data-collection/comment-block.jpg)
+The ``||basic:on start||`` event will display the title and function of the micro:bit in all caps, `"GRAVITY SENDER"`.
Set up a radio group using the ``||radio:radio set group||``. Both micro:bits need the same radio group.
```blocks
-// Gravity Sender
-// by C Lyman
-// Jan 2018
basic.showString("GRAVITY SENDER")
radio.setGroup(99)
```
@@ -144,13 +125,13 @@ The ``||basic:forever||`` event will constantly monitor the _strength_ of the ac
Open the pull down menu in the ``||input:acceleration||`` block and and change the ``x`` value to the ``strength`` value. This maximizes the x, y, and z dimensions of the acceleration into one value.
```blocks
+basic.showString("GRAVITY SENDER")
+radio.setGroup(99)
basic.forever(() => {
radio.sendNumber(input.acceleration(Dimension.Strength))
})
```
-Shared "Gravity Sender" program: https://makecode.micro:bit.org/_83oRcxDfyPpa
-
### "Receiver" micro:bit code
Using the Windows 10 MakeCode app, setup and code the second micro:bit. This micro:bit will remain connected to the computer through the USB cable and the Windows 10 MakeCode app to monitor the data being received.
@@ -158,9 +139,6 @@ Using the Windows 10 MakeCode app, setup and code the second micro:bit. This mic
Name the project, "Gravity Receiver". The ``||basic:on start||`` event will display the title and function of the micro:bit in all caps, `"GRAVITY RECEIVER"`. Add comments to the ``||basic:on start||`` event like before: Name the project, creator, and date created. Set up a radio group using the ``||radio:radio set group||`` block. Both micro:bits need the same radio group.
```blocks
-// Gravity Receiver
-// by C Lyman
-// Jan 2018
basic.showString("GRAVITY RECEIVER")
radio.setGroup(99)
```
@@ -170,13 +148,13 @@ When a value is received from the group it is stored in the ``gravity`` variable
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 ``||input:acceleration||`` method from the first micro:bit.
```blocks
-radio.onDataPacketReceived( ({ receivedNumber: gravity }) => {
- serial.writeValue("gravity", gravity)
+basic.showString("GRAVITY RECEIVER")
+radio.setGroup(99)
+radio.onDataPacketReceived( ({ receivedNumber }) => {
+ serial.writeValue("gravity", receivedNumber)
})
```
-Shared "Gravity Receiver" program: https://makecode.micro:bit.org/_gXjhkyb3PWzh
-
### Monitoring, downloading, and analyzing the data
With the micro:bit code downloaded from the MakeCode app to the micro:bit and the USB cable connected it will start receiving data from the first micro:bit. Under the simulator in the app a purple outlined button shows up **Show data Device**.
@@ -191,20 +169,14 @@ The **Download** button in the red highlighted box allows the downloading of abo
![Graph with download button](/static/courses/ucp-science/data-collection/temperature-graph.jpg)
-When the data recorded is downloaded as a CSV spreadsheet file, it is named "data.csv".
+When the data recorded is downloaded as a CSV spreadsheet file, it is named ``"data.csv"``.
#### ~hint
-The CSV file usually opens in directly into a spreadsheet but sometimes it doesn’t which makes it hard to find. A search of the C:\ drive might be necessary to find it.
+The CSV file usually opens in directly into a spreadsheet but sometimes it doesn’t which makes it hard to find. A search of the ``C:\`` drive might be necessary to find it.
#### ~
-Here is a link to sample downloaded data from the "data.csv" file that's already imported into Google Sheets:
-
-https://docs.google.com/spreadsheets/d/1L_3Gq61UFEEjVZYQk31yTwzrTF3nlv55Ic2CjQdbIW8/edit?usp=sharing
-
-Additional analysis and graphing can be done in a spreadsheet.
-
| | | |
diff --git a/docs/courses/ucp-science/electricity.md b/docs/courses/ucp-science/electricity.md
index b185c4f7..295bae9c 100644
--- a/docs/courses/ucp-science/electricity.md
+++ b/docs/courses/ucp-science/electricity.md
@@ -1,5 +1,7 @@
# Electricity -- Battery tester
+![micro:bit battery tester](/static/courses/ucp-science/electricity/battery-tester.jpg)
+
This lesson observes the force of electricity. The charge in several batteries is measured by the micro:bit to see how much electric force is present in each one. The results are recorded to analyze the condition of each battery. As an application of the experiment, batteries in poor condition (mostly discharged) can be noted and properly disposed of.
## Contents
diff --git a/docs/courses/ucp-science/electricity/resources.md b/docs/courses/ucp-science/electricity/resources.md
index b060922e..45232545 100644
--- a/docs/courses/ucp-science/electricity/resources.md
+++ b/docs/courses/ucp-science/electricity/resources.md
@@ -1,25 +1,5 @@
# Resources
-## Utah Science with Engineering Education (SEEd)
-
-* [Utah Science Website](https://schools.utah.gov/curr/science)
-* [Utah Grades 6-8 SEEd Standards](https://schools.utah.gov/file/265a0b53-b6a7-48fb-b253-b6a5f38ffe19)
-* [Sixth grade OER Science text](https://eq.uen.org/emedia/items/dae58176-b839-4b26-87e4-09ca5ed98875/1/Grade6RS.pdf)
-* [Seventh grade OER Science text](https://eq.uen.org/emedia/items/afd89ff1-054c-4ac5-a712-67f4c6029644/1/Grade7RS.pdf)
-* [Eighth grade OER Science text](https://eq.uen.org/emedia/items/e5219302-32b9-4c2f-ad65-38f303da6654/1/Grade8RS.pdf)
-
-## NGSS - Utah SEEd
-
-Strand 7.1: Forces are Interactions between Matter
-
-* Standard 7.1.3
-
->Construct a model using observational evidence to describe the nature of fields existing between objects that exert forces on each other even though the objects are not in contact. Emphasize the cause and effect relationship between properties of objects (such as magnets or electrically-charged objects) and the forces they exert.
-
-* Standard 7.1.4
-
->Collect and analyze data to determine the factors that affect the strength of electric and magnetic forces. Examples could include electromagnets, electric motors, or generators. Examples of data could include the effect of the number of turns of wire on the strength of an electromagnet, or of increasing the number or strength of magnets on the speed of an electric motor.
-
## CSTA Standards
Computer Science Teachers Association (CSTA) Standards 2017.
@@ -51,6 +31,26 @@ http://www.csteachers.org/page/standards.
* 17 — Systematically test and refine programs using a range of test cases.
* 19 — Document programs in order to make them easier to follow, test, and debug.
+## Utah Science with Engineering Education (SEEd)
+
+* [Utah Science Website](https://schools.utah.gov/curr/science)
+* [Utah Grades 6-8 SEEd Standards](https://schools.utah.gov/file/265a0b53-b6a7-48fb-b253-b6a5f38ffe19)
+* [Sixth grade OER Science text](https://eq.uen.org/emedia/items/dae58176-b839-4b26-87e4-09ca5ed98875/1/Grade6RS.pdf)
+* [Seventh grade OER Science text](https://eq.uen.org/emedia/items/afd89ff1-054c-4ac5-a712-67f4c6029644/1/Grade7RS.pdf)
+* [Eighth grade OER Science text](https://eq.uen.org/emedia/items/e5219302-32b9-4c2f-ad65-38f303da6654/1/Grade8RS.pdf)
+
+## NGSS - Utah SEEd
+
+Strand 7.1: Forces are Interactions between Matter
+
+* Standard 7.1.3
+
+>Construct a model using observational evidence to describe the nature of fields existing between objects that exert forces on each other even though the objects are not in contact. Emphasize the cause and effect relationship between properties of objects (such as magnets or electrically-charged objects) and the forces they exert.
+
+* Standard 7.1.4
+
+>Collect and analyze data to determine the factors that affect the strength of electric and magnetic forces. Examples could include electromagnets, electric motors, or generators. Examples of data could include the effect of the number of turns of wire on the strength of an electromagnet, or of increasing the number or strength of magnets on the speed of an electric motor.
+
## micro:bit
* [Microbit.org](http://microbit.org)
diff --git a/docs/courses/ucp-science/electricity/setup-procedure.md b/docs/courses/ucp-science/electricity/setup-procedure.md
index 9c275cb6..e9b99e93 100644
--- a/docs/courses/ucp-science/electricity/setup-procedure.md
+++ b/docs/courses/ucp-science/electricity/setup-procedure.md
@@ -44,14 +44,8 @@ This project will use a micro:bit to read the voltage of an old battery to see i
1. Name the project, “Battery Tester”.
2. The ``||basic:on start||`` event will display the title and purpose of the micro:bit in all caps, `"BATTERY TESTER"`. The text is put in the ``||basic:show string||`` block (The title is put in the ``||basic:on start||`` event so when the micro:bit is started up it will show what it is programmed to do. It is done in all CAPS because it is easier to read as it is displayed in the LED display).
-3. Add comments to the ``||basic:on start||`` event: Name the project, creator, and date created.
-
-![Add comments to the on start block](/static/courses/ucp-science/electricity/add-comments.gif)
```blocks
-// Battery tester
-// C Lyman
-// Nov 2017
basic.showString("BATTERY TESTER");
```
@@ -70,18 +64,18 @@ input.onButtonPressed(Button.A, () => {
### on Button “B” Pressed event
1. The code for on button **B** pressed is designed to return a converted value for the battery’s voltage in millivolts (1.5 volt = 1500 millivolts).
-2. The beginning of the first statement a variable “voltage” is created and given a value of the reading from the analog reading of pin **0**. The number is then multiplied by 1000 and divided by 340.
-3. If 3 volts gives a reading of about 1023 then 1 volt should read around 340. (340 = 1024 / 3). Using this ratio and multiplying the number by 1000 should convert the number to millivolts (micro:bits only do integer math so the voltage is multiplied by 1000 before doing the division by 340).
+2. The beginning of the first statement a variable ``reading`` is created and given a value of the reading from the analog reading of pin **0**. The ``reading`` variable is then multiplied by 1000 and divided by 340 and stored in ``voltage``.
+3. If 3 volts gives a reading of about 1023 then 1 volt should read around 340 (340 = 1024 / 3). Using this ratio and multiplying the number by 1000 should convert the number to millivolts (micro:bits only do integer math so the voltage is multiplied by 1000 before doing the division by 340).
```block
-// Convert analog reading to millivolts
input.onButtonPressed(Button.B, () => {
- let voltage = pins.analogReadPin(AnalogPin.P0)
- voltage = voltage * 1000 / 340
+ let reading = pins.analogReadPin(AnalogPin.P0)
+ let voltage = reading * 1000 / 340
basic.showNumber(voltage)
})
```
-#### Go to the code
+
+#### Go to the JavaScript
4. Switching to JavaScript instead of working in the block environment makes it easier to do the math. Once the math is done in JavaScript it can be switched back to blocks.
5. The last line displays the value converted millivolts on the LED display.
@@ -89,14 +83,12 @@ input.onButtonPressed(Button.B, () => {
```typescript
// Convert analog reading to millivolts
input.onButtonPressed(Button.B, () => {
- let voltage = pins.analogReadPin(AnalogPin.P0)
- voltage = voltage * 1000 / 340
+ let reading = pins.analogReadPin(AnalogPin.P0)
+ let voltage = reading * 1000 / 340
basic.showNumber(voltage)
})
```
-Shared "Battery Tester" program: https://makecode.microbit.org/_LMwfCCgmVfiP
-
## Extensions
### Add battery status