Test your understanding of analog input, calibration, dead zones, and proportional speed
đšī¸ 10 questions covering analogRead(), center calibration, dead zones, and rate control
A two-axis joystick module is electrically equivalent to which components?
When the joystick is resting at center, analogRead() on one axis returns approximately:
analogRead()
In our robot-arm pin map, where do the joystick's VRx and VRy outputs connect?
Why does our sketch measure the joystick's center in setup() instead of hardcoding 512?
setup()
What problem does the dead zone solve?
The joystick's SW pin uses INPUT_PULLUP and connects to GND when pressed. What does digitalRead(joySW) return when the stick is clicked?
INPUT_PULLUP
digitalRead(joySW)
In our code, how does pushing the stick farther make the servo move faster?
What does our signOf(deflection) function return?
signOf(deflection)
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.
stepInterval
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?
These results have been automatically sent to your instructor.