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
  • So I tried to include the FastLED library into a new Eclipse project. I modified the standard makefile I have to support .cpp files but I might have done something wrong because I get now a redefinition error on FASTLED_HAS_CLOCKLESS between clockless_arm_nrf51.h and led_sysdefs_arm_nrf51.h.

    Do you know what I did wrong?

    Best regards

  • After reviewing my makefile, it appears that the redefinition problem is a warning which was treated as an error. However, now I have to redefine the function micros() which is included in the function delay() that you mentioned before. I also have to redefine delayMicroseconds(). For delayMicroseconds(), I suppose I could use the function nrf_delay_us() instead. For micros(), it is a bit more tricky. I see that the definition is in wiring.cpp but is there a description of it somewhere?

Reply
  • After reviewing my makefile, it appears that the redefinition problem is a warning which was treated as an error. However, now I have to redefine the function micros() which is included in the function delay() that you mentioned before. I also have to redefine delayMicroseconds(). For delayMicroseconds(), I suppose I could use the function nrf_delay_us() instead. For micros(), it is a bit more tricky. I see that the definition is in wiring.cpp but is there a description of it somewhere?

Children
No Data
Related