diff --git a/platformio.ini b/platformio.ini index dae5907..8efbcb9 100644 --- a/platformio.ini +++ b/platformio.ini @@ -7,3 +7,8 @@ ; ; Please visit documentation for the other options and examples ; http://docs.platformio.org/page/projectconf.html +[env:uno] +; lib_install = fastled +platform = atmelavr +framework = arduino +board = uno diff --git a/src/main.cpp b/src/main.cpp new file mode 100644 index 0000000..180f3a5 --- /dev/null +++ b/src/main.cpp @@ -0,0 +1,42 @@ +/** + * LED Strip host. + * + * Turns LEDs red (for now) + */ + +#include "Arduino.h" +#include + +#ifndef LED_BUILTIN +#define LED_BUILTIN 13 +#endif + +#define NUM_LEDS 300 +#define DATA_PIN 6 + +CRGB leds[NUM_LEDS]; +int count = 0; + +void setup() +{ + // Init fastled + FastLED.addLeds(leds, NUM_LEDS); +} + +void loop() +{ + int i; + for (i=0;i<=count;i++) + leds[i] = CRGB::Blue; + + for (;i= NUM_LEDS) + count = 0; + + FastLED.show(); + // wait for a second + delay(100); +}