Hi! I want to ask a suggestion. I'm trying to develop an AC dimmer controlled by DMX, but I have a problem using the DmxSerial library (to read the dmx data) and the RBDDimmer library that control the dimmer. The dimmer doesnt work when I include also the dmx serial library. I think it could be a problem of incompatibility between the two libraries (maybe they use something together such as interrupt ?)
Someone know a solution ?
Thanks
It might help if you could post your code; in case you have forgotten, please use code tags using the </> button intghe reply window.
Please provide links to the DmxSerial library and the RBDDdimmer library.
That would more than likely result in a linker error (something in the line of multiple __vector, not sure of the exact mesage).
Thank you for answering... Here's the library:
https://www.arduino.cc/reference/en/libraries/dmxserial/
https://github.com/RobotDynOfficial/RBDDimmer
The code is really simple for now:
#include <DMXSerial.h>
#include <RBDdimmer.h>
const int dimmer_1 = 11;
dimmerLamp blinder_1(dimmer_1);
const int led = 13;
void setup() {
pinMode(led,OUTPUT);
DMXSerial.init(DMXReceiver);
blinder_1.begin(NORMAL_MODE, ON);
blinder_1.setPower(0);
delay(1000);
}
void loop() {
blinder_1.setPower(255);
}
The dimmer works if i comment the line
DMXSerial.init(DMXReceiver);
PS. the code for now doesn't use dmx signal.
No compile error.
thanks
I have never used the dmxserial library, but use a different system for receiving dmx.
Receiving data at 250kbps continuously (seriously, DMX is a constant flow of data with a short 80us break) put';s quite a lot of strain on the CPU.
Usually you will be better of using a single frame receiving method on an AVR.
I have no idea how the AC dimmer works, either, but you haven't shown the wiring as yet.
I guess a zero-cross detection method is used from what i can tell from the SRC, and the combination of that with DMX reception, will just not work on an AVR. A faster processor will be required.
Ok so it is probably a problem related to the performance of the arduino nano. Too slow to get the dimmer works correctly.
Thanks
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.