Created
June 27, 2015 13:59
-
-
Save michaelsarduino/4d4d0c8c038cd62eba62 to your computer and use it in GitHub Desktop.
Arduino Disco Sketch zum Schalten der LEDs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void setup() { | |
Serial.begin(9600); | |
} | |
void loop() { | |
if(Serial.available() > 0) | |
{ | |
delay(5); | |
int kraft = Serial.parseInt(); | |
leds_schalten(kraft); | |
} | |
} | |
void leds_schalten(int kraft) { | |
analogWrite(3, kraft); | |
analogWrite(5, kraft); | |
analogWrite(6, kraft); | |
analogWrite(9, kraft); | |
analogWrite(10, kraft); | |
analogWrite(11, kraft); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment