The quiz will be available during the first few minutes of lab, which you will complete individually. Your lab TA will open the quiz and tell you the password you will need to get into the quiz for your section. For convenience, please click on your lab section below to access your quiz:
Section 10 am - https://forms.gle/EXWWeY3fUQedhM5u8
Section 11 am - https://forms.gle/4T2raCCmvrqmfWwq7
This lab will give you some practice using the accelerometer on the CPX, which you may want to use as a sensor for Assignment 5. You will be using the accelerometer to trigger events by moving your CPX.
For this lab, create a CPX program that does either of the following (you do not need to do both!):
Move the soccer player up or down as you tilt the board, from Unit 6A, Lesson 13, Level 5.
Finish the code so you can maneuver the car to reach the checkered flag in Unit 6A, Lesson 13, Level 7b.
The ball/car should move in both directions to get full credit for the lab.
Remember you need to run your program within the Google Chrome browser for this to work, and that you may need to Enable the Maker Toolkit within your app.
The other levels in Lesson 13 may be helpful in completing this lab. I would suggest you look at them. Here is a brief summary of them, to help you decide which ones may be more useful to you:
Level 1: "pitch" is used to capture forward/back motion, and "roll" captures left/right rolling. You will have to pay attention to which direction is forward relative to what your program is expecting.
Level 2: Experiment with code to change your screen color depending on the motion that is detected.
Level 3: Turn on particular LED's to indicate when you tilt your CPX in that direction. Again you will have to pay attention to which direction is forward.
Level 4: Display different text on the screen depending on which direction you tilt your CPX.
Level 5: Move a soccer player up and down to block a moving ball, making a game out of it.
Level 6: Move a jogger on the screen every time you shake the board.
Level 7: Five different activities using the accelerometer:
Level 7a: Measure how much the board moves passing it from person to person.
Level 7b: Maneuver the car to get to the checkered flag without touching any of the red flags.
Level 7c: Move confetti around the screen as the CPX is shaken.
Level 7d: Tilt the CPX to try and hold a given number.
Level 7e: Tilt the CPX in two directions to move the cursor to one of four images.
Level 8: Move a cursor using tilt and roll for assistive technology.
Level 9: More advanced applications.
Once you are done, copy the link to your app from the Maker App. Turn this in on Gradescope, under "Lab 9: CPX Accelerometer."
This lab must be completed by 11:59pm on Tuesday, October 22, 2024. No late submissions will be accepted.
1 point: Ball or car moves when CPX is tilted.
1 point: Ball or car correctly moves in the direction of board tilt for both directions. ( Both up and down or both right and left. )
Extra credit (1 point): Unit 6A, Lesson 13, Level 8, complete the code to move the cursor to any arbitrary spot on the screen by tilting up/down or right/left, as an assistive mouse.