Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Task

Create a program such that the LED brightness gradually increases from 0 to 255, and then goes abruptly to 0.

Further, modify your program above to decrease the brightness gradually from 255 to 0 instead of an abrupt change.

Hints

  • Use pin 11. If you are already having the LED connected to pin 11, you need not change any connection. Why can’t you use pin 13?
  • You will have to use a for loop. Lookup for in https://www.arduino.cc/en/Reference
  • The delay should be around 5-10 milliseconds.
  • No labels