updated TOC

This commit is contained in:
Peli de Halleux 2017-06-21 22:40:35 -07:00
parent 045a2a7694
commit 952a3f89e2
6 changed files with 36 additions and 29 deletions

View File

@ -21,6 +21,7 @@
* [Watch](/projects/watch)
* [Soil Moisture](/projects/soil-moisture)
* [Plant Watering](/projects/plant-watering)
* [Reaction Time](/projects/reaction-time)
* [Voting Machine](/projects/voting-machine)
* [Infection](/projects/infection)
* [Fireflies](/projects/fireflies)

View File

@ -115,6 +115,10 @@ Fun games to build with your @boardname@.
"name": "Plant Watering",
"url":"/projects/plant-watering",
"imageUrl":"/static/mb/projects/plant-watering.jpg"
}, {
"name": "Reaction Time",
"url":"/projects/reaction-time",
"imageUrl":"/static/mb/projects/reaction-time.jpg"
}]
```

View File

@ -9,7 +9,7 @@ Make a reaction time experiment that responds to your body's conductivity!
### ~
https://youtu.be/DgJ-S0q0EMs
https://youtu.be/doHwknM7HbQ
## Duration
@ -17,11 +17,11 @@ https://youtu.be/DgJ-S0q0EMs
## Materials
* Cardboard
* Aluminum Foil
* Permanent Markers (Red and Black)
* cardboard
* aluminum Foil
* permanent markers
* 1 @boardname@, battery holder and 2 AAA batteries
* 4 Crocodile clips
* 4 crocodile clips
## Activities

View File

@ -1,24 +1,28 @@
# Code
### @description code to make the Reaction Time interactive
## Step 1: Measuring reaction time.
![](/static/mb/courses/stem/reaction_time_complete.jpg)
This lesson uses the Micro:bit to measure the reaction time of a student by completing a circuit on a board. The student will be measuring his/her reaction time in an undistracted environment and a distracted environment.
This lesson uses the @boardname@ to measure the reaction time of a student by completing a circuit on a board. The student will be measuring his/her reaction time in an undistracted environment and a distracted environment.
Connect each piece of foil to the appropriate pin on the Micro:bit. Note: For the experiment we will not be utilizing the P2 pin.
Connect each piece of foil to the appropriate pin on the @boardname@.
Test the apparatus by putting one hand on the ground pin and one hand on the P0 pin. This will complete the circuit and start the timer on the Micro:bit after a 3 second count down.
### ~ hint
Once the timer starts, wait for the LED screen to light up and then press the Ground foil with one hand and and the P1 with the other. This will connect the circuit and shut off the timer.
For the experiment we will **not** be utilizing the ``P2`` pin.
The Micro:bit will then read off the time in milliseconds from when the timer starts and the circuit is completed.
### ~
Test the apparatus by putting one hand on the ground pin and one hand on the ``P0`` pin. This will complete the circuit and start the timer on the @boardname@ after a 3 second count down.
Once the timer starts, wait for the LED screen to light up and then press the Ground foil with one hand and and the ``P1`` with the other. This will connect the circuit and shut off the timer.
The @boardname@ will then read off the time in milliseconds from when the timer starts and the circuit is completed.
## Step 2: Variables
## Step 1: Variables
In order for Reaction Time to follow the rules for determining the player's reaction speed, we need to add variables that will store data. Then we will assign (set) the value of the variables. We want to name the four (4) variables as follows: “start”, “end”, “false_start”, and “running”. Set the value of the variables, “start” and “end” to 0. Then set the value of the variable “false_start” and “running” to false. Modify your code so that your code looks like this.
In order for **Reaction Time** to follow the rules for determining the player's reaction speed, we need to add variables that will store data. Then we will assign (set) the value of the variables. We want to name the four (4) variables as follows: “start”, “end”, “false_start”, and “running”. Set the value of the variables, “start” and “end” to 0. Then set the value of the variable “false_start” and “running” to false. Modify your code so that your code looks like this.
In the code below:
- the reaction time experiment will start and end at specific times based on the player's reaction.
@ -37,9 +41,9 @@ start = 0
```
## Step 3: On pin pressed
## Step 2: On pin pressed
We want to register an event handler that will execute whenever the user holds the GND pin with one hand, and presses pin 0 or pin with the other hand, thus completing a circuit. When you run a script with this function in a web browser, click pins 0 or 1 in the simulator. The game will start on P0 and the P1 will detect when the player visualizes a single LED on the screen. Modify your code so that your code looks like this.
We want to register an event handler that will execute whenever the user holds the GND pin with one hand, and presses pin 0 or pin with the other hand, thus completing a circuit. When you run a script with this function in a web browser, click pins 0 or 1 in the simulator. The game will start on ``P0`` and the ``P1`` will detect when the player visualizes a single LED on the screen. Modify your code so that your code looks like this.
```blocks
let start = 0
@ -58,9 +62,9 @@ end = 0
start = 0
```
## Step 4: Countdown timer
## Step 3: Countdown timer
We want to code the countdown timer that will be displayed on pin pressed 0. We will insert three show number blocks to visually display the countdown: 3 2 1. Then we want to add a Basic block clear screen to clear the numbers from the screen. Modify your code so that your code looks like this:
We want to code the countdown timer that will be displayed on pin pressed 0. We will insert three show number blocks to visually display the countdown: ``3 2 1``. Then we want to add a ``|basic|`` block clear screen to clear the numbers from the screen. Modify your code so that your code looks like this:
```blocks
let start = 0
@ -83,9 +87,7 @@ start = 0
```
* click Download to see if the code works as expected.
## Step 5: Boolean
## Step 4: Boolean
We want to set variables, running and set false start to false. This occurs on pin 0 pressed. Those blocks represent the true and false Boolean values. A Boolean has one of two possible values: true; false.
@ -115,7 +117,7 @@ start = 0
```
## Step 6: Begin reaction time randomly
## Step 5: Begin reaction time randomly
We want to introduce the reaction time experiment if there is not a false start on pin 0 pressed. Reaction time will randomly plot a LED on the x and y coordinates. Modify your code so that your code looks like this:
@ -143,7 +145,7 @@ start = 0
```
## Step 7: Plot LED on X, Y coordinates randomly
## Step 6: Plot LED on X, Y coordinates randomly
We want to introduce the reaction time experiment if there is not a false start. Reaction time will randomly plot a LED on the x and y coordinates. Modify your code so that your code looks like this:
@ -178,9 +180,9 @@ start = 0
```
## Step 8: Display feedback to reaction
## Step 7: Display feedback to reaction
We want to add code to detect when the player presses the Ground foil with one hand and and the P1 with the other. This code will connect the circuit and shut off the timer. We will add code to have the Micro:bit read off the time in milliseconds from when the timer starts and the circuit is completed. This code also detects if there is a correct reaction or false start on pin 1 pressed.
We want to add code to detect when the player presses the Ground foil with one hand and and the P1 with the other. This code will connect the circuit and shut off the timer. We will add code to have the @boardname@ read off the time in milliseconds from when the timer starts and the circuit is completed. This code also detects if there is a correct reaction or false start on pin 1 pressed.
We want to display one of two images on pin 1 pressed. The first image displays if the player correctly completes the circuit between GND and P1. A correct reaction occurs to complete the circuit on pin 1 pressed after the randomly generated LED appears on the screen. The seconde image displays if the player completes a circuit between GND and P1 on a false start. A false start occurs when the player completes a circuit on pin 1 pressed before the LED randomly appears on the x, y coordinates. Modify your code so that your code looks like this:
@ -315,5 +317,3 @@ input.onPinPressed(TouchPin.P2, () => {
})
```
* click *Download* to see if the code works as expected.

View File

@ -1,8 +1,8 @@
# Make
### @description Building the reaction time experiment.
![](/static/mb/courses/stem/reaction_time_complete.jpg)
https://youtu.be/DgJ-S0q0EMs
* Fold the foil squares and place them around the cardboard.
* Connect each piece of foil to the appropriate pin on the Micro:bit. Note: For the experiment we will not be utilizing the P2 pin
@ -10,6 +10,8 @@
That's it!
### ~button /projects/reaction-time/code
Code
### ~

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB