#include // The master will control 100 Channels (1-100) #define DMX_MASTER_CHANNELS 100 // // Pin number to change read or write mode on the shield // #define RXEN_PIN 2 DMX_Master dmx_master ( DMX_MASTER_CHANNELS, RXEN_PIN ); // the setup routine runs once when you press reset: void setup() { // Enable DMX master interface and start transmitting dmx_master.enable (); // Set channel 1 - 6 dmx_master.setChannelRange ( 1, 6, 255); //set channel range and intensity dmx_master.setChannelValue ( 1, 0 ); //start moving head channels at 0 (off/Closed) PAN dmx_master.setChannelValue ( 2, 0 ); //TILT dmx_master.setChannelValue ( 3, 0 ); //COLOR dmx_master.setChannelValue ( 4, 0 ); //STROBE dmx_master.setChannelValue ( 5, 0 ); //DIMMER dmx_master.setChannelValue ( 6, 0 ); //GOBO } // the loop routine runs over and over again forever: void loop() { // dmx_master.setChannelValue (2, 127.5); //tilt (straight up) dmx_master.setChannelValue (3, 25); //color wheel (Open/white) dmx_master.setChannelValue (5, 255); //dimmer (intensity) dmx_master.setChannelValue (6, 31); //gobo wheel (Open) int panLeft = 1; int tiltUp = 1; static int dimmer_val; int x = dimmer_val*4; //room for (int panRight = 0; panRight <= 255; panRight = panRight + panLeft) { dmx_master.setChannelValue (1, x++); if (panRight == 255) { panLeft = -1; delay(50); } } for (int tiltDown = 0; tiltDown <= 255; tiltDown = tiltDown + tiltUp) { dmx_master.setChannelValue (2, dimmer_val++); if (tiltDown == 255) { tiltUp = -x; delay(50); } } } // void loop