I have been using the AdvancedLedBeltKit.pde included in AdaFruit library as an example. I note the latest version has some #ifdef USB_SERIAL at the beginning with a comment about teensy...
- Code: Select all | TOGGLE FULL SIZE
#if defined(USB_SERIAL) || defined(USB_SERIAL_ADAFRUIT)
// this is for teensyduino support
int dataPin = 2;
int clockPin = 1;
#else
// these are the pins we use for the LED belt kit using
// the Leonardo pinouts
int dataPin = 16;
int clockPin = 15;
#endif
Down further it says...
- Code: Select all | TOGGLE FULL SIZE
// Instantiate LED strip; arguments are the total number of pixels in strip,
// the data pin number and clock pin number:
LPD8806 strip = LPD8806(numPixels, dataPin, clockPin);
// You can also use hardware SPI for ultra-fast writes by omitting the data
// and clock pin arguments. This is faster, but the data and clock are then
// fixed to very specific pin numbers: on Arduino 168/328, data = pin 11,
// clock = pin 13. On Mega, data = pin 51, clock = pin 52.
//LPD8806 strip = LPD8806(numPixels);
In preparing to use the hardware SPI, I wired the strip up to use Data =>11 Clock =>13
This works just fine and dandy on Teensy if I urn using the software SPI (first LDP9906 instantiation)
However if I switch the comment-out to use the hardware SPI, it no longer functions.
Why?
And why is the #fidef USB_SERIAL talking about Teensy and using pins 2/3?
I am hoping to use the Teensy UART to do comms with Fred board using EZ-Transfer
This worked ok with the slower LDP8806 Belt demo code and software SPI, when I showed it at TEDxMaui.
Hoping for some quick fixes!