Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update some comments in an example #40

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 4 additions & 9 deletions examples/RDMIntoDMXOut.ino
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
// - - - - -
// DmxSerial2 - A hardware supported interface to DMX and RDM.
// RDMSerialRecv.ino: Sample RDM application.
// RDMIntoDMXOut.ino: Receive DMX at an RDM set address and output DMX commands on channel 1, to make any non-RDM DMX device RDM compliant.
//
// Copyright (c) 2011-2013 by Matthias Hertel, http://www.mathertel.de
// This work is licensed under a BSD style license. See http://www.mathertel.de/License.aspx
//
// The following RDM commands are implemented here:
// E120_LAMP_HOURS
// E120_DEVICE_HOURS
//
// More documentation and samples are available at http://www.mathertel.de/Arduino
// - - - - -

Expand All @@ -17,7 +13,6 @@
#include <DMXSerial2.h>

// see DMXSerial2.h for the definition of the fields of this structure
//const uint16_t my_pids[] = {E120_DEVICE_HOURS, E120_LAMP_HOURS};
const uint16_t my_pids[] = {};
struct RDMINIT rdmInit = {
"Company Name", // Manufacturer Label
Expand All @@ -36,7 +31,7 @@ void setup () {
pinMode(9, OUTPUT); // defined isIdentifyMode pin for output
digitalWrite(9, LOW);
DmxSimple.usePin(3); // Use Digital pin 3 for DMXSimple output
DmxSimple.maxChannel(maxSize); //set the maxChannel for DMXSimple to the same as the RDM module's max size
DmxSimple.maxChannel(maxSize); // set the maxChannel for DMXSimple to the same as the RDM module's max size

} // setup()

Expand All @@ -51,7 +46,7 @@ void loop() {

for (int i = 0; i < maxSize; i++){ // for all DMX packets sent to addresses up to maxSize, forward to DMX out

DmxSimple.write(i + 1, DMXSerial2.readRelative(i)); //Grab all DMX packets sent to RDM address and forward to DMX out
DmxSimple.write(i + 1, DMXSerial2.readRelative(i)); // Grab all DMX packets sent to RDM address and forward to DMX out
}

digitalWrite(9, LOW);
Expand All @@ -70,7 +65,7 @@ bool8 processCommand(struct RDMDATA *rdm, uint16_t *nackReason)

if (CmdClass == E120_SET_COMMAND) {
*nackReason = E120_NR_UNSUPPORTED_COMMAND_CLASS;
}
}

return handled;
}