Jump to content
C4 Forums | Control4

Random Number Generator Driver


pstuart

Recommended Posts


Yup.

Command:

a = math.random()

print(a)

Output:

0.86223944822535

0.20960112308115

0.7796563615833

0.84365367595447

0.99679555650502

0.99969481490524

0.61149937437056

0.39243751335185

0.26621295815912

0.29728080080569

0.84014404736473

0.023743400372326

0.37586596270638

0.092623676259651

0.67720572527238

0.056215094454787

0.0087893307290872

0.91879024628437

0.27588732566301

0.27289651173437

0.58790856654561

Link to comment
Share on other sites

Okay. All done I think -- been a crazy busy day it turns out. There are a couple of variables setup on the driver.. Pretty easy if you know your way around programming.

I made a short video explaining how to use it.

Check it out at http://www.luadrivers.com

Note: you might have to right-click -> Save As... on the driver link until the mime types get updated on the web host.

Link to comment
Share on other sites

Looks very cool. Could use for Halloween for all lights on front of house inside and out.

Another question occurred to me I as was watching your video. I am planning on having scary music and sounds pumped to my front porch speakers through C4/Rhapsody (eg Halloween Music Collection from Midnight Syndicate.) Anyway maybe getting a little off topic but would there be any way to incorporate audio signals to trigger changes to random devices or levels. Could be scary sounds/events or even to beat of music?

Link to comment
Share on other sites

Darn, some of the lights I could use this on are switch-controlled. Any chance of a mod that just randomizes the time between on & off?

Maybe it doesn't matter though...

Use the medium variable and test for true or false.

or you could test if the number is > or < 50 and go from there.. many options.

Link to comment
Share on other sites

Looks very cool. Could use for Halloween for all lights on front of house inside and out.

Another question occurred to me I as was watching your video. I am planning on having scary music and sounds pumped to my front porch speakers through C4/Rhapsody (eg Halloween Music Collection from Midnight Syndicate.) Anyway maybe getting a little off topic but would there be any way to incorporate audio signals to trigger changes to random devices or levels. Could be scary sounds/events or even to beat of music?

No way at the moment.. You'd need some fancy 3rd party hardware to detect these things. You can't natively do them in Control4. Cool idea though!

Link to comment
Share on other sites

Darn' date=' some of the lights I could use this on are switch-controlled. Any chance of a mod that just randomizes the time between on & off?

Maybe it doesn't matter though...[/quote']

Use the medium variable and test for true or false.

or you could test if the number is > or < 50 and go from there.. many options.

"Crazy" doesn't hit on whatever the threshold is for ON with any decent frequency. A random T interval between 0 and 100 "crazy" option would rock.

Link to comment
Share on other sites

Darn' date=' some of the lights I could use this on are switch-controlled. Any chance of a mod that just randomizes the time between on & off?

Maybe it doesn't matter though...[/quote']

Use the medium variable and test for true or false.

or you could test if the number is > or < 50 and go from there.. many options.

That is great Seth. Thank you.

Is it possible to have a c4i file of this driver available in the File Library.

I'm sure a lot of other guys will also be interested in the driver.

Cheers, Happy Halloween

Link to comment
Share on other sites

This was a huge hit with the kids and parents last night.

Had all my outside lights, and all visible from the outside interior lights on this and the whole house was flickering...

Also, played random announcements, like creeky stairs, thunder, chains rattling, etc...

After about 3 hours, my wife finally had enough, and asked me to turn it off... So I did.

Again, thanks a ton... I'm pretty sure I sold at least a dozen control4 / HA systems tonight based on all the parents asking me how I did it :)

No problems with the zigbee network on a 1000, fyi.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.