I've been trying to control a ws2812b rgb led matrix with an esp32 or a portenta h7, I've tried various libraries but none of them seems to work. I know that the led matrix takes 5v input not 3.3v but if that were the issue it would be an easy fix, but my problem is that I tried to measure the signal with my oscilloscope but couldn't manage to see the signal. I tried measuring the output signal on an arduino uno there the signal was clearly visible and I don't know what the problem might be, does anyone have any ideas?
Welcome to the forum
Please post a simple sketch that illustrates the problem, using code tags when you do
Which pin on the ESP32 are you using to drive the LED strip and how is the strip powered ?
Please identify exactly which matrix you have, as they differ. Link to product or datasheet, please. Then show us how it's wired, with a schematic.
how large is the matrix> how do you power the matrix?
I found the Adafruit_NeoPixel library does not work with ESP32 Arduino Core Version 3
It is a concurrency problem within neopixelWrite() and RMT.
see NeoPixel can crash system. · Issue #9903 · espressif/arduino-esp32 · GitHub
EDIT: seem to remember I had to use ESP32 core 2.0.17
Use any free Esp32 gpio pin from 16 to 33, make sure to set that on your code as well.
Easy fix. Please report what happened when you tried that, and say why it is unsatisfactory as a solution on your circumstances.
a7
I currently dont have the sketch on hand but I tried using the basic adafruit_neopixel or fastLED examples. I'm using digital pin 6 on an arduino nano esp32. The esp32 and the led matrix is hooked up to an external 5v power supply. Tha same sketch works flawlessly on the arduino uno but I need a faster microcontroller for my project
is different MCU variant from ESP32.
Do you have correct board selected?
It's an 8x32 ws2812b led matrix, i've tried several libraries including the fastLED library but I switched to the adafruit_neopixel library because I'm planning on using a portenta h7 and it's not compatible with the fastLED library
I've done that already
I've used a logic level shifter and it didn't do anything. The problem that I have is that the board doesn't send the control signal at all. I've measured it with an oscilloscope and didn't pick up anything on the other hand using the arduino uno r4 the signal was clearly visible
Yes, I have the correct board selected
Bad pin header soldering?
If not, post a photo of your wiring and your code (using code tags).
Which of the two pin numbering systems have you got selected in the IDE ?
Please be specific. How did you shift the logic level?
Please post your code, as @UKHeliBob asks
a simple sketch that illustrates the problem
You
and later imply that there simply was no signal. Can you see a signal on the same pin if you just use code to toggle it rapidly?
I'm thinking your signal is showing up elsewhere; perhaps a flaw not within your control means the library messes up getting the output pin right.
a7
The soldering can't be bad because the board and the pin that I'm trying to use works if I use it for anything else. Here's the code
// NeoPixel Ring simple sketch (c) 2013 Shae Erisson
// Released under the GPLv3 license to match the rest of the
// Adafruit NeoPixel library
#include <Adafruit_NeoPixel.h>
#ifdef __AVR__
#include <avr/power.h> // Required for 16 MHz Adafruit Trinket
#endif
// Which pin on the Arduino is connected to the NeoPixels?
#define PIN 6 // On Trinket or Gemma, suggest changing this to 1
// How many NeoPixels are attached to the Arduino?
#define NUMPIXELS 16 // Popular NeoPixel ring size
// When setting up the NeoPixel library, we tell it how many pixels,
// and which pin to use to send signals. Note that for older NeoPixel
// strips you might need to change the third parameter -- see the
// strandtest example for more information on possible values.
Adafruit_NeoPixel pixels(NUMPIXELS, PIN, NEO_GRB + NEO_KHZ800);
#define DELAYVAL 500 // Time (in milliseconds) to pause between pixels
void setup() {
// These lines are specifically to support the Adafruit Trinket 5V 16 MHz.
// Any other board, you can remove this part (but no harm leaving it):
#if defined(__AVR_ATtiny85__) && (F_CPU == 16000000)
clock_prescale_set(clock_div_1);
#endif
// END of Trinket-specific code.
pixels.begin(); // INITIALIZE NeoPixel strip object (REQUIRED)
}
void loop() {
//pixels.clear(); // Set all pixel colors to 'off'
// The first NeoPixel in a strand is #0, second is 1, all the way up
// to the count of pixels minus one.
for(int i=0; i<NUMPIXELS; i++) { // For each pixel...
// pixels.Color() takes RGB values, from 0,0,0 up to 255,255,255
// Here we're using a moderately bright green color:
pixels.setPixelColor(i, pixels.Color(0, 150, 0));
//delay(DELAYVAL); // Pause before next pass through loop
}
pixels.show(); // Send the updated pixel colors to the hardware.
}
This is the code that I used to measure the signal on the R4
Try with D6 or 9



