EasyManua.ls Logo

Adafruit Feather M4 Express - Exploring Your First Circuitpython Program

Adafruit Feather M4 Express
178 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Back to Editing Code...
Now! Let's try editing the program you added to your board. Open your code.py file into your editor. We'll make a
simple change. Change the first 0.5 to 0.1 . The code should look like this:
Leave the rest of the code as-is. Save your file. See what happens to the LED on your board? Something changed! Do
you know why? Let's find out!
Exploring Your First CircuitPython Program
First, we'll take a look at the code we're editing.
Here is the original code again:
import board
import digitalio
import time
led = digitalio.DigitalInOut(board.D13)
led.direction = digitalio.Direction.OUTPUT
while True:
led.value = True
time.sleep(0.1)
led.value = False
time.sleep(0.5)
© Adafruit Industries https://learn.adafruit.com/adafruit-feather-m4-express-atsamd51 Page 51 of 183

Table of Contents

Related product manuals