reorg lesson
This commit is contained in:
		@@ -9,6 +9,28 @@ you will need better sensors such as [Hall Effect sensors](https://en.wikipedia.
 | 
			
		||||
 | 
			
		||||
### ~
 | 
			
		||||
 | 
			
		||||
## How does it work?
 | 
			
		||||
 | 
			
		||||
The two gates are connected to the micro:bit and can detect a car passing through.
 | 
			
		||||
 | 
			
		||||

 | 
			
		||||
 | 
			
		||||
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``.
 | 
			
		||||
 | 
			
		||||

 | 
			
		||||
 | 
			
		||||
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``.
 | 
			
		||||
 | 
			
		||||

 | 
			
		||||
 | 
			
		||||
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!
 | 
			
		||||
 | 
			
		||||

 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
## Materials
 | 
			
		||||
 | 
			
		||||
* Carboard
 | 
			
		||||
@@ -37,27 +59,6 @@ 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.
 | 
			
		||||
 | 
			
		||||

 | 
			
		||||
 | 
			
		||||
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``.
 | 
			
		||||
 | 
			
		||||

 | 
			
		||||
 | 
			
		||||
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``.
 | 
			
		||||
 | 
			
		||||

 | 
			
		||||
 | 
			
		||||
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!
 | 
			
		||||
 | 
			
		||||

 | 
			
		||||
 | 
			
		||||
## Building the gate
 | 
			
		||||
 | 
			
		||||
The sensor is made by tapping two strips of fail on the cardboard as close as possible.
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user