Arduino added

Added test code for the arduino
This commit is contained in:
Jake Hillion 2020-04-26 18:08:16 +01:00
parent 60003a939f
commit 602884b271

26
arduino/arduino.ino Normal file
View File

@ -0,0 +1,26 @@
#include "FastLED.h"
#define NUM_STRIPS 2
#define NUM_LEDS_PER_STRIP 180
#define PIN_0 12
#define PIN_1 13
CRGB leds[NUM_STRIPS][NUM_LEDS_PER_STRIP];
void setup() {
FastLED.addLeds<NEOPIXEL, PIN_0>(leds[0], NUM_LEDS_PER_STRIP);
FastLED.addLeds<NEOPIXEL, PIN_1>(leds[1], NUM_LEDS_PER_STRIP);
}
void loop() {
for(int x = 0; x < NUM_STRIPS; x++) {
// This inner loop will go over each led in the current strip, one at a time
for(int i = 0; i < NUM_LEDS_PER_STRIP; i++) {
leds[x][i] = CRGB::Red;
FastLED.show();
leds[x][i] = CRGB::Black;
delay(100);
}
}
}