The Analog Stick
We have learned how to control the servos using the knob potentiometer. This is good to use for some robots, but controlling it another way may be helpful too. What if we just want to control it using a control stick?
Set up your arduino similar to below and write up a new code similar to below. Send it to your board and see what it does.
Set up your arduino similar to below and write up a new code similar to below. Send it to your board and see what it does.
Each student then does a redesign to incorporate at least 3 servos in the design. Students are taught how to manipulate the premade code for the Arduino servo to assist their build (analog stick code taught). Students then try to get it working in their design.
(after they get the analog stick to work, have them switch the potentiometer and analog stick analog input port and see how that changes how the servos react.) The stick acts like the knob now.
(after they get the analog stick to work, have them switch the potentiometer and analog stick analog input port and see how that changes how the servos react.) The stick acts like the knob now.