ESP32-S3 TFT with Neokey 1x2

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
squarn
 
Posts: 7
Joined: Tue Oct 18, 2022 7:42 pm

ESP32-S3 TFT with Neokey 1x2

Post by squarn »

Hello, I am using an ESP32-S3 (with TFT) and trying to get a Neokey 1x2 working. I have successfully wired it manually using jumpers, and have the keys working properly. However, I am not sure how to access/use the neopixels on the Neokey. I tried the two following scenarios:

Connect to the Neokey via I2C:
I connected the Neokey via Qwiic cable to the board and scanned for its address, which returns "0xb". I tried to create the Neokey connection (using the Neokey 1x4 i2c protocol, which I wasn't sure would work or not) and the neokey library (which might only support the 1x4 Neokey) gives me a value error: "No I2C device at address: 0xb".

Connect to the Neokey manually:
I was able to manually connect to keys A and B and they're working as switches. But how do I connect to the board to control its neopixels? I don't see anything on the board's screenprint that I think indicates a designated neopixel I/O. I looked at this project: https://learn.adafruit.com/deco-two-key ... on-feather, which uses the following to access the neopixels:

Code: Select all

pixel_pin = board.D9
pixels = neopixel.NeoPixel(pixel_pin, 2, brightness=1.0)
pixels.fill(BLACK)
time.sleep(0.3)
pixels.fill(WHITE)
time.sleep(0.3)
pixels.fill(BLACK)
time.sleep(0.3)
pixels[0] = MAGENTA
pixels[1] = CYAN
The author utilizes the stacking headers, which I do not want to do at this point. How can I accomplish the same with manual wiring, if possible?

Thanks for any help or advice. If there are any clear gaps in my interpretation, please let me know, I am very new to this.

User avatar
dastels
 
Posts: 15659
Joined: Tue Oct 20, 2015 3:22 pm

Re: ESP32-S3 TFT with Neokey 1x2

Post by dastels »

OK, you have the NeoKey Featherwing. This is NOT an I2C device. It is simply switches and NeoPixels. The NeoKey 1x4, on the other hand, IS an I2C device. The device at 0x0B is the battery "fuel gauge" on the Feather board.

As detailed on the product page:
Switch A - Connects to the Feather pin to the left of SCL, on most Feathers this is pin D5
Switch B - Connects to the Feather pin two pins to the left of SCL, on most Feathers this is pin D6
NeoPixel Input - Connects to the Feather pin three pins to the left of SCL, on most Feathers this is pin D9
Bonus STEMMA QT connector allows you to make solderless connections between your Wing and a wide range of other sensors and accessories using a compatible cable. QT Cable is not included, but we have a variety in the shop.
There are pin holes at the end of the board (not the STEMMA-QT end) for the switches (A & B) and the NeoPixels (IN & OUT) you want to connect to the IN pin to control the NeoPixels. Create a NeoPixel object based on whatever Feather pin you connect it to as shown in the code you posted (it has IN connected to D9 which is the default when connected to a Feather in the usual way).

Dave

User avatar
squarn
 
Posts: 7
Joined: Tue Oct 18, 2022 7:42 pm

Re: ESP32-S3 TFT with Neokey 1x2

Post by squarn »

That makes so much sense, thank you for the clarification!

User avatar
squarn
 
Posts: 7
Joined: Tue Oct 18, 2022 7:42 pm

Re: ESP32-S3 TFT with Neokey 1x2

Post by squarn »

Follow-up:

I copied the Deco Keypad code verbatim and wired the suggested pins. A to D5, B to D6, and In to D9, but the neopixels on both of my featherwings (I tried a second, just in case) do nothing. No errors are thrown, but the neopixels never light up, not before the loop or when keys are pressed. Could I be missing something else?

User avatar
dastels
 
Posts: 15659
Joined: Tue Oct 20, 2015 3:22 pm

Re: ESP32-S3 TFT with Neokey 1x2

Post by dastels »

You have power and ground connected (I assume ground since the keys work). There's no schematic for the Featherwing so I don't know for sure how the NeoPixels are being powered, but my guess is by the 3.3v pin.

Dave

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

Return to “Feather - Adafruit's lightweight platform”