-
-
Save JeffersGlass/0022785de33a09fc98922f900f6437e1 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 <Servo.h> | |
#include <Conceptinetics.h> | |
#define DMX_SLAVE_CHANNELS 1 | |
// Configure a DMX slave controller | |
DMX_Slave dmx_slave ( DMX_SLAVE_CHANNELS ); | |
const int ledPin = 6; | |
void setup() { | |
dmx_slave.enable (); | |
dmx_slave.setStartAddress (2); | |
// Set led pin as output pin | |
pinMode(ledPin, OUTPUT ); | |
analogWrite(ledPin, 0); | |
} | |
void loop() | |
{ | |
// getChannelValue is relative to the configured startaddress | |
analogWrite(ledPin, dmx_slave.getChannelValue(1)); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment