Manual timing for circuit
int led1Pin=6;
void setup() { pinMode(led1Pin, OUTPUT);// set pin 6 as output }
void loop() { digitalWrite(led1Pin, HIGH); // turn ON delay(10); // delay 10 milliseconds digitalWrite(led1Pin, LOW); // turn OFF delay(10); // delay 10 milliseconds }
// delay(10) is in milliseconds, 1000ms= 1 second // for smaller delay use delayMicroseconds(10); instead of delay(10); // 1000 microseconds= 1 millisecond //equal ON/OFF delay equals 50% duty cycle
---------------------------
Comprehend and Copy Nature... Viktor Schauberger
“The first principle is that you must not fool yourself and you are the easiest person to fool.”― Richard P. Feynman
|