atuline/FastLED-Demos

inoise8_fire.ino is not compiling.

Opened this issue · 1 comments

inoise8_fire.ino is not compiling,

Arduino: 1.8.9 (Windows 10), Board: "LOLIN(WEMOS) D1 mini Pro, 160 MHz, Flash, Disabled, 16M (15M SPIFFS), v2 Higher Bandwidth, Disabled, None, Only Sketch, 921600"

                 ^

sketch_apr04a:24:9: error: 'uint8_t index' redeclared as different kind of symbol

uint8_t index = 0;

     ^

In file included from C:\Users\HP\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.5.0/tools/sdk/libc/xtensa-lx106-elf/include/stdlib.h:11:0,

             from C:\Users\HP\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.5.0\cores\esp8266/Arduino.h:27,

             from C:\Users\HP\AppData\Local\Temp\arduino_build_526611\sketch\sketch_apr04a.ino.cpp:1:

C:\Users\HP\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.5.0/tools/sdk/libc/xtensa-lx106-elf/include/string.h:54:15: error: previous declaration of 'char* index(const char*, int)'

char *_EXFUN(index,(const char *, int));

           ^

C:\Users\HP\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.5.0/tools/sdk/libc/xtensa-lx106-elf/include/_ansi.h:65:30: note: in definition of macro '_EXFUN'

#define _EXFUN(name, proto) name proto

                          ^

C:\Users\HP\Documents\Arduino\sketch_apr04a\sketch_apr04a.ino: In function 'void inoise8_fire()':

sketch_apr04a:61:11: error: assignment of function 'char* index(const char*, int)'

 index = inoise8(i*xscale,millis()*yscale*NUM_LEDS/255);                                           // X location is constant, but we move along the Y at the rate of millis()

       ^

sketch_apr04a:61:11: error: cannot convert 'uint8_t {aka unsigned char}' to 'char*(const char*, int)' in assignment

sketch_apr04a:62:60: error: invalid operands of types 'int' and 'char*(const char*, int)' to binary 'operator*'

 leds[i] = ColorFromPalette(currentPalette, min(i*(index)>>6, 255), i*255/NUM_LEDS, LINEARBLEND);  // With that value, look up the 8 bit colour palette value and assign it to the current LED.

                                                        ^

Using library FastLED at version 3.2.6 in folder: C:\Users\HP\Documents\Arduino\libraries\FastLED
exit status 1
'uint8_t index' redeclared as different kind of sym

bol

I just successfully compiled it for a Nano. When I see a line in your message that says:

sketch_apr04a:24:9: error: 'uint8_t index' redeclared as different kind of symbol

This tells me that something is wrong in your environment. You should have a folder called:

inoise8_fire and that the ONLY file in that directory should be inoise8_fire.ino

Also, this is what the file should look like (lines 1 through 78):

https://github.com/atuline/FastLED-Demos/blob/master/inoise8_fire/inoise8_fire.ino