cycling 4 LEDs at varrying speeds

Ok, just as I expected, it makes zero sense to me. Let me say that I don't know how to write or read code, I learn best by taking something and changing values to see what I changed, then things me more sense.

how would I apply millis() to my current project.

I'm going to need you guys to hold my hand before I feel comfortable with doing things myself.

[u]Here[/u] is the blink without delay example.

Note that you can use multiple timing variables. In your situation, you need one "delay" (actually a "time reference" rather than a delay) for the chase speed, and another time reference for the speed-change rate (i.e . 10 per second).

It would be a good idea to review the entire [u]Language Reference[/u] to get an idea of what you can do. You don't have to memorize the whole thing. But, try to understand if-statements & loops. If-statements (and other conditional logic) are the way that computers "make decisions". Along with loops (doing things over& over, perhaps changing variable-values each time through the loop) these are the two most important things in programming... They are the things that make programming useful.

Let me say that I don't know how to write or read code, I learn best by taking something and changing values to see what I changed, then things me more sense.

That's not a bad approach... When you are modifying code, it's a good idea to change a little at a time. When something goes-wrong, it's not always easy to figure-out what's wrong and it you change one or two things at at time, at least you know where the problem is.

The BEST way to learn programming is to take a class. The 2nd best way would be to get a book. But, I don't know if you can find a class or book that teaches beginning programming concepts as well as Arduino programming. So, unless you want to work through a general-purpose C/C++ programming book (unrelated to the Arduino), you might just have to struggle-through.

The same goes for writing code from scratch. Professional programmers don't write the whole program before trying it out... They write and tests one thing at a time. Beginners should try to write and test one or two lines at a time, except where you need to add more to make the program comple & run.

Just FIY - Programming is NOT easy, and it's probably different than anything you've done before. People who are good at math & logic tend to make good programmers. Just as an indication of how difficult programming can be, professional programmers make mistakes (create bugs) every day! If doctors or bridge designers made as many mistakes they would be fired! :smiley: (Most of these bugs are fixed before anyone sees them.)

I've been programmed (part-time for work and as a hobby for many years in several different programming languages... I'm still not an expert!

The blink without delay example has about four key lines.
Understand those lines (play with the code, add extra cycles or different on/off times), and you're well on your way to doing what you want.

I guess I have no clue what I'm doing, nothing makes sense. Thanks for trying to help.

Ok, just as I expected, it makes zero sense to me.

It will take longer than eight minutes to understand.

I guess what i'm looking for is someone to take what I have... or scrap it all together and help me with cycling 4 leds from 30 cycles per minute to 2000 cycles per minute at the rate of 1 cycle per second.

Lets use what I have as example and move from there. All these links are great but I would much rather understand it at a pace that I can see results with what I have.

I know it requires less work for me and more work for the arduino community, but the "more work" part for you is easy because you understand it, I don't. if it were more work for me I would have to devote more time than I have to doing this
Thanks Guys

Jeff

I would much rather understand it at a pace that I can see results with what I have.

you registered this username at ten to five.
It is now just after seven.
How many of the IDE examples have you worked through?

quite a few, I spent just about my entire weekend trying to come up with something and I know that I'm frustrated to the point that I enlisted the help of the arduino community. I tried playing with quite a few IDE but I can't bridge the gap to applying it to what I have, I always get errors and can't figure out why (which isn't a far stretch).

There are a lot of things that I'm good at but this isn't one of them. Please help me...

Help you to do what?

Understand blink without delay?

Get a clock, a pencil and a sheet of paper.

I want you to boil an egg for three minutes, another for four and another for five.

Oh, and you have the memory of a goldfish.

Wow!! Is a moderator seriously insulting me?
Unless this is your way of trying to teach me something, I would expect more from a moderator.

here it is in easy to understand terms:

start with 4 LEDs set in output pins 2-5.

start by chasing each other one after the other at the rate of XX cycles per minute (cpm).
the chasing increases at the rate of XX cycles per second (cps) until it reaches XX cpm
once that cpm is met then it decreases speed by XX cps until XX cpm are met.
It does this over and over and over and over again.

That's the goal I'm trying to achieve here.

Is it simple to do?

If boiling eggs for 3,4,5 minutes is supposed to mean something explain it to me...

Wow!! Is a moderator seriously insulting me?

Certainly not. I set out the conditions of a well understood (I hope) task, as an analogy of the blink without delay example.
Where's the insult?

Is it simple to do?

Yes.
Will I write it for you?
No.

We operate on the "teach a man to fish" principle.

Oh, and you have the memory of a goldfish.

I get it, "who is this guy that just started an account and expects us to help him?" I'm hoping for some real help, not links to other projects that may work, if I know what and how to extract and apply it here I would but like I said that's not how I learn.

What I'm hoping for is:
"here try this simple code: [code ] [code/ ]
see how the xx changes as you change xx? Try xx and see how xx speeds up and xx slows down, that is xx at it's simplest form"

I understand that analogy but how does it apply?

AWOL:

Is it simple to do?

Yes.
Will I write it for you?
No.

We operate on the "teach a man to fish" principle.

I can see that's how you operate, tossing links at me isn't teaching me anything that google search can teach me. I'm willing to bet that there are others on this forum that see my frustration and will teach me to fish in a manner that I'm willing to learn.

What I'm hoping for is:
"here try this simple code:

As I said earlier, the blink without delay example has about four significant lines.
What about it do have problems with?

Think about the egg boiling task.

And that's what I don't understand, the blink is constant, how do I make it vary? and how do I apply that to what I have. I don't ubnderstand any of it.

By changing the value of "interval"

Yes I can see how I can manually change the interval But I want to do it automatically.

Have your program do it for you. That's about as close to automatic as you're going to get.

 unsigned long currentMillis = millis();
 
  if(currentMillis - previousMillis > interval) {
    // save the last time you blinked the LED 
    previousMillis = currentMillis;   

    // if the LED is off turn it on and vice-versa:
    if (ledState == LOW)
      ledState = HIGH;
    else
      ledState = LOW;

    // set the LED with the ledState of the variable:
    digitalWrite(ledPin, ledState);
  }

Breaks down to:
Look at the time
Is it time to do something?
If so, do something

Where "do something" can include change the amount of time until I next have to do something.

But I want to do it automatically.

You have our permission. If you need help with that, you must define when/under what conditions to change the value, and how much to change it by.

I had to walk away from it right now I'm not at home so I will take a look at it when I get home thanks