evenjc

Pulsing LED - Yellow LED [nolib]

Jun 4th, 2019
343
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. const int yellowLED = 13;
  2.  
  3. void setup() {
  4.   // put your setup code here, to run once:
  5.   pinMode(yellowLED, OUTPUT);
  6. }
  7.  
  8. void loop() {
  9.   // put your main code here, to run repeatedly:
  10.   for(int i = 0; i < 255; i++) {
  11.     analogWrite(yellowLED, i);
  12.     delay(5);
  13.   }
  14.   for(int i = 255; i > 0; i--) {
  15.     analogWrite(yellowLED, i);
  16.     delay(5);
  17.   }
  18. }
Advertisement
Add Comment
Please, Sign In to add comment