glowing pendulum quiz
construct a pendulum that glows using acceleration #LED #number #math #acceleration #docs
Name
Directions
Use this activity document to guide your work in the glowing pendulum tutorial
Answer the questions while completing the tutorial. Pay attention to the dialogues!
1. Why are you creating a 'forever' loop?
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'.
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'.
4. Write the code that uses the acceleration value from question #3 to set the brightness on the BBC micro:bit.
5. Write the code that tuns all the LEDs on (as the image displays below)
![](/gitea/c_meyer/pxt-calliope/media/commit/6a932a9c5c2f2455d6ddfdb8e8939056790a8744/docs/lessons/glowing-pendulum/static/mb/lessons/glowing-pendulum-1.png)