aboutsummaryrefslogtreecommitdiff
path: root/csource/Fade
diff options
context:
space:
mode:
Diffstat (limited to 'csource/Fade')
-rw-r--r--csource/Fade/Fade.cpp6
-rw-r--r--csource/Fade/build-cli/core.abin291670 -> 291730 bytes
2 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;
diff --git a/csource/Fade/build-cli/core.a b/csource/Fade/build-cli/core.a
index 6a972b3..efc0af7 100644
--- a/csource/Fade/build-cli/core.a
+++ b/csource/Fade/build-cli/core.a
Binary files differ