Skip to content

Commit b9f05b2

Browse files
committed
Source code annotations and documentation added.
1 parent 85b3bf0 commit b9f05b2

File tree

5 files changed

+24
-16
lines changed

5 files changed

+24
-16
lines changed

.gitignore

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
################################################################################
2+
# This .gitignore file was automatically created by Microsoft(R) Visual Studio.
3+
################################################################################
4+
5+
/.development

examples/DMXSerialFlow/DMXSerialFlow.ino

+3-6
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// - - - - -
22
// DmxSerial - A hardware supported interface to DMX.
33
// 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
55
// This work is licensed under a BSD style license. See http://www.mathertel.de/License.aspx
66
//
77
// 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.
2121
const int GreenPin = 6; // PWM output pin for Green Light.
2222
const int BluePin = 5; // PWM output pin for Blue Light.
2323

24-
// The number of RGB pixels, RGB channels are transfered
25-
#define PIXELS 60
2624

2725
void setup(void)
2826
{
2927
// Serial.begin(57600); // only on Leonardo
3028
// Serial.println("DMXSerialFlow DMX Example");
3129

3230
DMXSerial.init(DMXController);
33-
// DMXSerial.init(DMXController, 4);
3431

3532
// Set the number of channels the controller will send
3633
// 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)
8481
// uncomment this line to have a scenario where DMX values are changed every 5 seconds
8582
// alpha &= 0xFF00;
8683

87-
for (int n = 0; n < PIXELS; n++) {
84+
for (int n = 0; n < 20; n++) {
8885
setChannelRGB (n*3+1, alpha + n*64);
8986
} // for
9087

@@ -98,4 +95,4 @@ void loop(void)
9895

9996

10097

101-
98+

examples/DmxSerialRecv/DmxSerialRecv.ino

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
// address 2 (green) -> PWM Port 6
66
// address 3 (blue) -> PWM Port 5
77
//
8-
// Copyright (c) 2011 by Matthias Hertel, http://www.mathertel.de
8+
// Copyright (c) 2011-2015 by Matthias Hertel, http://www.mathertel.de
99
// This work is licensed under a BSD style license. See http://www.mathertel.de/License.aspx
1010
//
1111
// Documentation and samples are available at http://www.mathertel.de/Arduino

examples/DmxSerialSend/DmxSerialSend.ino

+9-3
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,20 @@
11
// - - - - -
22
// DmxSerial - A hardware supported interface to DMX.
3-
// DmxSerialSend.ino: Sample DMX application for sending 3 DMX values:
3+
// DmxSerialSend.ino: Sample DMX application for sending 3 DMX values.
4+
// There colors in the 3 lists (RedList, GreenList and BlueList) are placed into the DMX buffer with a slow fade.
5+
// DMXSerial works in the background and constantly sends the actual values over the DMX interface.
6+
// The actual values are also available on the built in PWM ports:
47
// address 1 (red) -> also available on PWM Port 9
58
// address 2 (green) -> also available on PWM Port 6
69
// address 3 (blue) -> also available on PWM Port 5
710
//
8-
// Copyright (c) 2011 by Matthias Hertel, http://www.mathertel.de
11+
// Copyright (c) 2011-2015 by Matthias Hertel, http://www.mathertel.de
912
// This work is licensed under a BSD style license. See http://www.mathertel.de/License.aspx
1013
//
1114
// Documentation and samples are available at http://www.mathertel.de/Arduino
15+
// The repository is on github : https://github.com/mathertel/DMXSerial
16+
// The repository on github is made available in the Arduino Library Manager.
17+
//
1218
// 25.07.2011 creation of the DmxSerial library.
1319
// 10.09.2011 fully control the serial hardware register
1420
// without using the Arduino Serial (HardwareSerial) class to avoid ISR implementation conflicts.
@@ -75,4 +81,4 @@ void loop() {
7581
} // if
7682

7783
delayMicroseconds(2000); // wait a little bit
78-
} // loop
84+
} // loop

library.properties

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
name=DMXSerial
2-
version=1.3.0
3-
author=Matthias Hertel
4-
maintainer=Matthias Hertel <www.mathertel.de>
1+
name=DMXSerial
2+
version=1.2.0
3+
author=Matthias Hertel <[email protected]>
4+
maintainer=Matthias Hertel <mathertel@hotmail.com>
55
sentence=Enables DMX communication using the built-in serial port for Arduino boards UNO, Leonardo, Mega.
6-
paragraph=This is a library for implementing DMX controllers and devices.
76
category=Communication
7+
paragraph=This is a library to implement DMX controllers and devices.
88
url=http://www.mathertel.de/Arduino/DMXSerial.aspx
9-
architectures=*
9+
architectures=avr

0 commit comments

Comments
 (0)