This repository has been archived on 2022-08-16. You can view files and clone it, but cannot push or open issues or pull requests.
speedclock/tests/Startsignal_Test/Startsignal_Test.ino
2018-07-07 19:17:51 +02:00

35 lines
595 B
C++

#include "pitches.h"
int melody[] = {
NOTE_G4, NOTE_C6};
void setup() {
// play startsignal
delay(1000);
tone(6, melody[0], 200);
delay(1000);
tone(6, melody[0], 200);
delay(1000);
tone(6, melody[1], 100);
delay(100);
noTone(6);
//set all LEDS as OUTPUT
pinMode(A0,OUTPUT);
pinMode(A1,OUTPUT);
pinMode(A2,OUTPUT);
pinMode(A3,OUTPUT);
}
void loop() {
//test all LEDS
int pins[] = {A0, A1, A2, A3};
for(int i=0;i<4;i++){
Serial.println(i, pins[i]);
digitalWrite(pins[i], HIGH);
delay(500);
digitalWrite(pins[i], LOW);
delay(500);
}
}