//PWM programme(Pulse With Modulation)
int LedPin=3;//only pwm pins 3,5,6,9,10,11 pins supported
int dc1= 255;/*DutyCycle(dc) = percentage of work done in a full cycle
which also represents how much voltage is used in the pin*/
int dc2=155;
int dc3= 55;
int dc4= 25;
int dc5= 5;
void setup() {
pinMode(LedPin,OUTPUT); // put your setup code here, to run once:
}
void loop() {
// put your main code here, to run repeatedly:
analogWrite(LedPin,dc1);
delay(3000);
analogWrite(LedPin,dc2);
delay(3000);
analogWrite(LedPin,dc3);
delay(3000);
analogWrite(LedPin,dc4);
delay(3000);
analogWrite(LedPin,dc5);
delay(3000);
}