From 5b2cd6fa8a5c6af3addd5cb0abc2e7a2049d3325 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20L=C3=B8vbr=C3=B8tte=20Olsen?= Date: Thu, 6 Apr 2017 13:36:20 +0200 Subject: [PATCH] Create Gamecube.ino --- School/vg2/borg/demos/Gamecube.ino | 79 ++++++++++++++++++++++++++++++ 1 file changed, 79 insertions(+) create mode 100644 School/vg2/borg/demos/Gamecube.ino diff --git a/School/vg2/borg/demos/Gamecube.ino b/School/vg2/borg/demos/Gamecube.ino new file mode 100644 index 0000000..21e221b --- /dev/null +++ b/School/vg2/borg/demos/Gamecube.ino @@ -0,0 +1,79 @@ +#include +#include + +#define NUM_LEDS 54 +#define DATA_PIN 7 + +#define COLOR (CRGB) 0x0000FF + +CRGB leds[NUM_LEDS]; + +LEDSelect head; + +void setup() { + FastLED.addLeds(leds, NUM_LEDS); + initMap(); + FastLED.clear(); +} + +void loop() { + setColor({4, 1, 0}, COLOR, leds); + FastLED.show(); + delay(280); + setColor({4, 0, 0}, COLOR, leds); + FastLED.show(); + delay(280); + setColor({4, 0, 1}, COLOR, leds); + FastLED.show(); + delay(280); + setColor({4, 0, 2}, COLOR, leds); + FastLED.show(); + delay(280); + + setColor({0, 0, 0}, COLOR, leds); + FastLED.show(); + delay(280); + setColor({0, 0, 1}, COLOR, leds); + FastLED.show(); + delay(280); + setColor({0, 0, 2}, COLOR, leds); + FastLED.show(); + delay(280); + setColor({0, 0, 2}, COLOR, leds); + FastLED.show(); + delay(280); + setColor({0, 1, 2}, COLOR, leds); + FastLED.show(); + delay(280); + setColor({0, 2, 2}, COLOR, leds); + FastLED.show(); + delay(280); + + setColor({1, 0, 2}, COLOR, leds); + FastLED.show(); + delay(280); + setColor({1, 1, 2}, COLOR, leds); + FastLED.show(); + delay(280); + setColor({1, 2, 2}, COLOR, leds); + FastLED.show(); + delay(280); + setColor({1, 2, 1}, COLOR, leds); + FastLED.show(); + delay(280); + setColor({1, 2, 0}, COLOR, leds); + FastLED.show(); + delay(280); + setColor({1, 1, 0}, COLOR, leds); + FastLED.show(); + + delay(320); + + setColor({1, 0, 0}, COLOR, leds); + setColor({4, 2, 2}, COLOR, leds); + setColor({0, 2, 0}, COLOR, leds); + FastLED.show(); + + delay(2000); + FastLED.clear(); +}