-
-
Save JeffersGlass/d6b3f781cfb864adc307f8a3850a0fab 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 <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