/usr/share/fritzing/sketches/core/Fritzing Creator Kit DE+EN/creator-kit-en/Fritzing Creator Kit/Fading/Fading.ino is in fritzing-data 0.9.2b+dfsg-3.
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
fading an LED slowly on and off again
This example is part of the Fritzing Creator Kit: www.fritzing.org/creator-kit.
*/
int ledPin = 9; // ledPin is declared
void setup(){
// no need to declare the analog output in the setup
}
void loop(){
for(int fadeValue = 0; fadeValue <= 255; fadeValue += 5) { // fadeValue is counted up in steps of five
analogWrite(ledPin, fadeValue); // and sent to the led as an analog value
delay(2); // short stop
}
for(int fadeValue = 255; fadeValue >= 0; fadeValue -= 5) { // fadeValue is counted down in steps of five
analogWrite(ledPin, fadeValue); // and sent to the led as an analog value
delay(2); // short stop
}
}
|