Hey folks!
I want to control my Arduino WIFI MKR1010 via a DMX setup, however most of the common DMX Librarys do not work for this Arduino. I read some articles that suggest it might be related to another type of chip used for the Arduino WIFI. The error code states that the "avr/io.h" file does not exist.
Do you know any other DMX Librarys (only to receive) a DMX Signal with a RS485 Shield? So far DMXSerial.h and ArdunoDMX for example do not work.
I have tried a workaround without a library, however this code does not work, do you know why?
Thanks for your help in advance ![]()
#define DMX_SERIAL Serial
#define LED_PIN1 1
#define LED_PIN2 2
void setup() {
pinMode(LED_PIN1, OUTPUT);
pinMode(LED_PIN2, OUTPUT);
DMX_SERIAL.begin(250000);
Serial.begin(9600);
}
void loop() {
if (DMX_SERIAL.available() > 0) {
int startByte = DMX_SERIAL.read();
if (startByte == 0x00) {
for (int i = 1; i <= 192; i++) {
int value = DMX_SERIAL.read();
if (i == 8 && value > 100) {
digitalWrite(LED_PIN1, HIGH);
digitalWrite(LED_PIN2, LOW);
} else {
digitalWrite(LED_PIN1, LOW);
digitalWrite(LED_PIN2, HIGH);
}
}
}
}
}