hi everyone , im a electronic studenf from portugal and i have been folow this tread for weeks. at the moment im trying to do a globe pov as project.
teensy 3.2
low cost prop shield
43 leds only apa102c
5v pc power supply
i wonder if i can get any help . at the moment im stuck in the code (@Mortonkopf code) using arduino ide 1.6.12 and teensyduino beta.
#include "FastLED.h"
#define NUM_LEDS 43//number of leds in strip length on one side
CRGB leds[NUM_LEDS];
int numberOfSlices = 50 ;
void setup() {
delay(200);
FastLED.addLeds<APA102, BGR>(leds, NUM_LEDS);
pinMode(7, OUTPUT);
digitalWrite(7, HIGH); // enable access to LED
}
const unsigned int array1[] = { 0xfefefe, 0xfefefe, 0xfefefe, 0xfefefe, 0xfefefe, 0xfefefe, 0xfefefe, 0xfefefe, 0xfefefe, 0xfefefe, 0xfefefe, 0xfefefe, 0xfefefe, 0xfefefe, 0xfefefe, 0xfefefe, 0xfefefe, 0xfefefe, 0xfefefe, 0xfefefe, 0xfefefe, 0xfefefe, 0xfefefe, 0xfefefe, 0xfefefe, 0xfefefe, 0xfefefe, 0xfefefe, 0xfefefe, 0xfefefe, 0xfefefe, 0xfefefe, 0xfefefe, 0xfefefe, 0xfefefe, 0xfefefe, 0xfefefe, 0xfefefe, 0xfefefe, 0xfefefe, 0xfefefe, 0xfefefe, 0xfefefe, 0xfefefe, 0xfefefe, 0xfefefe, 0xfefefe, 0xfefefe, 0xfefefe, 0xfefefe, 0xfefefe, 0xfefefe, 0xfefefe, 0xfefefe, 0xfefefe, 0xfefefe, 0xfefefe, 0xfefefe, 0xfefefe, 0xfefefe, 0xfefefe, 0................, }; //end of array*
void loop() {
PoiSonic(2000,array1); //call method, with duration to show (2sec) and array name.
}
void PoiSonic(unsigned long time, const unsigned int array[]){
unsigned long currentTime = millis();
while (millis()< currentTime + (time)) {
int f= numberOfSlices;
int z; //a counter
int j=NUM_LEDS;
for (int x=0;x<f;x++){
for(z=NUM_LEDS;z>0;z--){
leds[z-1]=array[x+((j-z)*f)];}
FastLED.show();
delayMicroseconds(40); //may need to increase / decrease depending on spin rate
}
delayMicroseconds(1000); //may need to increase / decrease depending on spin rate
}
}
but give this error at digitalWrite(7,HIGH);
Arduino: 1.6.12 (Windows 10), TD: 1.31-beta1, Board: "Teensy 3.2 / 3.1, Serial, 96 MHz optimize speed (overclock), US English"
stray '\302' in program