In this recipe, you will learn how to use the two push buttons on the Circuit Playground Express to control the angle of a servo. The script in this recipe will increase the servo angle each time push button A is pressed, and will decrease the angle each time push button B is pressed. These types of scripts are very useful whenever you want to create a project where people can directly control servos using different input controls, such as push buttons.
Controlling servos with buttons
Getting ready
You will need access to the REPL on the Circuit Playground Express to run the code presented in this recipe.