diff options
| author | Sudar <sudar@sudarmuthu.com> | 2014-09-10 11:00:34 +0530 |
|---|---|---|
| committer | Sudar <sudar@sudarmuthu.com> | 2014-09-10 11:00:34 +0530 |
| commit | fe00b04a0e1a58f63ae134081d2d896f27ac3f2d (patch) | |
| tree | 632698c837a0828541dde6acb72fd10f6cb1b7ec /examples/Fade/Fade.ino | |
| parent | e30bb5c28a42152007d70325477f364605b73f34 (diff) | |
| parent | 48356f96ce05948a046d0732dedda66b3e0b69c8 (diff) | |
Merge pull request #254 from peplin/test-suite-and-ci
Add an automated test runner for example programs and Travis CI integration
Diffstat (limited to 'examples/Fade/Fade.ino')
| -rw-r--r-- | examples/Fade/Fade.ino | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/examples/Fade/Fade.ino b/examples/Fade/Fade.ino deleted file mode 100644 index b47bf43..0000000 --- a/examples/Fade/Fade.ino +++ /dev/null @@ -1,31 +0,0 @@ -/* - Fade - - This example shows how to fade an LED on pin 9 - using the analogWrite() function. - - This example code is in the public domain. - - */ -int brightness = 0; // how bright the LED is -int fadeAmount = 5; // how many points to fade the LED by - -void setup() { - // declare pin 9 to be an output: - pinMode(9, OUTPUT); -} - -void loop() { - // set the brightness of pin 9: - analogWrite(9, brightness); - - // change the brightness for next time through the loop: - brightness = brightness + fadeAmount; - - // reverse the direction of the fading at the ends of the fade: - if (brightness == 0 || brightness == 255) { - fadeAmount = -fadeAmount ; - } - // wait for 30 milliseconds to see the dimming effect - delay(30); -} |
