adding sketeches
This commit is contained in:
parent
165cd0c67e
commit
13383e6232
@ -2,11 +2,6 @@
|
||||
|
||||
In ths project, we will build a timing gate, a system that can measure the speed of a car.
|
||||
|
||||
The timing gate is made of two sensors that can detect the moving car.
|
||||
When the car goes through the gate, it triggers each sensor and the micro:bit
|
||||
records the times. The speed is then computed by dividing the distance between the sensors
|
||||
by the time between each sensor trigger.
|
||||
|
||||
### ~hint
|
||||
|
||||
This lesson explains the principles of timing gates using household materials. To build high performance gates,
|
||||
@ -42,6 +37,27 @@ control.eventTimestamp();
|
||||
basic.showNumber(0)
|
||||
```
|
||||
|
||||
## How does it work?
|
||||
|
||||
The two gates are connected to the micro:bit and can detect a car passing through.
|
||||
|
||||
![](/static/mb/projects/timing-gates/sketchgates.jpg "Sketch of the gates")
|
||||
|
||||
As the car passes through the gate ``0``, it sends an event to the micro:bit through the [on pin pressed](/reference/input/on-pin-pressed) block.
|
||||
The micro:bit records the time in a variable ``t0``.
|
||||
|
||||
![](/static/mb/projects/timing-gates/sketchgate1.jpg "Sketch first gate")
|
||||
|
||||
As the car passes through the gate ``1``, it sends an event to the micro:bit through the [on pin pressed](/reference/input/on-pin-pressed) block.
|
||||
The micro:bit records the time in a variable ``t1``.
|
||||
|
||||
![](/static/mb/projects/timing-gates/sketchgate2.jpg "Sketch first gate")
|
||||
|
||||
The rest is a bit of math and physics. The time taken to cross the gates is computed as the difference of ``t1 - t0``.
|
||||
By dividing the distance between the gates by the duration, we get the speed of the car!
|
||||
|
||||
![](/static/mb/projects/timing-gates/sketchmath.jpg "Sketch math")
|
||||
|
||||
## Building the gate
|
||||
|
||||
The sensor is made by tapping two strips of fail on the cardboard as close as possible.
|
||||
|
BIN
docs/static/mb/projects/timing-gates/sketchgate1.jpg
vendored
Normal file
BIN
docs/static/mb/projects/timing-gates/sketchgate1.jpg
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 52 KiB |
BIN
docs/static/mb/projects/timing-gates/sketchgate2.jpg
vendored
Normal file
BIN
docs/static/mb/projects/timing-gates/sketchgate2.jpg
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 46 KiB |
BIN
docs/static/mb/projects/timing-gates/sketchgates.jpg
vendored
Normal file
BIN
docs/static/mb/projects/timing-gates/sketchgates.jpg
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 53 KiB |
BIN
docs/static/mb/projects/timing-gates/sketchmath.jpg
vendored
Normal file
BIN
docs/static/mb/projects/timing-gates/sketchmath.jpg
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 70 KiB |
Loading…
Reference in New Issue
Block a user