In this recipe, we will learn how to create a program that will repeatedly print whether a slide switch is on or off. Slide switches have their own strengths, and this recipe will demonstrate how you can incorporate one into your project.
Reading a slide switch
Getting ready
You will need access to the REPL on the Circuit Playground Express to run the code presented in this recipe.
How to do it...
Let's perform the following steps:
- Ensure that the slide switch is flipped to the left-hand side. Run the following lines of code in the REPL:
>>> from adafruit_circuitplayground...