This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Porting Fastled library to nRF51422

Hi all,

I am developing firmwares for the nRF51422 under Eclipse with the ARM GCC toolchain.

I have a matrix of WS2812 (or neopixel) RGB LEDs that I am controlling using the code available here.

However, I would like to use the FastLED library that is tailored for the Arduino environment.

Is there a way to migrate the code of the FastLED library to my eclipse environment outside of the Arduino IDE (without using the wiring programming environment)?

I already tested the library on my device using the package provided by redbearlab but now I want to use FastLED completely outside of Arduino.

Best regards, Alex

Parents
  • I actually developed the nrf51822 support directly inside of eclipse, outside of the arduino environment. You should be able to use the library without wiring. For the most part, the only thing FastLED uses the arduino libraries for is the pinMode method on platforms where I'm feeling too lazy to do direct port manipulation. The only other thing is you might need to make sure there's two methods:

    uint32_t millis(); // return the number of milliseconds since device startup (used by the frame rate limiter in the library and by the EVERY_N_MILLI* macros for timing/scheduling)

    void delay(uint32_t ms); // delay the given number of millis

    Even then, I'm not entirely sure that you'd need millis.

    After I finish up the RGBW/RGB16 work i'll go back and do another round of trimming out any remaining arduino dependencies.

Reply
  • I actually developed the nrf51822 support directly inside of eclipse, outside of the arduino environment. You should be able to use the library without wiring. For the most part, the only thing FastLED uses the arduino libraries for is the pinMode method on platforms where I'm feeling too lazy to do direct port manipulation. The only other thing is you might need to make sure there's two methods:

    uint32_t millis(); // return the number of milliseconds since device startup (used by the frame rate limiter in the library and by the EVERY_N_MILLI* macros for timing/scheduling)

    void delay(uint32_t ms); // delay the given number of millis

    Even then, I'm not entirely sure that you'd need millis.

    After I finish up the RGBW/RGB16 work i'll go back and do another round of trimming out any remaining arduino dependencies.

Children
Related