simple pwm on/off code

I'm somewhat of an amateur, and im looking just to be pointed in the right direction. I have an idea for a code to write to control all 6 pwm pins and basically make an array of led's that turn on slowly in a row.

I plan to make it into a circle, so i want a continuous array of led's turning on and off slowly after one another, but i want each led to start turning on BEFORE the led before is completely off to make a trailing effect.

I'm sure i could make the code myself but it will be extremely long and complicated. I'm sure there are better ways to go about doing what i want to do. Like i said i don't want(or expect ) the code to be handed to me, i just want a hand in the right direction as to what commands i should be using and if i don't know of them ill research.

Also, i'm not sure how to re-map the numbers to make a better flow, because the pwm pins are 3,5,6,9,10,11... It would be easier if they could be re-numbered into 1-6 so that i could name a variable numbered 1-6 ) when using digitalwrite rather then making six different variables which im guessing will lengthen and complicate my code as well.

Thanks for any help!

It would be easier if they could be re-numbered into 1-6

It would be easier still if they were numbered 0..5 and you used an array.

Practically everything you will do will be done with arrays. For example, you'll define an array like "int ledPins[6] = {3,5,6,9,10,11}". That way you can initialize them with a loop and easily address them from a loop.

Another consideration is to use a TLC5940. With the Arduino library, you basically just tell it which LED and what PWM value. It handles the rest. It also makes it really easy to chain more LEDs together.

thank you, i think that the array tid bit is vital to what i need, much appreciated!