Can someone help write some code for a newbie?

I have the Arduino Mega. This is the code I have (and it mostly works for part of what I want to do):

int pins = { 3, 13, 5, 11, 7, 9 }; // an array of pin numbers
int num_pins = 6; // the number of pins (i.e. the length of the array)
int value = 250;

void setup()
{
int i;

for (int i = 0; i < num_pins; i++) // the array elements are numbered from 0 to num_pins - 1
pinMode(pins*, OUTPUT); // set each pin as an output*
}
void loop()
{

  • int i;*
  • for (int i = 0; i < num_pins; i++) // the array elements are numbered from 0 to num_pins - 1*
  • for(value = 50 ; value <=250; value+=3) // fade in (from min to max)*
  • {*
    _ analogWrite(pins*, value); // sets the value (range from 255 to 0)_
    _
    delay(1);_
    _
    }_
    _
    for(value = 250 ; value >=50; value-=3) // fade out (from max to min)_
    _
    {_
    _ analogWrite(pins, value);
    delay(0);
    }
    }*
    What I want to be able to add to this is to strobe pins 30 and 32 once every 2500 milliseconds; Blink pins 1 and 2 on/off every two seconds with a fade up/down time of 250 milliseconds; and keep pins 40, 42, 44, 46 and 48 ON.
    Thanks in advanced for any help/suggestions/or codes!_

What I want to be able to add to this is to strobe pins 30 and 32 once every 2500 milliseconds; Blink pins 1 and 2 on/off every two seconds with a fade up/down time of 250 milliseconds; and keep pins 40, 42, 44, 46 and 48 ON.

you might start by thinking about your “loop” as home for a bunch of functions: strobe, blink, fade up/down - whatever, each with its own little block of code yearning to be next.

If you’re happy with the cycling you’ve got going on now, leave it alone and add your strobe-on code next. In setup, set a variable (strobeon) to millis()+2500; after the cycling code in loop, add a test to see if millis() is >= strobeon; if so, turn 30 & 32 on and set strobeon to millis()+2500 again.

I’m not sure whow long you need 30 & 32 up for. If it’s very short - like 1 ms, just delay and turn it off. if it’s longer, like 100 ms, use another variable (strobeoff) to trigger that function.

Hope this is a hint.