New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ESP32 + Hardware SPI #686

Hokyjack opened this Issue Dec 2, 2018 · 2 comments


None yet
2 participants

Hokyjack commented Dec 2, 2018

Hello, is there any progress on supporting Hardware SPI on ESP32 at least for APA102 strips?
The bitbanging works without any problem, but it is unfortunatelly slow for POV effects.
I tried the NeoPixelBus with HW SPI and it works flawlessly. However I really love FastLED's API and would like to stick with this.
Can this be implemented in the near future? I would like to help, unfortunately, this low-level C is a mystery for me.



This comment has been minimized.

RobinB commented Dec 12, 2018

I'm in the same situation, hoping for Hardware SPI with the ESP32, ideally selectable between the different SPI ports (HSPI and VSPI).

@Hokyjack: Could you post your Neopixel code for the hardware spi? Which pins are you using? The library example won't work for me...


This comment has been minimized.

Hokyjack commented Dec 12, 2018

@RobinB I used the official example with this method:
NeoPixelBus<DotStarBgrFeature, DotStarSpiMethod> strip(128);

The only change I did is in DotStarSpiMethod, the Initialize(), I hardcoded the pins I want to use to SPI.begin(SCK, MISO, MOSI, SS). - MISO/SS can be random pins, they are not used. See bellow.

void Initialize()

#if defined(ARDUINO_ARCH_ESP8266) || defined(ARDUINO_ARCH_ESP32)
#elif defined(ARDUINO_ARCH_AVR) 
        SPI.setClockDivider(SPI_CLOCK_DIV2); // 8 MHz (6 MHz on Pro Trinket 3V)
        SPI.setClockDivider((F_CPU + 4000000L) / 8000000L); // 8-ish MHz on Due
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment