put lessons back for Michael
This commit is contained in:
30
docs/lessons/love-meter.md
Normal file
30
docs/lessons/love-meter.md
Normal file
@ -0,0 +1,30 @@
|
||||
# love meter blocks lesson
|
||||
|
||||
Create a love meter with the BBC micro:bit.
|
||||
|
||||
## Topic
|
||||
|
||||
On Pin Pressed
|
||||
|
||||
## Quick Links
|
||||
|
||||
* [activity](/lessons/love-meter/activity)
|
||||
* [quiz](/lessons/love-meter/quiz)
|
||||
* [quiz answers](/lessons/love-meter/quiz-answers)
|
||||
* [challenges](/lessons/love-meter/challenges)
|
||||
|
||||
|
||||
## Prior learning/place of lesson in scheme of work
|
||||
|
||||
Learn how to use the **pin pressed**, `on pin pressed` to run code when the user holds the GND pin with one hand, and presses pin 0 with the other hand, thus completing a circuit. We will be learning how to create a love meter using input on pin pressed, a local variable, math random, If (conditional) as well as simple commands, such as show number, pause, and show string.
|
||||
|
||||
## Documentation
|
||||
|
||||
```cards
|
||||
if (true) {}
|
||||
input.onPinPressed(TouchPin.P0, () => {})
|
||||
let x = 0
|
||||
Math.random(3)
|
||||
basic.showNumber(0)
|
||||
basic.pause(100)
|
||||
```
|
Reference in New Issue
Block a user