home_server_pwm.ino ver1
parent
f12624f87a
commit
dba521933e
|
@ -0,0 +1,16 @@
|
|||
int pwm_fan = 6;
|
||||
void setup() {
|
||||
//Declaring LED pin as output
|
||||
pinMode(pwm_fan, OUTPUT);
|
||||
}
|
||||
void loop() {
|
||||
//Fading the LED
|
||||
for(int i=0; i<255; i++){
|
||||
analogWrite(pwm_fan, i);
|
||||
delay(5);
|
||||
}
|
||||
for(int i=255; i>0; i--){
|
||||
analogWrite(pwm_fan, i);
|
||||
delay(5);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue