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 #56 background imageLoading...
Page #56 background image
led = digitalio.DigitalInOut(board.LED)
led.direction = digitalio.Direction.OUTPUT
while True:
print("Hello back to you!")
led.value = Tru
time.sleep(1)
led.value = False
time.sleep(1)
Save your file. You will notice that your red LED will stop blinking, and you may have a
colored status LED blinking at you. This is because the code is no longer correct and
can no longer run properly. You need to fix it!
Usually when you run into errors, it's not because you introduced them on purpose.
You may have 200 lines of code, and have no idea where your error could be hiding.
This is where the serial console can help. Let's take a look!
The Traceback (most recent call last): is telling you that the last thing it was
able to run was line 10 in your code. The next line is your error: NameError: name
'Tru' is not defined . This error might not mean a lot to you, but combined with
knowing the issue is on line 10, it gives you a great place to start!
Go back to your code, and take a look at line 10. Obviously, you know what the
problem is already. But if you didn't, you'd want to look at line 10 and see if you could
figure it out. If you're still unsure, try googling the error to get some help. In this case,
you know what to look for. You spelled True wrong. Fix the typo and save your file.
©Adafruit Industries Page 56 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