// Zeitstempel ab Start
unsigned long nextts = 0;
// LED Pin
#define LED 13
// On/Off intervall
#define INTERVAL 500
void setup() {
pinMode(LED, OUTPUT);
Serial.begin(9600);
}
void loop() {
// millis() Anzahl der ms seit ab Start
if(millis() > nextts) {
nextts = millis() + INTERVAL;
digitalWrite(LED, !digitalRead(LED));
Serial.println(digitalRead(LED));
}
}
Be the first to comment
You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.