diff options
Diffstat (limited to 'csource')
| -rw-r--r-- | csource/Blink/Blink.cpp | 2 | ||||
| -rw-r--r-- | csource/Blink/build-cli/core.a | bin | 292302 -> 292302 bytes | |||
| -rw-r--r-- | csource/Fade/Fade.cpp | 6 | ||||
| -rw-r--r-- | csource/Fade/build-cli/core.a | bin | 291670 -> 291730 bytes |
4 files changed, 5 insertions, 3 deletions
diff --git a/csource/Blink/Blink.cpp b/csource/Blink/Blink.cpp index a8c64ba..85c0397 100644 --- a/csource/Blink/Blink.cpp +++ b/csource/Blink/Blink.cpp @@ -17,7 +17,7 @@ void setup() { void loop() { digitalWrite(14, HIGH); // set the LED on - delay(1000); // wait for a second + delay(100); // wait for a second digitalWrite(14, LOW); // set the LED off delay(1000); // wait for a second } diff --git a/csource/Blink/build-cli/core.a b/csource/Blink/build-cli/core.a Binary files differindex 8a83f9a..5fb09ee 100644 --- a/csource/Blink/build-cli/core.a +++ b/csource/Blink/build-cli/core.a 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 Binary files differindex 6a972b3..efc0af7 100644 --- a/csource/Fade/build-cli/core.a +++ b/csource/Fade/build-cli/core.a |
