26 lines
703 B
C++
26 lines
703 B
C++
const int OUT = LED_BUILTIN; // Ausgangs pin
|
|
const int TIME_ON = 5 * 60; //länge des Pulses in Sekunden
|
|
const int TIME_OFF = 30 * 60; //zeit zwischen den Pulsen in Sekunden
|
|
const int T_ON = TIME_ON * 1000;
|
|
const int T_OFF = TIME_OFF * 1000;
|
|
void setup() {
|
|
// put your setup code here, to run once:
|
|
pinMode(OUT, OUTPUT);
|
|
Serial.begin(9600);
|
|
Serial.print("Länge des Pulses: ");
|
|
Serial.print(TIME_ON);
|
|
Serial.println(" Sekunden.");
|
|
|
|
Serial.print("Zeit zwischen den Pulsen: ");
|
|
Serial.print(TIME_OFF);
|
|
Serial.println(" Sekunden.");
|
|
}
|
|
|
|
void loop() {
|
|
// put your main code here, to run repeatedly:
|
|
digitalWrite(OUT, HIGH);
|
|
delay(T_ON);
|
|
digitalWrite(OUT, LOW);
|
|
delay(T_OFF);
|
|
}
|