上QQ阅读APP看书,第一时间看更新
How to do it...
To do this, perform the following steps:
- Run the following lines of code in the REPL:
>>> from adafruit_circuitplayground.express import cpx >>> cpx.red_led = True
- You should see the pin 13 LED turn red at this stage.
- Check the current state of the LED using the following code:
>>> cpx.red_led True
- To turn off the LED, run the following code in the REPL:
>>> cpx.red_led = False
- The light of the pin 13 LED will now be switched off.