Skip to content

Instantly share code, notes, and snippets.

@JeffersGlass
Created June 28, 2020 22:18
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save JeffersGlass/6ea35c97865250c2ad364ec7f1ca0e71 to your computer and use it in GitHub Desktop.
#include <Conceptinetics.h>
#define dmxMaster_CHANNELS 512
#define RXEN_PIN 2
DMX_Master dmxMaster ( dmxMaster_CHANNELS, RXEN_PIN );
const int LEDPIN = 11;
const int valueSlot = 1;
int value = 0;
// the setup routine runs once when you press reset:
void setup() {
dmxMaster.enable ();
}
void loop()
{
value = (value + 4) % 255;
analogWrite(LEDPIN, value);
dmxMaster.setChannelValue (valueSlot, value);
delay(25);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment