45 lines
1.2 KiB
Markdown
Raw Normal View History

2016-03-25 16:47:20 -07:00
# zoomer blocks lesson
2016-11-01 17:44:37 -07:00
measure the acceleration on the @boardname@ in the "z" direction.
2016-03-25 16:47:20 -07:00
2016-05-26 15:24:10 -07:00
2016-03-25 16:47:20 -07:00
## Topic
Acceleration
## Quick Links
2016-04-13 08:27:45 -07:00
* [activity](/lessons/zoomer/activity)
* [challenges](/lessons/zoomer/challenges)
* [quiz](/lessons/zoomer/quiz)
* [quiz answers](/lessons/zoomer/quiz-answers)
2016-03-25 16:47:20 -07:00
## Prior learning/place of lesson in scheme of work
Learn how to get the **acceleration**, `acceleration` in one of three specified dimensions. We will be learning how to get the acceleration using a forever loop, local variables, input on button pressed, as well as simple commands, such as show number and pause.
## Documentation
2016-04-04 22:33:13 -07:00
```cards
2016-03-29 16:17:34 -07:00
basic.forever(() => {
})
let x = 0
input.acceleration(Dimension.X)
if (true) {
}
input.buttonIsPressed(Button.A)
basic.showNumber(0)
```
2016-03-25 16:47:20 -07:00
## Objectives
* learn how to repeat code in the background forever
* learn how to create a variable to store data
* learn how to get the acceleration value (g-force), in one of three specified dimensions
* learn how to pause your code for the specified number of milliseconds
* learn how to conditionally run code depending on whether a condition is true or not
* learn how to get the state of an input button
* learn how to show a number on the LED screen