Errors in given code

Good day dear forum,

I want to recreate a DMX receiver for a dimmer, I have received a code to do so. This has already been used in another project. Unfortunately, I can not compile it anymore. Unfortunately, I am very inexperienced and can not cope with the error message. Can someone tell me what the mistake is and how can I solve it? :confused: :confused:

The Projekt is based on a arduino nano. I downloaded the librarys.

I’ll attach the code.

I guess it’s up to the digitalwritefast library?

The Error Message:

In file included from /Users/patrickloibl/Library/Mobile Documents/com~apple~CloudDocs/Desktop/dmx-demux5/dmx-demux5.ino:7:0:
/Users/patrickloibl/Documents/Arduino/libraries/FastLED/FastLED.h:14:21: note: #pragma message: FastLED version 3.003.002
 #    pragma message "FastLED version 3.003.002"
                     ^
/Users/patrickloibl/Library/Mobile Documents/com~apple~CloudDocs/Desktop/dmx-demux5/dmx-demux5.ino: In function 'char* menuetext(int, String)':
/Users/patrickloibl/Library/Mobile Documents/com~apple~CloudDocs/Desktop/dmx-demux5/dmx-demux5.ino:678:17: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
   char * copy = "                 ";
                 ^
In function 'stroberoutine',
    inlined from 'loop' at /Users/patrickloibl/Library/Mobile Documents/com~apple~CloudDocs/Desktop/dmx-demux5/dmx-demux5.ino:298:19,
    inlined from 'main' at /Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino/main.cpp:46:9:
dmx-demux5:345:9: error: call to 'NonConstantUsed' declared with attribute error: 
         digitalWriteFast(Strobe_Pin[strobe], LOW);
         ^
dmx-demux5:371:15: error: call to 'NonConstantUsed' declared with attribute error: 
               digitalWriteFast(Strobe_Pin[strobe], HIGH);
               ^
dmx-demux5:377:13: error: call to 'NonConstantUsed' declared with attribute error: 
             digitalWriteFast(Strobe_Pin[strobe], LOW);
             ^
dmx-demux5:406:11: error: call to 'NonConstantUsed' declared with attribute error: 
           digitalWriteFast(Strobe_Pin[strobe], LOW);            
           ^
dmx-demux5:409:11: error: call to 'NonConstantUsed' declared with attribute error: 
           digitalWriteFast(Strobe_Pin[strobe], HIGH);            
           ^
lto-wrapper: fatal error: /Applications/Arduino.app/Contents/Java/hardware/tools/avr/bin/avr-gcc returned 1 exit status
compilation terminated.
/Applications/Arduino.app/Contents/Java/hardware/tools/avr/bin/../lib/gcc/avr/5.4.0/../../../../avr/bin/ld: error: lto-wrapper failed
collect2: error: ld returned 1 exit status
Mehrere Bibliotheken wurden für "FastLED.h" gefunden
 Benutzt: /Users/patrickloibl/Documents/Arduino/libraries/FastLED
 Nicht benutzt: /Users/patrickloibl/Documents/Arduino/libraries/arduino_69008
exit status 1
call to 'NonConstantUsed' declared with attribute error:

dmx-demux5.ino (28.5 KB)

I guess it's up to the digitalwritefast library?

Yes, you cannot use that library with pins hold in a variable. The library make the digitalWrite() call faster by doing the lookup of the pin during compile time instead of at run time. If you provide the pin in a variable it cannot make the lookup at compile time. So if you have to hold the pin number in a variable, use standard digitalWrite() calls instead of the digitalWriteFast().

"Some" DigitalWriteFast libraries may have automatically reverted to slower code in the case where non-constant arguments were uses. (So perhaps you have the wrong digitalWriteFast library for this particular code?)