Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int LEDPIN=5;
- void setup() {
- pinmode(LEDPIN,OUTPUT);
- }
- void loop() {
- for(int i=0;i<255;i++)
- {
- analogWrite(LEDPIN,i);
- delay(50);
- }
- delay(2000);
- for(int i=255;i>=0;i--)
- {
- analogWrite(LEDPIN,i);
- delay(50);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement