EasyManuals Logo

Adafruit ESP32-S3 User Manual

Adafruit ESP32-S3
263 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #48 background imageLoading...
Page #48 background image
while True:
led.value = True
time.sleep(0.1)
led.value = False
time.sleep(0.1)
Now it blinks really fast! You decreased the both time that the code leaves the LED on
and off!
Now try increasing both of the 0.1 to 1 . Your LED will blink much more slowly
because you've increased the amount of time that the LED is turned on and off.
Well done! You're doing great! You're ready to start into new examples and edit them
to see what happens! These were simple changes, but major changes are done using
the same process. Make your desired change, save it, and get the results. That's
really all there is to it!
Naming Your Program File
CircuitPython looks for a code file on the board to run. There are four options: code.tx
t, code.py, main.txt and main.py. CircuitPython looks for those files, in that order, and
then runs the first one it finds. While code.py is the recommended name for your code
file, it is important to know that the other options exist. If your program doesn't seem
to be updating as you work, make sure you haven't created another code file that's
being read instead of the one you're working on.
Exploring Your First CircuitPython Program
First, you'll take a look at the code you're editing.
Here is the original code again:
import board
import digitalio
import time
led = digitalio.DigitalInOut(board.LED)
led.direction = digitalio.Direction.OUTPUT
while True:
led.value = True
time.sleep(0.5)
led.value = False
time.sleep(0.5)
©Adafruit Industries Page 48 of 263

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Adafruit ESP32-S3 and is the answer not in the manual?

Adafruit ESP32-S3 Specifications

General IconGeneral
BrandAdafruit
ModelESP32-S3
CategoryMicrocontrollers
LanguageEnglish

Related product manuals