Arduino Artnet Signal
Posted: Tue May 30, 2023 2:55 pm
Hi,
I've got an Arduino mega as well as an ethernet and a dmx shield to go on top. I'm wanting to have qlc+ send the dmx output over my wifi/ethernet network to my arduino which will then convert the signal into dmx and go off to my lighting rig. I'm having some issues though. I don't know if it's a problem with my code or the way i'm setting up qlc+ with the output. The Arduino Mega board is at the bottom with the ethernet shield on top and then the dmx shield on top of the ethernet shield. My code on the arduino is:
----------------------
#include <Ethernet.h>
#include <DmxSimple.h>
#define UNIVERSE 1
byte mac[] = {0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED}; // Replace with your Ethernet shield MAC address
IPAddress ip(192, 168, 1, 100); // Replace with desired IP address
EthernetServer server(23); // Port 23 for Art-Net
void setup() {
Ethernet.begin(mac, ip);
DmxSimple.usePin(3);
server.begin();
}
void loop() {
EthernetClient client = server.available();
if (client) {
if (client.connected()) {
while (client.available()) {
// Read incoming data byte by byte
byte data[512];
for (int i = 0; i < 512; i++) {
data = client.read();
}
// Output the received data to DMX
for (int i = 0; i < 512; i++) {
DmxSimple.write(i + 1, data);
}
}
}
client.stop();
}
}
-------------------------------
I've been trying to set up qlc with an artnet thing as the output and i've just changed the ip address to 192.168.1.100 as in the code. I imagine i'm doing something completely wrong but if anyone knows how to get this working, It would be much appreciated.
I've got an Arduino mega as well as an ethernet and a dmx shield to go on top. I'm wanting to have qlc+ send the dmx output over my wifi/ethernet network to my arduino which will then convert the signal into dmx and go off to my lighting rig. I'm having some issues though. I don't know if it's a problem with my code or the way i'm setting up qlc+ with the output. The Arduino Mega board is at the bottom with the ethernet shield on top and then the dmx shield on top of the ethernet shield. My code on the arduino is:
----------------------
#include <Ethernet.h>
#include <DmxSimple.h>
#define UNIVERSE 1
byte mac[] = {0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED}; // Replace with your Ethernet shield MAC address
IPAddress ip(192, 168, 1, 100); // Replace with desired IP address
EthernetServer server(23); // Port 23 for Art-Net
void setup() {
Ethernet.begin(mac, ip);
DmxSimple.usePin(3);
server.begin();
}
void loop() {
EthernetClient client = server.available();
if (client) {
if (client.connected()) {
while (client.available()) {
// Read incoming data byte by byte
byte data[512];
for (int i = 0; i < 512; i++) {
data = client.read();
}
// Output the received data to DMX
for (int i = 0; i < 512; i++) {
DmxSimple.write(i + 1, data);
}
}
}
client.stop();
}
}
-------------------------------
I've been trying to set up qlc with an artnet thing as the output and i've just changed the ip address to 192.168.1.100 as in the code. I imagine i'm doing something completely wrong but if anyone knows how to get this working, It would be much appreciated.