Jump to content

Useless Color Change Prog


DrLumen

Recommended Posts

Posted

Here is a useless little app to waste CPU cycles and bandwidth. It sets random colors for a RGB LED strip ad infinitum.

 

Comments are for those that may not read code often.

 

This sets placeholder variables to random values and calls SetOfficeRGB to actually send to the device.

OfficeToRandom - [ID 001F][Parent 0014][Not Enabled]

If
        $AlwaysTrue is 1
 
Then
        $OfficeRGB_R = Random 100
        $OfficeRGB_G = Random 100
        $OfficeRGB_B = Random 100
        Run Program 'SetOfficeRGB' (If)
 
Else
   - No Actions - (To add one, press 'Action')
 

This sends the placeholder values to the Fibaro RGBW controller. FWIW, I use placeholder values so I can define color set variables. That allows me to tweak the defined RGB color variables without having to make changes to the programs. I can also use the same colors across devices.


SetOfficeRGB - [ID 0018][Parent 0014][Not Enabled]

If
        $AlwaysTrue is 1
 
Then
        Set 'Office Cabs-RGB-Red' '$OfficeRGB_R %'
        Set 'Office Cabs-RGB-Green' '$OfficeRGB_G %'
        Set 'Office Cabs-RGB-Blue' '$OfficeRGB_B %'
 
Else
   - No Actions - (To add one, press 'Action')
 



This keeps going until you stop it.

OfficeToCycle - [ID 0020][Parent 0014][Not Enabled]

If
        $AlwaysTrue is 1
 
Then
        Run Program 'OfficeToRandom' (If)
        Wait  3 seconds
        Run Program 'OfficeToCycle' (Then Path)
 
Else
   - No Actions - (To add one, press 'Action')
 


Just for grins... Maybe someone will find it useful or inspirational.

 

On a side note, I wish it was possible to pass arguments to routines instead of carving everything in stone.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...