Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: Adafruit_WS2801 mbed
Revision 1:54cf3c557fdf, committed 2015-01-16
- Comitter:
- AlanRager
- Date:
- Fri Jan 16 05:42:59 2015 +0000
- Parent:
- 0:63c1f03ccb9c
- Commit message:
- Wait... this is the actual changes to lightstrip_adafruit? Anyway - here's the code that made things kinda blink, just less bright because it was hurting my eyes.
Changed in this revision
| Adafruit_WS2801.lib | Show annotated file Show diff for this revision Revisions of this file |
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/Adafruit_WS2801.lib Fri Jan 16 05:36:27 2015 +0000 +++ b/Adafruit_WS2801.lib Fri Jan 16 05:42:59 2015 +0000 @@ -1,1 +1,1 @@ -http://developer.mbed.org/users/SomeRandomBloke/code/Adafruit_WS2801/#b99161307af3 +http://developer.mbed.org/users/AlanRager/code/Adafruit_WS2801/#b99161307af3
--- a/main.cpp Fri Jan 16 05:36:27 2015 +0000
+++ b/main.cpp Fri Jan 16 05:42:59 2015 +0000
@@ -18,13 +18,12 @@
for (i = 0; i < LED_NUM; i++){
leds.setPixelColor(
i,
- ( color & RED ),
- ( color & BLUE ),
- ( color & GREEN )
+ ( color & RED > 0 ? 4 : 0 ),
+ ( color & BLUE > 0 ? 4 : 0 ),
+ ( color & GREEN > 0 ? 4 : 0 )
);
}
leds.show();
- wait_ms(1);
color = color * 2;