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 #51 background imageLoading...
Page #51 background image
What if I Don't Have the Loop?
If you don't have the loop, the code will run to the end and exit. This can lead to some
unexpected behavior in simple programs like this since the "exit" also resets the state
of the hardware. This is a different behavior than running commands via REPL. So if
you are writing a simple program that doesn't seem to work, you may need to add a
loop to the end so the program doesn't exit.
The simplest loop would be:
while True:
pass
And remember - you can press CTRL+C to exit the loop.
See also the Behavior section in the docs().
Connecting to the Serial Console
One of the staples of CircuitPython (and programming in general!) is something called
a "print statement". This is a line you include in your code that causes your code to
output text. A print statement in CircuitPython (and Python) looks like this:
print("Hello, world!")
This line in your code.py would result in:
Hello, world!
However, these print statements need somewhere to display. That's where the serial
console comes in!
The serial console receives output from your CircuitPython board sent over USB and
displays it so you can see it. This is necessary when you've included a print statement
in your code and you'd like to see what you printed. It is also helpful for
troubleshooting errors, because your board will send errors and the serial console will
display those too.
The serial console requires an editor that has a built in terminal, or a separate
©Adafruit Industries Page 51 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