Not a problem - Playing around a bit with the codes and Souliss, I found a nice answer to this...
1.)
In case of wanting the Arduino to light up the LEDs instantly when switched on (power-on the Arduino itself !), use that code in the void setup.
void setup()
{
for (int helligkeit1 =1; helligkeit1 <= 255; helligkeit1++) // this fades up the LED to their max
{
analogWrite( 9, helligkeit1); //using2 LED-OutputPins here
analogWrite(10, helligkeit1);
delay(10); //control of the fade-effect speed
if (helligkeit1 == 255){goto fadeup;}
}
fadeup: //goto-Sprung wenn Hilligkeit max oben erreicht - Programm läuft weiter
Initialize();
..............
Maybe the 'goto' is not needed - it just worked for me and you got the idea.
2.)
Problem was, as soon as the Typicals in the void-loop kicked in, the brigtness was changed to the Souliss set-value (66% in my case). To avoid that, use this code at the end of the void setup...
mInput(LEDCUBE1) = Souliss_T1n_OnCmd;
mInput(LEDCUBE2) = Souliss_T1n_OnCmd;
mOutput(LEDCUBE1) = Souliss_T1n_OnFeedback;
mOutput(LEDCUBE2) = Souliss_T1n_OnFeedback;
mInput(LEDCUBE1count)= 255; // definition of max. brightness here - change accordingly if needed
mInput(LEDCUBE1)= Souliss_T1n_Set;
mInput(LEDCUBE2count)= 255;
mInput(LEDCUBE2)= Souliss_T1n_Set;
} // end of the void-setup section
3.)
For me, I needed to add a line on the void-loop under each typical to make it working properly....
Logic_T19(LEDCUBE1);
// Use the output values to control LEDCUBE_1
analogWrite(9, mOutput(LEDCUBE1count));
RESULT:
The PWM Output-Pins get fired up almost immediatly with the Arduino power-on. I can define the desired PWM-Puls (e.g. here 255 may.) individualy for each pin. When the void-loop starts, the set brightness is kept as desired. The App shows the correct toggle-states and brightness values in synchronizastion with the Arduino.
So, this works for me under my configuration - hope this might help in the future. ;-)