Objective: Students will learn:
What a servo motor is, and what it does
Adding the servo extension to MakeCode
Setting a servo position using MakeCode and sensor values
How to eliminate jitter
A servomotor is a specialized motor whose position can be precisely controlled with code.
Standard servos can be set to a position from 0 to 180 degrees
Continuous servos spin like a conventional motor, but the speed can be precisely controlled
Start by connecting the servo wire to the Kitronik Robotics board- SV1 through SV8
Addi the Kitronik Robotics extension :
Under the Robotics Board, Open Servos:
Below: Pushing Buttons B sets the servo to 123 degrees:
Below: Using the light level to set the servo position: