Skip to content

inoise8_fire.ino is not compiling. #26

@JanBosNL

Description

@JanBosNL

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions