code.py
1 # SPDX-FileCopyrightText: 2017 Kattni Rembor for Adafruit Industries 2 # 3 # SPDX-License-Identifier: MIT 4 5 from adafruit_circuitplayground import cp 6 7 while True: 8 if cp.switch: 9 print("Slide switch off!") 10 else: 11 print("Slide switch on!")