Skip to content

Instantly share code, notes, and snippets.

@JeffersGlass
Created June 28, 2020 22:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JeffersGlass/d6b3f781cfb864adc307f8a3850a0fab to your computer and use it in GitHub Desktop.
Save JeffersGlass/d6b3f781cfb864adc307f8a3850a0fab 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;
const int potpin = A0;
int value = 0;
// the setup routine runs once when you press reset:
void setup() {
dmxMaster.enable ();
}
void loop()
{
value = value = map(analogRead(potpin), 0, 1024, 0, 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