Newbie timing question

just playing around i have 2 fan hooked up to a relay set and using this sketch. my question is, why doe the arduino turn the 2nd fan on just before powering off fan #1 and visversa should'nt it turn it off wait 2 seconds turn on #2?

// the setup function runs once when you press reset or power the board void setup() {

// initialize digital pin 13 as an output. pinMode(12, OUTPUT); pinMode(11, OUTPUT); }

// the loop function runs over and over again forever void loop() { digitalWrite(12, HIGH); // turn the LED on (HIGH is the voltage level) delay(10000); // wait for a second digitalWrite(12, LOW); // turn the LED off by making the voltage LOW delay(2000);

digitalWrite(11, HIGH); // turn the LED on (HIGH is the voltage level) delay(10000); // wait for a second digitalWrite(11, LOW); // turn the LED off by making the voltage LOW delay(2000); // wait for a second }

Without assigning your pins to constant variables, with descriptive names, we don't know which is fan one and which is fan two.

The fans do shut off before the next one turns on. Are you maybe just seeing the fan spinning down while waiting the two seconds?

Comments that don't match the code are less than useless.