0

FastLED Circuit Playground Compiling Error
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

FastLED Circuit Playground Compiling Error

by cavanaudio on Thu May 13, 2021 10:18 pm

Total rookie here, but was able to cobble together a fun code a few years back and everything worked great. I wanted to make some small adjustments to the code today, but after updating the libraries I was using:

Code: Select all | TOGGLE FULL SIZE
#include <Adafruit_Circuit_Playground.h>
#include <Adafruit_CircuitPlayground.h>
#include <FastLED.h>


The script no longer compiles. I didn't even make any changes to the script yet, so I'm not sure what broke it. Here's the error I'm getting:

Arduino: 1.8.13 (Mac OS X), Board: "Adafruit Circuit Playground"

In file included from /Users/mattcavanaugh/Documents/Arduino/Lamp_Sketch_03_051221_1/Lamp_Sketch_03_051221_1.ino:5:0:
/Users/mattcavanaugh/Documents/Arduino/libraries/FastLED/src/FastLED.h:14:21: note: #pragma message: FastLED version 3.004.000
# pragma message "FastLED version 3.004.000"
^~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /Applications/Arduino.app/Contents/Java/libraries/Adafruit_Circuit_Playground/Adafruit_Circuit_Playground.h:28:0,
from /Users/mattcavanaugh/Documents/Arduino/Lamp_Sketch_03_051221_1/Lamp_Sketch_03_051221_1.ino:3:
/Applications/Arduino.app/Contents/Java/libraries/Adafruit_Circuit_Playground/utility/CPlay_CapacitiveSensor.h:25:15: error: conflicting declaration 'typedef volatile uint8_t uint8_t'
#define RwReg uint8_t
^
/Users/mattcavanaugh/Documents/Arduino/libraries/FastLED/src/platforms/avr/led_sysdefs_avr.h:17:32: note: in expansion of macro 'RwReg'
typedef volatile uint8_t RwReg; /**< Read-Write 8-bit register (volatile unsigned int) */
^~~~~
In file included from /Applications/Arduino.app/Contents/Java/hardware/tools/avr/lib/gcc/avr/7.3.0/include/stdint.h:9:0,
from /Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/inttypes.h:37,
from /Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/pgmspace.h:88,
from /Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino/Arduino.h:28,
from sketch/Lamp_Sketch_03_051221_1.ino.cpp:1:
/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/stdint.h:126:22: note: previous declaration as 'typedef unsigned char uint8_t'
typedef unsigned int uint8_t __attribute__((__mode__(__QI__)));
^~~~~~~
exit status 1
Error compiling for board Adafruit Circuit Playground.


Any help would be much appreciated, happy to provide more info as well. Thanks!

cavanaudio
 
Posts: 7
Joined: Thu Dec 07, 2017 4:14 pm

Re: FastLED Circuit Playground Compiling Error

by adafruit_support_mike on Fri May 14, 2021 2:24 am

Drop this line:

Code: Select all | TOGGLE FULL SIZE
#include <Adafruit_CircuitPlayground.h>
The main header is the Adafruit_Circuit_Playground.h

The other version is typosquatting for some older code that didn't have the second underscore, and just calls the main header. That might be calling some low-level files twice though, which would lead to the 'already defined' errors you're getting.

adafruit_support_mike
 
Posts: 62799
Joined: Thu Feb 11, 2010 2:51 pm

Re: FastLED Circuit Playground Compiling Error

by cavanaudio on Fri May 14, 2021 2:31 am

Thanks, Mike! I removed that line but unfortunately I'm still getting the same compiling error. Anything else I should check?

cavanaudio
 
Posts: 7
Joined: Thu Dec 07, 2017 4:14 pm

Re: FastLED Circuit Playground Compiling Error

by cavanaudio on Fri May 14, 2021 4:58 pm

Is it possible the FastLED library is just no longer functioning properly? I can't even #include it at the head of the script without it throwing a compiling error.

cavanaudio
 
Posts: 7
Joined: Thu Dec 07, 2017 4:14 pm

Re: FastLED Circuit Playground Compiling Error

by adafruit_support_mike on Fri May 14, 2021 9:46 pm

The FastLED library still works as far as I know.

Low-level errors like the ones you're getting often mean that the board support packages have gotten messed up. That can happen, especially when a library update skips a version.

Try locating your Arduino15 folder, throwing the whole thing away, and reinstalling the board support package from scratch.

adafruit_support_mike
 
Posts: 62799
Joined: Thu Feb 11, 2010 2:51 pm

Re: FastLED Circuit Playground Compiling Error

by cavanaudio on Sat May 15, 2021 1:27 am

I trashed the folder, but it's still not working.

I can #include the <Adafruit_Circuit_Playground.h> and <FastLED.h> each separately with no compiling issues, but if I include them both together I still get that error.

cavanaudio
 
Posts: 7
Joined: Thu Dec 07, 2017 4:14 pm

Re: FastLED Circuit Playground Compiling Error

by adafruit_support_mike on Sat May 15, 2021 5:21 pm

Hmm.. let me check with some of the other engineers to see if they know any compatibility problems.

adafruit_support_mike
 
Posts: 62799
Joined: Thu Feb 11, 2010 2:51 pm

Re: FastLED Circuit Playground Compiling Error

by adafruit2 on Sat May 15, 2021 5:53 pm

are you using a 32u4 based CircuitPlayground?

adafruit2
Site Admin
 
Posts: 20065
Joined: Fri Mar 11, 2005 7:36 pm

Re: FastLED Circuit Playground Compiling Error

by cavanaudio on Sat May 15, 2021 9:56 pm

I believe so, it has "8MHz ATmega32U4" printed on the back, purchased December 2017.

cavanaudio
 
Posts: 7
Joined: Thu Dec 07, 2017 4:14 pm

Re: FastLED Circuit Playground Compiling Error

by adafruit2 on Sun May 16, 2021 10:00 am

does it work if you do

Code: Select all | TOGGLE FULL SIZE
#include <FastLED.h>
#include <Adafruit_CircuitPlayground.h>

adafruit2
Site Admin
 
Posts: 20065
Joined: Fri Mar 11, 2005 7:36 pm

Re: FastLED Circuit Playground Compiling Error

by cavanaudio on Sun May 16, 2021 2:38 pm

Oh wow, that works! I didn't realize FastLED had to be included first.

Thanks so much for your help, I've finally got my script working again!

cavanaudio
 
Posts: 7
Joined: Thu Dec 07, 2017 4:14 pm

Please be positive and constructive with your questions and comments.