Chat freely about anything...

User avatar
By noisette
#22589 Hi there
I just tried this code for DMX break, but it does not work :( :
Code: Select all  Serial1.end();
  digitalWrite(2, HIGH);
  delayMicroseconds(88);
  digitalWrite(2, LOW);
  delayMicroseconds(8);
  Serial1.begin(250000, SERIAL_8N2);
  Serial1.write(buffer, sizeof(buffer));
  Serial1.flush();


Does anybody have a clue ?
User avatar
By martinayotte
#22601 First, the break should be a LOW signal.
This means you have to inverted it in your code.
Also, maybe you need to add pinMode(GPIO1, OUTPUT) before doing the digitalWrite().
And beware that 88uSec is the minimum defined by the protocol, but you can make it longer just to be sure.
I hope that Serial1.begin() will cancel the pinMode and make it as the serial TX again, but this can be verified if you have an oscilloscope.
User avatar
By Andresc4
#43678 Hey folny82 Im trying your code
but im getting this error

Code: Select allC:\Users\AMDAV\Desktop\artnet_ws\artnet_ws.ino: In function 'void setup()':

artnet_ws:49: error: 'onDmxFrame' was not declared in this scope

 artnet.setArtDmxCallback(onDmxFrame);

                          ^

C:\Users\AMDAV\Desktop\artnet_ws\artnet_ws.ino: In function 'void onDmxFrame(uint16_t, uint16_t, uint8_t, uint8_t*)':

artnet_ws:61: error: 'do2811' was not declared in this scope

 do2811(dataPin0,data, numLeds0 * 3);

                                   ^

artnet_ws:64: error: 'do2811' was not declared in this scope

 do2811(dataPin1,data, numLeds1 * 3);

                                   ^

artnet_ws:67: error: 'do2811' was not declared in this scope

 do2811(dataPin2,data, numLeds2 * 3);

                                   ^

artnet_ws:70: error: 'do2811' was not declared in this scope

 do2811(dataPin3,data, numLeds3 * 3);

                                   ^

exit status 1
'onDmxFrame' was not declared in this scope


Im running arduino 1.6.7
can you point me to the rigth artnet library to use?