I am writing my first LED strip controller code and have gotten thru about 100 lines of code just fine until I just went to verify the code. I'm working on the cloud editor so not with a physical board as I don't have the components yet and just setting stuff up to start when I do have the LED strip. When I went to verify my code this last time it gave me this error:
In file included from /var/run/arduino/custom-libraries/FastLED/src/pixeltypes.h:7:0,
from /var/run/arduino/custom-libraries/FastLED/src/cpixel_ledcontroller.h:10,
from /var/run/arduino/custom-libraries/FastLED/src/controller.h:7,
from /var/run/arduino/custom-libraries/FastLED/src/FastLED.h:65,
from /run/arduino/sketches/Addressable_LED_with_Arduino/Addressable_LED_with_Arduino.ino:1:
/var/run/arduino/custom-libraries/FastLED/src/lib8tion.h:377:10: fatal error: lib8tion/math8.h: No such file or directory #include "lib8tion/math8.h"
^~~~~~~~~~~~~~~~~~
compilation terminated.
I don't know what could have caused the change to this as I have not changed the #include function in the slightest and it has been working fine until now. Anyone have any suggestions?
Yeah I will include my code below but when trying to fix this I made the rest of my code except the #include a comment and it still came up with the error. Last night is did think about trying to create another function in the code my coping and modifying the code but after I decided not to change it. Maybe I accidentally did something there?
#include <FastLED.h>
#define LED_Pin 5
#define LEDnum 20
CRGB leds[LEDnum];
byte Intens = 100;
byte Hue1 = 0;
byte Sat1 = 100;
byte Hue2 = 80;
byte Sat2 = 100;
byte Hue3 = 160;
byte Sat3 = 100;
byte Fx = 0;
byte preFX = 0; //to determan if the effect just changed
//unsigned int Frame = 0;
byte Decay = 225;
void setup() {
FastLED.addLeds<WS2812B, LED_Pin>(leds, LEDnum);
FastLED.setBrightness(100); //to start will probably get set to 225 eventualy
}
void loop() {
/*
Intens =
Hue1 =
Sat1 =
Hue2 =
Sat2 =
Hue3 =
Sat3 =
Fx =
Frame =
Decay =
*/
if(PreFX != Fx) {
resetRandomArray();
}
FastLED.setBrightness(Intens);
fill_solid(leds, LEDnum, CHSV(0, 0, 0));
fadeToBlackBy(leds, LEDnum, 225);
switch (Fx) {
case 0:
fill_solid(leds, LEDnum, CHSV(Hue1, Sat1, 225));
break;
case 1:
for(int i = 0; i <= Frame; i++) {
leds[i] = CHSV(Hue1, Sat1, 225);
fadeToBlackBy(leds, LEDnum, 225);
}
break;
case 2:
for(int i = 0; i <= Frame; i++) {
leds[(LEDnum - 1) - i] = CHSV(Hue1, Sat1, 225);
fadeToBlackBy(leds, LEDnum, 225);
}
break;
case 3:
for(int i = 0; i <= Frame; i++) {
leds[i] = CHSV(Hue1, Sat1, 225);
leds[(LEDnum - 1) - i] = CHSV(Hue1, Sat1, 225);
fadeToBlackBy(leds, LEDnum, 225);
}
break;
case 4:
if(LEDnum % 2 = 0) {
for(int i = 0; i <= Frame; i++) {
leds[LEDnum/2 + i] = CHSV(Hue1, Sat1, 225);
leds[(LEDnum/2 - 1) - i] = CHSV(Hue1, Sat1, 225);
fadeToBlackBy(leds, LEDnum, 225);
}
}
else {
for(int i = 0; i <= Frame; i++) {
leds[LEDnum/2 - 0.5 + i]
}
}
break;
case 5:
break;
case 6:
break;
case 7:
break;
case 8:
break;
case 9:
break;
case 10:
break;
case 11:
break;
case 12:
break;
case 13:
break;
case 14:
break;
case 15:
break;
}
}
//void resetRandomArray() {
}
problem solved the file I accidentally edited was still in my custom library and had the same name as FastLED. When I called FastLED it was taking the edited code that I broke and using that over the normal code. Once I deleted the custom code the problem was fixed.