5 fade and 5 blink individually

Hello, I need a sketch for the Arduino Uno (latest version).
I need 5 leds to fade up and down and 5 leds to blink. All with individual times (millis) that I can change for each.
The simpler the code the better.
Please, if interested, respond with quotes on payment.
Thank you!

How many leds total? 5 or 10?
Are the fades synchronized or patterned?
How many blink on at once?

For this many LEDs, you are better off using neopixels. A UNO does have enough pins to do this - 6 PWM outputs - but only just.

I don't much like your chances of getting code that is simple. Each LED has several things to keep track of - their blink/fade settings and where exactly they are in their sequence at any time. :frowning: I for one would immediately go for objects to do this. The best you can hope for is code for which it is simple for you to adjust the blink/fade time.

In any case:

1 - choose what hardware you want to use - individual LEDs on pins, or some Adafruit Neopixels.
2 - clarify what you mean by "All with individual times (millis) that I can change for each". If you mean that you are happy to to this by constants that are compiled into the code, no problem. If you want to be able to do this dynamically while the sketch is running, well, that's a bigger job.

If you want a sketch that

  • fades 5 PWM pins up and down (triangular wave)
  • blinks 5 digital pins
  • all of which have an individual rate
  • that is settable at compile time

Then I will do this for you for my minimum fifty bucks, paid via paypal after you have got your sketch and it's working for you. For paid projects on these boards, I prefer to do my work publicly on a thread here and for the code to be open-source and covered by the "unlicense" on github. This means basiaclly that anyone is free to do anything they like with my code. I supply the sketch via a github url.

If you agree to the fifty and then subsequently think of other things you would like, that is not covered by the agreement even if you are like "I only just realized that I absolutely need this other new thing I just thought of and the work you have agreed to do is no use without it".

PM me to notify me, but any discussions about requirements etc we can do here in public, for instructive purposes.

Here's the effect I'm trying to achive.

The 5 orange Leds fade and the 5 other color Leds blink.
The reason for the changeable timing was so I can sync them to the actual restored Enterprise.

Thank you for the quick replies!

Hmm. I'm not sure I saw where the five orange lights were - did you mean that rotating effect inside the engine?

If so, we are not after five independent sawtooth waves, but five PWM pins tracing out the same wave with a phase offset. Easiest way to do this is with a sine wave (sin(t), sin(t+2π/5), sin(t+2*2π/5) etc). I'd make this so that you could set the rate, the maximum brightness, and the minimum brightness.

How's that sound?

Yes, the larger orange or amber lights in the engines (called bussard collectors) are the ones that fade.

The ability to change brightness and timing you propose for those lights is exactly what I need for those. The blinking lights I assume are pretty straight forward, also with the ability to change the timing.

All sounds good to me and I think we are on the same page.
Let me know how and when you would like to proceed.
Thanks again for the quick response!

All sounds good to me and I think we are on the same page.
Let me know how and when you would like to proceed.

Ok dude. Code is at

Bussard lights are on PWM pins 3,5,6,9,10 on my UNO. I have put in two flashers with different on/off patterns. It seems to be working nicely on my UNO sitting just over there to my right.

The setup of the lights is done at lines 88-97, in the section named “pinout”. If you have trouble setting up the stuff you want, then you can describe to me exactly what you need and I can edit the sketch for you, but hopefully there’s enough there that you can just copy/paste and fill in what you need - it will probably be quicker than going back and forth with me on this thread.

If it works for you and does what you want, kindly remit $50 to pmurray@bigpond.com via PayPal.


– EDIT –

Oh, and Karma me :slight_smile:

Works great! Thanks Paul!