pxt-calliope/docs/lessons/glowing-pendulum/quiz.md

35 lines
930 B
Markdown
Raw Normal View History

2016-03-26 00:47:20 +01:00
# glowing pendulum quiz
2016-04-02 01:22:47 +02:00
construct a pendulum that glows using acceleration.
2016-03-26 00:47:20 +01:00
## Name
## Directions
2016-04-13 17:27:45 +02:00
Use this activity document to guide your work in the [glowing pendulum tutorial](/lessons/glowing-pendulum/activity)
2016-03-26 00:47:20 +01:00
Answer the questions while completing the tutorial. Pay attention to the dialogues!
## 1. Why are you creating a 'forever' loop?
<br/>
## 2. Write the line of code to measure the acceleration with respect to the "y" axis and store this value in a local variable called 'acceleration'.
<br/>
## 3. After storing the acceleration in a variable, write the code to take the absolute value of the acceleration, and store this value inside 'acceleration'.
<br/>
2016-03-31 01:25:19 +02:00
## 4. Write the code to include acceleration value question 3 to set the brightness on the BBC micro:bit.
2016-03-26 00:47:20 +01:00
<br/>
## 5. Write the code that tuns all the LEDs on (as the image displays below)
![](/static/mb/lessons/glowing-pendulum-1.png)
<br/>