Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #define RED_PIN 25
- #define GREEN_PIN 26
- #define BLUE_PIN 27
- void setup()
- {
- Serial.begin(115200);
- pinMode(RED_PIN, OUTPUT);
- pinMode(GREEN_PIN, OUTPUT);
- pinMode(BLUE_PIN, OUTPUT);
- int zahl = analogRead(A0);
- Serial.println("Hallo Welt");
- Serial.println(zahl);
- }
- void loop()
- {
- // Setze die RGB-LED auf Rot
- analogWrite(RED_PIN, 255);
- analogWrite(GREEN_PIN, 0);
- analogWrite(BLUE_PIN, 0);
- delay(1000);
- // Setze die RGB-LED auf Grün
- analogWrite(RED_PIN, 0);
- analogWrite(GREEN_PIN, 255);
- analogWrite(BLUE_PIN, 0);
- delay(1000);
- // Setze die RGB-LED auf Blau
- analogWrite(RED_PIN, 0);
- analogWrite(GREEN_PIN, 0);
- analogWrite(BLUE_PIN, 255);
- delay(1000);
- // Setze die RGB-LED auf Weiß
- analogWrite(RED_PIN, 255);
- analogWrite(GREEN_PIN, 255);
- analogWrite(BLUE_PIN, 255);
- delay(1000);
- // Setze die RGB-LED auf Aus
- analogWrite(RED_PIN, 0);
- analogWrite(GREEN_PIN, 0);
- analogWrite(BLUE_PIN, 0);
- delay(1000);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement