T16 at maximum bright on startup

67 views
Skip to first unread message

Dario Cdj

unread,
May 17, 2017, 10:18:36 AM5/17/17
to souliss
Hi guys,
someone can tell me what is the right syntax to send 255 value to all three channel of a t16?
The goal is to power on a T16 with WHITE and max bright, same thing that "WHITE" button of sApp do.

I've used a trigger named "startup" and then i execute on a FAST_10ms:

if (startup == 1 ) {
             mInput(LEDCONTROL)=Souliss_T1n_OnCoil; // TURN ON T16, IT WORKS BUT NOT MAX BRIGHT
             delay(100);
             //mInput(LEDRED)=Souliss_T1n_Set,254; //TRIED BUT DO NOTHING
             delay(100);
             //mInput(LEDGREEN)=Souliss_T1n_Set,254; //TRIED BUT DO NOTHING      
             delay(100);
             //mInput(LEDBLUE)=Souliss_T1n_Set,254; //TRIED BUT DO NOTHING             
            // mInput(LEDCONTROL)=Souliss_T1n_Set,254,254,254; //TRIED BUT DO NOTHING
             startup = 0;
}

Thanks for Help
Dario2

Dario Cdj

unread,
May 19, 2017, 3:19:53 AM5/19/17
to souliss
Right sequence seems to be : 

             mInput(LEDCONTROL)=Souliss_T1n_OnCoil;
             mInput(LEDRED)=Souliss_T1n_MaxBright;
             mInput(LEDGREEN)=Souliss_T1n_MaxBright;       
             mInput(LEDBLUE)=Souliss_T1n_MaxBright;
             mInput(LEDCONTROL)=Souliss_T1n_BrightSwitch;

Byez

Niels

unread,
Jul 27, 2020, 1:27:34 PM7/27/20
to souliss
Dear Dario2

Just working on a similar code - could I ask you to post the (void?!)-section of the code where the right syntax to send 255 value to all three channel of a t16 is running !?

I'm not that experienced with Souliss and this would be a big help -

So many thanx in advance!!

Dario Cdj

unread,
Jul 27, 2020, 4:10:40 PM7/27/20
to sou...@googlegroups.com
I'm really sorry but i'm out, i'm coming back on september

--
You received this message because you are subscribed to a topic in the Google Groups "souliss" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/souliss/2yFltXUuoXo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to souliss+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/souliss/8832411b-9488-4f17-b138-e12d6ed48a26o%40googlegroups.com.

Niels

unread,
Aug 9, 2020, 8:45:05 PM8/9/20
to souliss
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. ;-)



Am Montag, 27. Juli 2020 22:10:40 UTC+2 schrieb Dario Cdj:
I'm really sorry but i'm out, i'm coming back on september

Il Lun 27 Lug 2020, 19:27 Niels <niels....@gmail.com> ha scritto:
Dear Dario2

Just working on a similar code - could I ask you to post the (void?!)-section of the code where the right syntax to send 255 value to all three channel of a t16 is running !?

I'm not that experienced with Souliss and this would be a big help -

So many thanx in advance!!


Am Freitag, 19. Mai 2017 09:19:53 UTC+2 schrieb Dario Cdj:
Right sequence seems to be : 

             mInput(LEDCONTROL)=Souliss_T1n_OnCoil;
             mInput(LEDRED)=Souliss_T1n_MaxBright;
             mInput(LEDGREEN)=Souliss_T1n_MaxBright;       
             mInput(LEDBLUE)=Souliss_T1n_MaxBright;
             mInput(LEDCONTROL)=Souliss_T1n_BrightSwitch;

Byez

--
You received this message because you are subscribed to a topic in the Google Groups "souliss" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/souliss/2yFltXUuoXo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to sou...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages