Created
September 24, 2020 18:21
-
-
Save daveol/680c1c3fe161bdc23b44fa3a9ef72f30 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.#include <DMXSerial.h> | |
void setup() { | |
DMXSerial.init(DMXController); | |
} | |
unsigned int n = 0; | |
// loop through the rainbow colors | |
void loop() { | |
for(int channel = 0; channel < 512; channel++){ | |
int val = (abs(cos( ((16 - 2 * n) + channel) / 20 )) * 255); | |
DMXSerial.write(channel, val); | |
} | |
n++; | |
delayMicroseconds(2000); // wait a little bit | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment