newb with question

Hello all, I am new to this arduino stuff. I got my board and some shields online. I am trying to find a way to turn a digital pin high and low, but with out delays as that seems to stop the pwm code it needs to fit into. I have been searching all over and trying diffrent scetches. What I am looking for is a low output for 6 sec.(adjustible) then high for only a sec or less. Every thing I have found adjust both on/off time with same number in the code, like it is set at 50% pwm? Any way any help would be great. Im looking forward to learning this stuff as it would be nice to use in some of my projects. Peace rawbush

Somewhere in the playground there is some example code called "blinking without delay" or somethng like that.

I think your solution can be found there.

Thanks for the reply, that is one that I have tried, mabey I am just using it wrong? When I change the number in the scetch it does change the time that it come on, but also changes the time that it is on. Any other ideas or examples?
Peace
rawbush

When I change the number in the scetch it does change the time that it come on, but also changes the time that it is on

So have two different numbers!

Here is the BlinkWithoutDelay example modified to have separate on and off times.

/* Blink without Delay
   Modified from the example BlinkWithoutDelay to have
   separate on and off times.
   Modifications by WestfW
   Original by David Mellis and Tom Igoe

  The circuit:
 * LED attached from pin 13 to ground.
 * Note: on most Arduinos, there is already an LED on the board
 that's attached to pin 13, so no hardware is needed for this example.

 http://www.arduino.cc/en/Tutorial/BlinkWithoutDelay
 */

// constants won't change. Used here to 
// set pin numbers:
const int ledPin =  13;      // the number of the LED pin
const int ONTIME = 1000;     // Time for ON, in millis
const int OFFTIME = 6000;    // Time for OFF

// Variables will change:
int ledState = LOW;             // ledState used to set the LED
long previousMillis = 0;        // will store last time LED was updated

// the follow variables is a long because the time, measured in miliseconds,
// will quickly become a bigger number than can be stored in an int.
long interval = 1000;           // interval at which to blink (milliseconds)

void setup() {
  // set the digital pin as output:
  pinMode(ledPin, OUTPUT);      
}

void loop()
{

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

    // if the LED is off turn it on and vice-versa:
    if (ledState == LOW) {
      ledState = HIGH;
      interval = ONTIME;
    } else {
      ledState = LOW;
      interval = OFFTIME;
    }
    // set the LED with the ledState of the variable:
    digitalWrite(ledPin, ledState);
  }
}

I see only one number to change? Should I try to post the code here? I am still surfing through the 300 pages of post ( some really cool stuff) but still nothing close to tweek a bit for my use. Thanks Peace rawbush

wow a response while I was responding. That looks more promising. I will try now. Thanks much. Peace rawbush

yes perfect. Thanks again. Now I can finish the project.

well I guess now I have problems with it interfearing with the millis command in use with the pwm code, more fun. Any ideas?

Got it working, thanks for the help again. rawbush