Hi All,
I've been using the DMXSimple library to control a DMX dimmer. As I'm trying to explore things a little further I thought it would be best to move onto the newer IDE. Unfortunately I can't manage to use the DMXSimple Library. I'm getting this error message:
/Users/jackjames/Documents/Arduino/libraries/DmxSimple/DmxSimple.cpp:11:20: error: wiring.h: No such file or directory
/Users/jackjames/Documents/Arduino/libraries/DmxSimple/DmxSimple.cpp: In function 'void dmxBegin()':
/Users/jackjames/Documents/Arduino/libraries/DmxSimple/DmxSimple.cpp:57: error: 'digitalPinToPort' was not declared in this scope
/Users/jackjames/Documents/Arduino/libraries/DmxSimple/DmxSimple.cpp:57: error: 'portOutputRegister' was not declared in this scope
/Users/jackjames/Documents/Arduino/libraries/DmxSimple/DmxSimple.cpp:58: error: 'digitalPinToBitMask' was not declared in this scope
/Users/jackjames/Documents/Arduino/libraries/DmxSimple/DmxSimple.cpp:61: error: 'OUTPUT' was not declared in this scope
/Users/jackjames/Documents/Arduino/libraries/DmxSimple/DmxSimple.cpp:61: error: 'pinMode' was not declared in this scope
/Users/jackjames/Documents/Arduino/libraries/DmxSimple/DmxSimple.cpp: In function 'void dmxWrite(int, uint8_t)':
/Users/jackjames/Documents/Arduino/libraries/DmxSimple/DmxSimple.cpp:183: error: 'max' was not declared in this scope
/Users/jackjames/Documents/Arduino/libraries/DmxSimple/DmxSimple.cpp: In function 'void dmxMaxChannel(int)':
/Users/jackjames/Documents/Arduino/libraries/DmxSimple/DmxSimple.cpp:194: error: 'min' was not declared in this scope
Here is an example of the kind of basic code that I've been using:
#include <DmxSimple.h>
void setup() {
/* The most common pin for DMX output is pin 3, which DmxSimple
** uses by default. If you need to change that, do it here. */
DmxSimple.usePin(3);
/* DMX devices typically need to receive a complete set of channels
** even if you only need to adjust the first channel. You can
** easily change the number of channels sent here. If you don't
** do this, DmxSimple will set the maximum channel number to the
** highest channel you DmxSimple.write() to. */
DmxSimple.maxChannel(4);
}
void loop() {
/* Update DMX channel 1 to new brightness */
DmxSimple.write(1, 80);
DmxSimple.write(2, 150);
/* Small delay to slow down the ramping */
}