Lesson 12 Quiz: Joystick Control

Test your understanding of analog input, calibration, dead zones, and proportional speed

đŸ•šī¸ 10 questions covering analogRead(), center calibration, dead zones, and rate control

Student Information

Question 1: What's Inside a Joystick?

A two-axis joystick module is electrically equivalent to which components?

Question 2: Analog Range

When the joystick is resting at center, analogRead() on one axis returns approximately:

Question 3: Pin Map

In our robot-arm pin map, where do the joystick's VRx and VRy outputs connect?

Question 4: Why Calibrate?

Why does our sketch measure the joystick's center in setup() instead of hardcoding 512?

Question 5: The Dead Zone

What problem does the dead zone solve?

Question 6: The Stick Button

The joystick's SW pin uses INPUT_PULLUP and connects to GND when pressed. What does digitalRead(joySW) return when the stick is clicked?

Question 7: Proportional Speed

In our code, how does pushing the stick farther make the servo move faster?

Question 8: signOf()

What does our signOf(deflection) function return?

Question 9: Fixed Interval, Variable Step

Our sketch keeps stepInterval fixed at 15 ms and changes the step size instead. Why is this better than keeping the step at 1° and changing the delay between steps? Hint: think about what else the loop() is doing every iteration.

Question 10: Mode Toggle

Right now clicking the stick sends both servos home. Describe how you would change SW into a mode toggle between "manual joystick control" and "serial command control" — what state variable would you add, and where in loop() would you check it?

← Back to Lesson 12
Next: Lesson 13 →