ESP32-S3 board pins

Please tell us which board you are using.
For CircuitPython issues, ask in the Adafruit CircuitPython forum.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
sebastienperth
 
Posts: 113
Joined: Fri Jan 15, 2021 4:21 pm

ESP32-S3 board pins

Post by sebastienperth »

I am having trouble controlling some elements that are on-board the feather.
I tried to use the neopixel to indicate a magnetic switch was activated, and that failed.
I found another way to confirm the magnetic switch worked, but never got the Neopixel to work.
I then tried to turn off the STEMMA power pin, but also to no avail.

I have a STEMMA aLIS3DH connected and it still has its green LED on.
This is what I've tried, with both board.D7 and board.NEOPIXEL, but with the same result.

My code is likely the issue, but I couldn't find a good example.
I also understand that there is a known issue with the battery monitoring component, so I am wondering if there are other known issues with this board... or if my code is the problem.

Code: Select all

import time
import digitalio
import board

OFF2C = digitalio.DigitalInOut(board.D7)
OFF2C = digitalio.DriveMode.PUSH_PULL 
OFF2C = digitalio.Pull.DOWN

Thanks

User avatar
mikeysklar
 
Posts: 13936
Joined: Mon Aug 01, 2016 8:10 pm

Re: ESP32-S3 board pins

Post by mikeysklar »

board.NEOPIXEL is the preferred syntax
NeoPixel LED - This addressable RGB NeoPixel LED, labeled Neo on the board, works both as a status LED (in CircuitPython and the bootloader), and can be controlled with code. It is available in CircuitPython as board.NEOPIXEL, and in Arduino as PIN_NEOPIXEL
Can you try this code:

Code: Select all

# SPDX-FileCopyrightText: 2021 Kattni Rembor for Adafruit Industries
# SPDX-License-Identifier: MIT
"""CircuitPython status NeoPixel red, green, blue example."""
import time
import board
import neopixel

pixel = neopixel.NeoPixel(board.NEOPIXEL, 1)

pixel.brightness = 0.3

while True:
    pixel.fill((255, 0, 0))
    time.sleep(0.5)
    pixel.fill((0, 255, 0))
    time.sleep(0.5)
    pixel.fill((0, 0, 255))
    time.sleep(0.5)

User avatar
sebastienperth
 
Posts: 113
Joined: Fri Jan 15, 2021 4:21 pm

Re: ESP32-S3 board pins

Post by sebastienperth »

Oh yes, I tried that too. I meant to mention it in my original post.

User avatar
adafruit2
 
Posts: 22148
Joined: Fri Mar 11, 2005 7:36 pm

Re: ESP32-S3 board pins

Post by adafruit2 »

please read the circuitpython input example code for exactly how to set up inputs with pullups - youre reassigning the variable which will not work

https://learn.adafruit.com/circuitpytho ... tal-in-out

User avatar
sebastienperth
 
Posts: 113
Joined: Fri Jan 15, 2021 4:21 pm

Re: ESP32-S3 board pins

Post by sebastienperth »

Ok, I have tried taking the input pull up code from the example on the link you sent.
This is what I have:

Code: Select all

import time
import board
import DigitalInOut

STEMOFF = DigitalInOut(board.I2C_POWER)
STEMOFF.direction = Direction.INPUT
STEMOFF.pull = Pull.UP

while True:
	STEMOFF.value = False
And I have tried without the while loop, and changing the value to True just to try it... and so far, nothing seems to turn off the power to the STEMMA connector. I have a LIS3DH sensor whose light stays on.
Last edited by sebastienperth on Wed Oct 05, 2022 3:42 pm, edited 1 time in total.

User avatar
adafruit2
 
Posts: 22148
Joined: Fri Mar 11, 2005 7:36 pm

Re: ESP32-S3 board pins

Post by adafruit2 »

keep reading to learn how to make a digital output

Locked
Please be positive and constructive with your questions and comments.

Return to “Feather - Adafruit's lightweight platform”