Help with Neopixel and Teensy 3.6

Status
Not open for further replies.

magma

Member
Hello Friends, this is my first post here, so please be gentle :)
I am using Teensy 3.6 and trying to compile/upload the Neopixel strandtest example, but I have a bunch of errors, if anyone could give any hint I would be very greatfull!

/Users/gui/Documents/Arduino/libraries/Adafruit_NeoPixel/Adafruit_NeoPixel.cpp: In member function 'void Adafruit_NeoPixel::show()':
/Users/gui/Documents/Arduino/libraries/Adafruit_NeoPixel/Adafruit_NeoPixel.cpp:1359:3: error: 'Pio' was not declared in this scope
Pio *port;
^
/Users/gui/Documents/Arduino/libraries/Adafruit_NeoPixel/Adafruit_NeoPixel.cpp:1359:19: error: 'port' was not declared in this scope
Pio *port;
^
/Users/gui/Documents/Arduino/libraries/Adafruit_NeoPixel/Adafruit_NeoPixel.cpp:1360:12: error: 'WoReg' does not name a type
volatile WoReg *portSet, *portClear, *timeValue, *timeReset;
^
/Users/gui/Documents/Arduino/libraries/Adafruit_NeoPixel/Adafruit_NeoPixel.cpp:1363:29: error: 'pmc_set_writeprotect' was not declared in this scope
pmc_set_writeprotect(false);
^
/Users/gui/Documents/Arduino/libraries/Adafruit_NeoPixel/Adafruit_NeoPixel.cpp:1364:35: error: 'TC3_IRQn' was not declared in this scope
pmc_enable_periph_clk((uint32_t)TC3_IRQn);
^
/Users/gui/Documents/Arduino/libraries/Adafruit_NeoPixel/Adafruit_NeoPixel.cpp:1364:43: error: 'pmc_enable_periph_clk' was not declared in this scope
pmc_enable_periph_clk((uint32_t)TC3_IRQn);
^
/Users/gui/Documents/Arduino/libraries/Adafruit_NeoPixel/Adafruit_NeoPixel.cpp:1365:16: error: 'TC1' was not declared in this scope
TC_Configure(TC1, 0,
^
/Users/gui/Documents/Arduino/libraries/Adafruit_NeoPixel/Adafruit_NeoPixel.cpp:1366:5: error: 'TC_CMR_WAVE' was not declared in this scope
TC_CMR_WAVE | TC_CMR_WAVSEL_UP | TC_CMR_TCCLKS_TIMER_CLOCK1);
^
/Users/gui/Documents/Arduino/libraries/Adafruit_NeoPixel/Adafruit_NeoPixel.cpp:1366:19: error: 'TC_CMR_WAVSEL_UP' was not declared in this scope
TC_CMR_WAVE | TC_CMR_WAVSEL_UP | TC_CMR_TCCLKS_TIMER_CLOCK1);
^
/Users/gui/Documents/Arduino/libraries/Adafruit_NeoPixel/Adafruit_NeoPixel.cpp:1366:38: error: 'TC_CMR_TCCLKS_TIMER_CLOCK1' was not declared in this scope
TC_CMR_WAVE | TC_CMR_WAVSEL_UP | TC_CMR_TCCLKS_TIMER_CLOCK1);
^
/Users/gui/Documents/Arduino/libraries/Adafruit_NeoPixel/Adafruit_NeoPixel.cpp:1366:64: error: 'TC_Configure' was not declared in this scope
TC_CMR_WAVE | TC_CMR_WAVSEL_UP | TC_CMR_TCCLKS_TIMER_CLOCK1);
^
/Users/gui/Documents/Arduino/libraries/Adafruit_NeoPixel/Adafruit_NeoPixel.cpp:1367:18: error: 'TC_Start' was not declared in this scope
TC_Start(TC1, 0);
^
/Users/gui/Documents/Arduino/libraries/Adafruit_NeoPixel/Adafruit_NeoPixel.cpp:1369:15: error: 'g_APinDescription' was not declared in this scope
pinMask = g_APinDescription[pin].ulPin; // Don't 'optimize' these into
^
/Users/gui/Documents/Arduino/libraries/Adafruit_NeoPixel/Adafruit_NeoPixel.cpp:1371:3: error: 'portSet' was not declared in this scope
portSet = &(port->PIO_SODR); // burn a few cycles after
^
/Users/gui/Documents/Arduino/libraries/Adafruit_NeoPixel/Adafruit_NeoPixel.cpp:1372:3: error: 'portClear' was not declared in this scope
portClear = &(port->PIO_CODR); // starting timer to minimize
^
/Users/gui/Documents/Arduino/libraries/Adafruit_NeoPixel/Adafruit_NeoPixel.cpp:1373:3: error: 'timeValue' was not declared in this scope
timeValue = &(TC1->TC_CHANNEL[0].TC_CV); // the initial 'while'.
^
/Users/gui/Documents/Arduino/libraries/Adafruit_NeoPixel/Adafruit_NeoPixel.cpp:1374:3: error: 'timeReset' was not declared in this scope
timeReset = &(TC1->TC_CHANNEL[0].TC_CCR);
^
/Users/gui/Documents/Arduino/libraries/Adafruit_NeoPixel/Adafruit_NeoPixel.cpp:1349:22: error: 'VARIANT_MCK' was not declared in this scope
#define SCALE VARIANT_MCK / 2UL / 1000000UL
^
/Users/gui/Documents/Arduino/libraries/Adafruit_NeoPixel/Adafruit_NeoPixel.cpp:1351:36: note: in expansion of macro 'SCALE'
#define TIME_800_0 ((int)(0.40 * SCALE + 0.5) - (5 * INST))
^
/Users/gui/Documents/Arduino/libraries/Adafruit_NeoPixel/Adafruit_NeoPixel.cpp:1383:14: note: in expansion of macro 'TIME_800_0'
time0 = TIME_800_0;
^
/Users/gui/Documents/Arduino/libraries/Adafruit_NeoPixel/Adafruit_NeoPixel.cpp:1349:22: error: 'VARIANT_MCK' was not declared in this scope
#define SCALE VARIANT_MCK / 2UL / 1000000UL
^
/Users/gui/Documents/Arduino/libraries/Adafruit_NeoPixel/Adafruit_NeoPixel.cpp:1354:36: note: in expansion of macro 'SCALE'
#define TIME_400_0 ((int)(0.50 * SCALE + 0.5) - (5 * INST))
^
/Users/gui/Documents/Arduino/libraries/Adafruit_NeoPixel/Adafruit_NeoPixel.cpp:1388:14: note: in expansion of macro 'TIME_400_0'
time0 = TIME_400_0;
^
/Users/gui/Documents/Arduino/libraries/Adafruit_NeoPixel/Adafruit_NeoPixel.cpp:1398:18: error: 'TC_CCR_CLKEN' was not declared in this scope
*timeReset = TC_CCR_CLKEN | TC_CCR_SWTRG;
^
/Users/gui/Documents/Arduino/libraries/Adafruit_NeoPixel/Adafruit_NeoPixel.cpp:1398:33: error: 'TC_CCR_SWTRG' was not declared in this scope
*timeReset = TC_CCR_CLKEN | TC_CCR_SWTRG;
^
/Users/gui/Documents/Arduino/libraries/Adafruit_NeoPixel/Adafruit_NeoPixel.cpp:1408:17: error: 'TC_Stop' was not declared in this scope
TC_Stop(TC1, 0);
^
Multiple libraries were found for "Adafruit_NeoPixel.h"
Used: /Users/gui/Documents/Arduino/libraries/Adafruit_NeoPixel
Not used: /Applications/Arduino.app/Contents/Java/hardware/teensy/avr/libraries/Adafruit_NeoPixel
Error compiling for board Teensy 3.6.
 
As mentioned up in RED for each of these posts, it would help to see what code you are actually using...

From the last line of the error messages, it looks like you are compiling for Teensy 3.6.

Also that it is using a version of the Neopixel library which is in your <arduino sketch folder>/libraries.Adafruit_neopixel

Which I have no idea what version of code that is.

It mentions that it is not using the version that is installed by Teensyduino.

First thing I would do would be to delete the version you have; /Users/gui/Documents/Arduino/libraries/Adafruit_NeoPixel
And let it use the one Teensyduino installed: /Applications/Arduino.app/Contents/Java/hardware/teensy/avr/libraries/Adafruit_NeoPixel

And see if that fixes your issues.
 
I didn't post any code because I am just uing the "simple" example provided by the original library.

But as you said, I removed the adafruit library and it is working now! Thanks so much for your help!!
 
Status
Not open for further replies.
Back
Top