1
1
// - - - - -
2
2
// DmxSerial - A hardware supported interface to DMX.
3
3
// DMXSerialFlow.ino: Sample DMX application for sending 60 DMX values.
4
- // Copyright (c) 2014 by Matthias Hertel, http://www.mathertel.de
4
+ // Copyright (c) 2014-2015 by Matthias Hertel, http://www.mathertel.de
5
5
// This work is licensed under a BSD style license. See http://www.mathertel.de/License.aspx
6
6
//
7
7
// Documentation and samples are available at http://www.mathertel.de/Arduino
@@ -21,16 +21,13 @@ const int RedPin = 9; // PWM output pin for Red Light.
21
21
const int GreenPin = 6 ; // PWM output pin for Green Light.
22
22
const int BluePin = 5 ; // PWM output pin for Blue Light.
23
23
24
- // The number of RGB pixels, RGB channels are transfered
25
- #define PIXELS 60
26
24
27
25
void setup (void )
28
26
{
29
27
// Serial.begin(57600); // only on Leonardo
30
28
// Serial.println("DMXSerialFlow DMX Example");
31
29
32
30
DMXSerial.init (DMXController);
33
- // DMXSerial.init(DMXController, 4);
34
31
35
32
// Set the number of channels the controller will send
36
33
// this call is not needed, because the DMXController extends the DMX packet length automatically when data is added.
@@ -84,7 +81,7 @@ void loop(void)
84
81
// uncomment this line to have a scenario where DMX values are changed every 5 seconds
85
82
// alpha &= 0xFF00;
86
83
87
- for (int n = 0 ; n < PIXELS ; n++) {
84
+ for (int n = 0 ; n < 20 ; n++) {
88
85
setChannelRGB (n*3 +1 , alpha + n*64 );
89
86
} // for
90
87
@@ -98,4 +95,4 @@ void loop(void)
98
95
99
96
100
97
101
-
98
+
0 commit comments