russkydeutsch:
after some research, I've answered my own question...void loop() {
analogWrite(doublestrobe, 2); //set off doublestrobe
analogWrite(doublestrobe, 200); //set doublestrobe on
delay(90);
analogWrite(doublestrobe, 0); //set doublestrobe off
delay(90);
analogWrite(doublestrobe, 200); //set doublestrobe on
delay(90);
analogWrite(doublestrobe, 0); //set doublestrobe off
delay(1100);
}
(I added code tags above...)
If that is what you want, but I really don't see why you need to use analogWrite(). I wouldn't think that one would want to PWM the led to a lower brightness to simulate a strobe (since strobes are very fast bright blinks).
Try (just for chuckles) this:
void loop()
{
digitalWrite(led, HIGH); // turn the LED on (HIGH is the voltage level)
delay(50); // on for 50ms
digitalWrite(led, LOW); // turn the LED off by making the voltage LOW
delay(100); // off for 100ms
digitalWrite(led, HIGH); // turn the LED on (HIGH is voltage level)
delay(50); // on for 50ms
digitalWrite(led, LOW); // turn the LED off by making the voltage LOW
delay(1000); // off for 1s
}