/usr/share/fritzing/sketches/core/Fritzing Creator Kit DE+EN/creator-kit-de/Fritzing Creator Kit/Fading/Fading.ino is in fritzing-data 0.9.3b+dfsg-4.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | /*
Fading
dimmt eine LED langsam an und aus
Dieses Beispiel aus dem Fritzing Creator Kit: www.fritzing.org/creator-kit.
*/
int ledPin = 9; // ledPin wird deklariert
void setup(){
// die analoge Ausgabe muss nicht im Setup initialisiert werden
}
void loop(){
for(int leuchtwert = 0; leuchtwert <= 255; leuchtwert++) { // fadeValue wird in Fünferschritten hochgezählt
analogWrite(ledPin, leuchtwert); // und als analoger Wert an die LED übertragen
delay(2); // kurze Wartezeit
}
for(int leuchtwert = 255; leuchtwert >= 0; leuchtwert--) { // fadeValue wird in Fünferschritten runtergezählt
analogWrite(ledPin, leuchtwert); // und als analoger Wert an die LED übertragen
delay(2); // kurze Wartezeit
}
}
|