aboutsummaryrefslogtreecommitdiff
path: root/csource/Fade/Fade.cpp
diff options
context:
space:
mode:
authorDonald Delmar Davis <don@suspectdevices.com>2012-10-08 14:16:31 -0700
committerDonald Delmar Davis <don@suspectdevices.com>2012-10-08 14:16:31 -0700
commit98d4a89bec077cbbfa8274a0ec62d006b0d9ba62 (patch)
tree0b9d0558a21d7366c684269e51ce6ad0f0a3435e /csource/Fade/Fade.cpp
parenta5094138af9cd518a4e8eca33bb32a6701617fbc (diff)
update readme.HEADmaster
Diffstat (limited to 'csource/Fade/Fade.cpp')
-rw-r--r--csource/Fade/Fade.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/csource/Fade/Fade.cpp b/csource/Fade/Fade.cpp
index ffc7636..0c5a2a1 100644
--- a/csource/Fade/Fade.cpp
+++ b/csource/Fade/Fade.cpp
@@ -16,12 +16,14 @@ int fadeAmount = 5; // how many points to fade the LED by
void setup() {
// declare pin 9 to be an output:
- pinMode(GREEN_LED, OUTPUT);
+ pinMode(GREEN_LED, OUTPUT);
+ pinMode(RED_LED, OUTPUT);
}
void loop() {
// set the brightness of pin 9:
- analogWrite(GREEN_LED, brightness);
+ analogWrite(GREEN_LED, brightness);
+ analogWrite(RED_LED, 255-brightness);
// change the brightness for next time through the loop:
brightness = brightness + fadeAmount;