int pwm = D7;
int i = 0;
// the setup funtion runs once when you press reset and or power the board
void setup() {
//Define Pin
#define pwm = D7 // PWM on pin D7
pinMode(pmw,OUTPUT);//set pin D7 as an OUTPUT
}
// the loop funtion runs over and over again forever
void loop() {
for (i=0; i<= 200; i++) {
analogWrite(pmw, i);
analogWrite(5, 200 - i);
delay(35);
}
for (i=200; i>= 0; i--) {
analogWritepmw, i);
analogWrite(5, 200 - i);
delay(30);
}
}
A R D U I N O