NeoPixel RGBW compiler error

Status
Not open for further replies.
I'm using Win 10, Arduino 1.6.5, Teensyduino 1.2.8, Teensy 3.1

I'm trying to compile the RGBW_strandtest.ino fom the NeoPixel library but get a compiler error. In the sketch the gamma table is a lookup array. It hangs right here:

for(uint16_t i=0; i < strip.numPixels(); i++) {
strip.setPixelColor(i, strip.Color(0,0,0, gamma[j] ) );
}

(invalid conversion from 'double (*)(double)' to 'uint8_t {aka unsigned char}' [-fpermissive]

When I compile with an Arduino Mega it works; also other sketches work with Teensy.
Is there something I overlooked?

Any help is highly appreaciated

Gyro

UPDATE: Just found the solution myself:
the error message 'int gamma []' redeclared as different kind of symbol
made me replace gamma with GAMMA - and it compiles !!!

Oh well, you might want to correct this in your Adafruit Library branch .....

Best
Gyro



Using library Adafruit NeoPixel in folder: H:\Hardware\Arduino\arduino-1.6.5-r5\hardware\teensy\avr\libraries\Adafruit_NeoPixel

H:\Hardware\Arduino\arduino-1.6.5-r5/hardware/tools/arm/bin/arm-none-eabi-g++ -c -O -g -Wall -ffunction-sections -fdata-sections -MMD -nostdlib -fno-exceptions -felide-constructors -std=gnu++0x -fno-rtti -mthumb -mcpu=cortex-m4 -fsingle-precision-constant -D__MK20DX256__ -DTEENSYDUINO=128 -DARDUINO=10605 -DF_CPU=72000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH -IH:\Hardware\Arduino\arduino-1.6.5-r5\hardware\teensy\avr\cores\teensy3 -IH:\Hardware\Arduino\arduino-1.6.5-r5\hardware\teensy\avr\libraries\Adafruit_NeoPixel C:\Users\ASUS\AppData\Local\Temp\build4139257646333753890.tmp\RGBW_strandtest.cpp -o C:\Users\ASUS\AppData\Local\Temp\build4139257646333753890.tmp\RGBW_strandtest.cpp.o
RGBW_strandtest.ino:14:11: error: 'int gamma []' redeclared as different kind of symbol
In file included from H:\Hardware\Arduino\arduino-1.6.5-r5\hardware\teensy\avr\cores\teensy3/WProgram.h:6:0,
from H:\Hardware\Arduino\arduino-1.6.5-r5\hardware\teensy\avr\cores\teensy3/Arduino.h:1,
from H:\Hardware\Arduino\arduino-1.6.5-r5\hardware\teensy\avr\libraries\Adafruit_NeoPixel/Adafruit_NeoPixel.h:23,
from RGBW_strandtest.ino:1:
h:\hardware\arduino\arduino-1.6.5-r5\hardware\tools\arm\arm-none-eabi\include\math.h:296:15: error: previous declaration of 'double gamma(double)'
extern double gamma _PARAMS((double));
^
RGBW_strandtest.ino: In function 'void pulseWhite(uint8_t)':
RGBW_strandtest.ino:76:60: warning: pointer to a function used in arithmetic [-Wpointer-arith]
RGBW_strandtest.ino:76:60: error: invalid conversion from 'double (*)(double)' to 'uint8_t {aka unsigned char}' [-fpermissive]
In file included from RGBW_strandtest.ino:1:0:
H:\Hardware\Arduino\arduino-1.6.5-r5\hardware\teensy\avr\libraries\Adafruit_NeoPixel/Adafruit_NeoPixel.h:143:5: error: initializing argument 4 of 'static uint32_t Adafruit_NeoPixel::Color(uint8_t, uint8_t, uint8_t, uint8_t)' [-fpermissive]
Color(uint8_t r, uint8_t g, uint8_t b, uint8_t w);
^
RGBW_strandtest.ino:84:60: warning: pointer to a function used in arithmetic [-Wpointer-arith]
RGBW_strandtest.ino:84:60: error: invalid conversion from 'double (*)(double)' to 'uint8_t {aka unsigned char}' [-fpermissive]
In file included from RGBW_strandtest.ino:1:0:
H:\Hardware\Arduino\arduino-1.6.5-r5\hardware\teensy\avr\libraries\Adafruit_NeoPixel/Adafruit_NeoPixel.h:143:5: error: initializing argument 4 of 'static uint32_t Adafruit_NeoPixel::Color(uint8_t, uint8_t, uint8_t, uint8_t)' [-fpermissive]
Color(uint8_t r, uint8_t g, uint8_t b, uint8_t w);
^
RGBW_strandtest.ino: In function 'void rainbowFade2White(uint8_t, int, int)':
RGBW_strandtest.ino:140:62: warning: pointer to a function used in arithmetic [-Wpointer-arith]
RGBW_strandtest.ino:140:62: error: invalid conversion from 'double (*)(double)' to 'uint8_t {aka unsigned char}' [-fpermissive]
In file included from RGBW_strandtest.ino:1:0:
H:\Hardware\Arduino\arduino-1.6.5-r5\hardware\teensy\avr\libraries\Adafruit_NeoPixel/Adafruit_NeoPixel.h:143:5: error: initializing argument 4 of 'static uint32_t Adafruit_NeoPixel::Color(uint8_t, uint8_t, uint8_t, uint8_t)' [-fpermissive]
Color(uint8_t r, uint8_t g, uint8_t b, uint8_t w);
^
RGBW_strandtest.ino:149:62: warning: pointer to a function used in arithmetic [-Wpointer-arith]
RGBW_strandtest.ino:149:62: error: invalid conversion from 'double (*)(double)' to 'uint8_t {aka unsigned char}' [-fpermissive]
In file included from RGBW_strandtest.ino:1:0:
H:\Hardware\Arduino\arduino-1.6.5-r5\hardware\teensy\avr\libraries\Adafruit_NeoPixel/Adafruit_NeoPixel.h:143:5: error: initializing argument 4 of 'static uint32_t Adafruit_NeoPixel::Color(uint8_t, uint8_t, uint8_t, uint8_t)' [-fpermissive]
Color(uint8_t r, uint8_t g, uint8_t b, uint8_t w);
^
invalid conversion from 'double (*)(double)' to 'uint8_t {aka unsigned char}' [-fpermissive]
 
Status
Not open for further replies.
Back
Top