chipKIT® Development Platform

Inspired by Arduino™

AVR-specific code error

Created Sun, 13 May 2018 08:14:36 +0000 by Kyle_B


Kyle_B

Sun, 13 May 2018 08:14:36 +0000

I'm making a simple light strip program to run on a set of 2 (WS2812B Individually Addressable LED Strips). And no matter what i change i'm getting this error:

'In file included from C:\Users\kbutz\OneDrive\Documents\Arduino\libraries\FastLED-3.1.8/platforms/avr/led_sysdefs_avr.h:13:0,

             from C:\Users\kbutz\OneDrive\Documents\Arduino\libraries\FastLED-3.1.8/led_sysdefs.h:32,

             from C:\Users\kbutz\OneDrive\Documents\Arduino\libraries\FastLED-3.1.8/FastLED.h:44,

             from C:\Users\kbutz\OneDrive\Documents\Arduino\sketch_may13a\sketch_may13a.ino:1:

C:\Users\kbutz\AppData\Local\Arduino15\packages\chipKIT\hardware\pic32\2.0.3\cores\pic32/avr/interrupt.h:4:2: error: #error ******** This sketch or library uses AVR-specific code that may not work with the chipKIT platform. See this forum for more information on porting code to chipKIT [www.chipkit.org/forum/viewforum.php?f=7] ********

#error ******** This sketch or library uses AVR-specific code that may not work \

^

exit status 255 Error compiling for board chipKIT uC32. '

I know there are other posts on this topic but most answers either don't apply to this simple of a program or are badly explained. I'm ME not EE/CS so i'm sure its something obvious

Here's the code:

#include <FastLED.h> #define NUM_LEDS 60 #define DATA_PIN_TWO 2 #define DATA_PIN_THREE 3

CRGB leds[NUM_LEDS];

void setup() { // put your setup code here, to run once: //idenitfy first string to its pin FastLED.addLeds<NEOPIXEL, DATA_PIN_TWO>(leds, NUM_LEDS); //idenify second string to its pin FastLED.addLeds<NEOPIXEL, DATA_PIN_THREE>(leds, NUM_LEDS); //Allow for changing clock rate in mHz FastLED.addLeds<APA102, DATA_PIN, CLOCK_PIN, RGB, DATA_RATE_MHZ(24)>(leds, NUM_LEDS);

} //iterate over strip going from blue to red void loop() { // put your main code here, to run repeatedly: for(int dot = 0; dot < NUM_LEDS; dot++) { leds[dot] = CRGB::Blue; FastLED.show(); // clear this led for the next time around the loop leds[dot] = CRGB::Red; delay(30); }


majenko

Sun, 13 May 2018 10:26:34 +0000

It is what it says. FastLED.h is written for AVR chips. chipKIT is PIC32, not AVR.

The equivalent library for WS2812B for chipKIT is the PICxel library:


Kyle_B

Sun, 13 May 2018 18:56:55 +0000

Ah I thought it would be obvious, thanks!