Skip to content

Nano 33 BLE NeoMethods

Michael Miller edited this page Dec 9, 2019 · 7 revisions

The Nano 33 BLE (Sense) uses a NRF52840 chip that provides hardware PWM support. Due to the bluetooth features of this board, a software bitbang method can not be used as it would not provide a consistent and timely pulse as required.
This PWM hardware support provides an excellent asyncrounous signal that is not effected by other features of the board.

The Pwm2 is the default PWM channel used when using the standard method names. Neo800KbpsMethod is the same as NeoNrf52xPwm2800KbpsMethod. So these specific PWM channel names are only needed if you to need to avoid using PWM channel 2 or you want to use more than one channel at a time.

NeoNrf52xPwm# Methods

The NeoNrf52xPwm2800KbpsMethod is an example. The number following the Pwm is 0-3; providing 4 channels of the PWM hardware that can all be used at once. All the variants for different leds (Ws2812x, Ws12813, etc) are supported. Inverted signal feature is also supported.

These methods support any available pin.

These methods uses PWM DMA hardware support to send data to the NeoPixels. Thus this method uses very little CPU for actually sending the data to NeoPixels but it requires an extra buffer for hardware to read from. This extra buffer is 16x the size of the primary buffer due to the requirements of the PWM DMA hardware as it represents each bit to send using a 16 bit value.

If memory becomes a problem on your project, create an issue on Github to investigate solutions that require less memory

Clone this wiki locally