There are two different types of Servo Motors available with the Climate Action Kit: the Continuous Servo Motor and the Positional Servo Motor. Each motor functions slightly differently and is programmed differently in MakeCode.
Additionally, it’s important to understand that Servo Motors function differently than the other robotic components in the Climate Action Kit. The other robotic components in the kit like the Solar Sensor or Touch Sensor, are unique and considered ‘smart’ components. This means that MakeCode can sense that they’re there and address each component because there’s only one of each. When it comes to Servo Motors, there can be multiple motors connected at one time, so we have to tell MakeCode what port on the Breakout Board to direct the code to so it reaches the desired Servo Motor.
Watch the video below for a full tutorial on using the Servo Motors in the Climate Action Kit.
Important Notes
- Always double check your project and code to ensure you’re coding the same ‘Left’, ‘Middle’, or ‘Right’ port as you’re physically connected to on the Breakout Board.
- Use the virtual simulators in MakeCode to make sure ‘leftServo’ = ‘Left’ and so on. This ensures that the code you’ve written for ‘leftServo’ is being sent to the physical ‘Left’ port on the Breakout Board.
- If the ports ever become mixed up, click the ‘leftServo’ value on the virtual simulators to manual assign what code is being sent to what physical port.