Updated ESP32 NeoMethods (markdown)

Michael Miller
2023-05-27 10:31:05 -07:00
parent df051cf4cc
commit 5de211f97f

@@ -4,7 +4,8 @@ The ESP32 and the ESP32S2 both have some pins dedicated for input only. The fol
For the ESP32 all pins below 34 are output pins. You will still need to check your board to make sure any of these pins are available. [Esp32 Dev Pin Map](https://docs.espressif.com/projects/arduino-esp32/en/latest/boards/ESP32-DevKitC-1.html#pin-layout)
For the ESP32S2 all pins other than 46 are output pins. Again, please check your specific board for available pins.
The bitbang method has further restrictions in that it will only support pins below 32.
If you notice any flickering related to network activity and/or high CPU load you might want to look into [ESP32 and RTOS tasks](https://github.com/Makuna/NeoPixelBus/wiki/ESP32-and-RTOS-Tasks)
If you notice any flickering related to network activity and/or high CPU load you might want to look into [ESP32 and RTOS tasks](https://github.com/Makuna/NeoPixelBus/wiki/ESP32-and-RTOS-Tasks)
ESP32C3 and ESP32S3 do not support I2S at this time; RMT method is used by default for these platforms.
All methods for the ESP32 platform will follow this template for the methods name. The LED names are the same from the simple names and will not be listed in full below as we will focus on the hardware details on this page.
@@ -12,13 +13,15 @@ All methods for the ESP32 platform will follow this template for the methods nam
## I2S
The I2S hardware is used to send the data. This method uses very little CPU for actually sending the data to NeoPixels but it requires an extra buffer for the I2S DMA to read from. Thus, there is a tradeoff of CPU use versus memory use. The extra buffer needed is four times the size of the primary pixel buffer.
**NOTE:** ESP32S3 and ESP32C3 do not support I2S method at this time. You must use the RMT methods for these.
A single I2S peripheral can send a single channel (pin) or it can send a collection of parallel channels. Each of these have different methods.
### Single Channel:
* I2s0 - Uses the I2S 0 peripheral, an example would be NeoEsp32**I2s0**Ws2812xMethod.
* I2s1 - Uses the I2S 1 peripheral, an example would be NeoEsp32**I2s1**Ws2812xMethod.
* I2sN - An example would be NeoEsp32**I2sN**Ws2812xMethod. [The I2S peripheral to use is defined at runtime as an argument on the NeoPixelBus constructor](https://github.com/Makuna/NeoPixelBus/wiki/NeoPixelBus-object-API#neopixelbust_color_feature-t_methoduint16_t-countpixels-uint8_t-pin-neobuschannel-channel).
**NOTE:** The ESP32S2 and ESP32C3 only support one i2s hardware bus. Thus you can only use the NeoEsp32I2s0*Method types.
**NOTE:** The ESP32S2 only supports one I2S hardware bus. Thus you can only use the NeoEsp32I2s0*Method types.
### Parallel Channels:
These methods can be instanced more than once, up to the number of channels specified. They consume memory for the length of the longest instance multiplied by the number of channels, so use the least number of channels that you need.
@@ -42,7 +45,7 @@ The RMT peripheral is used to send data to the NeoPixels. Thus, this method use
* RmtN - Uses the RMT but allows the channel selection to be done at runtime. An example would be NeoEsp32**RmtN**Ws2812xMethod. [The RMT channel to use is defined at runtime as an argument on the NeoPixelBus constructor](https://github.com/Makuna/NeoPixelBus/wiki/NeoPixelBus-object-API#neopixelbust_color_feature-t_methoduint16_t-countpixels-uint8_t-pin-neobuschannel-channel).
**NOTE:** Even though the ESP32 has 8 channels of RMT hardware, using beyond 4 has shown to cause sending delays.
**NOTE:** The ESP32S2 only supports 4 channels of RMT hardware, so only channels 0-3 are available.
**NOTE:** The ESP32S2 and ESP32S3 only supports 4 channels of RMT hardware, so only channels 0-3 are available.
**NOTE:** The ESP32C3 only supports 2 channels of RMT hardware, so only channels 0 and 1 are available.
**NOTE:** NeoEsp32Rmt# Methods supports any available pin below 34.