void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
pinMode(4, OUTPUT);
pinMode(5, OUTPUT);
pinMode(6, OUTPUT);
// LED Rot: Pin 4
// LED Grün: Pin 5
// LED Blau: Pin 6
pinMode(A0, INPUT);
pinMode(A1, INPUT);
pinMode(A2, INPUT);
pinMode(A2, INPUT);
// Input Knopf An/Aus: A0
// Input Knopf Helligkeit: A1
// Input Knopf Farbwechsel: A2
int in0 = 0;
int in1 = 0;
int in2 = 0;
int in3 = 0;
int lamp = 0;
int vol = 0;
int colrd = 0;
int colbl = 0;
int colgn = 0;
}
void loop() {
// put your main code here, to run repeatedly:
int lamp;
int in0 = analogRead(A0);
int in1 = analogRead(A1);
int in2 = analogRead(A2);
int in3 = analogRead(A3);
Serial.print(in0); Serial.print(":"); Serial.print(in1); Serial.print(":"); Serial.print(":"); Serial.print(in2); Serial.print(":"); Serial.println(in3);
if (in0 > 600) {
if (in1 > 600) {
analogWrite(5, 255);
delay(1000);
analogWrite(5, 0);
delay(1000);
}
if (in2 > 600) {
analogWrite(6, 255);
delay(1000);
analogWrite(6, 0);
delay(1000);
}
}
}