Simulating light malfuntions with Arduino

Hello,

I was wondering if there is some code for arduino, to simulate light malfuntions.
With some randomisation in frequency etc.
For a project I would like to make.

Thanks in advance for your help.

Regards,

Ronald

light malfuntions

Please define light malfunctions. Light turns on and off randomly? Light flickers? Light fades up and down? Light explodes?

randomisation in frequency etc

And etc. What does that mean? It is difficult to program for etc.

I assume this is a flickering light effect for Halloween?

Is the hardware set up? Can you turn the light on & off with the Arduino, or do you need help with that? (Assuming you're switching AC power, a solid state relay or a "relay board" is the easiest way to go because otherwise you'll need to build a relay driver.)

The software is easy... Start with the [u]Blink Example[/u]. Then replace the 1000mS delay time with the [u]random()[/u] function.

Don't make the times completely random, but constrain the random on & off times to whatever you like. (You'll probably want the on-time to be longer than the off-time and for a flickering effect you can try random off-times between 100 and 1000mS.)

For example-

delay(random(100,1000));

I'm building a shuttle craft with light effect like in Star Trek Voyager.

I will have to create some alert modes ( blinking mode)

And Light Flickering effects, like a fluorescent light flicker.
(I'm going to make some Augmented Reality effects 2 in the future.)

It has to be over the entire length of the light strip, and random places with slight fading.

The code has to be replicated to other lights tips and has to be randomized for realistic effect.

And I will have to have some dim and color change functions to.

Any help would be very appreciated.

Kind regards,

Ronald van Erp

For a single LED I had an array of numbers and scrolled through those and used the numbers in the array to set a value on the analog output driving the LED . I adjusted the array values to give the desired flicker effect . Perhaps you could use that as a starting point ?

Hello coders,

I have absolutely no experience with arduino,
or arduino code.

Also I will need a couple of weeks to get all the parts.
I have no idea what I need for this project.( type of arduino, extra parts etc)

I do have some experience with game engine code.

They simulate it there with noise modifiers (Perlin Noise), to get the effect on 1 light.

I was hoping to do the same with arduino in a light array.

Ronald van Erp

Buy a UNO and get some experience with it

Thank you DVDDoug and Hammy for your fast reply's.

As I recall from a couple tutorials a while back you can dim L.E.D's with frequency.
For the allert mode i'll need a fade in and fade out function,
And also a general fade for all the lights.

That delay swap with random looks interesting DVDDoug!
Is there a way to also include a ramp up and down in frequency, and random put that function on a array of lights?

I will have to control all light functions of 8 L.E.D lightstrips from an app.
I dont want to use wifi for that, any idea's on that guy's?

Thank's for all the help,

Ronald van Erp

Also I would like to use the led strips with data line, so there individually addressable.
Like the WS2812B lightstrips.

How many LED strips can you control with 1 UNO Hammy?