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.
Revision 0:ab368b7d8765, committed 2014-11-03
- Comitter:
- jwaters9
- Date:
- Mon Nov 03 05:55:24 2014 +0000
- Commit message:
- first commit
Changed in this revision
diff -r 000000000000 -r ab368b7d8765 ShiftBrite.lib --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ShiftBrite.lib Mon Nov 03 05:55:24 2014 +0000 @@ -0,0 +1,1 @@ +http://developer.mbed.org/users/jwaters9/code/ShiftBrite/#466ea48e852a
diff -r 000000000000 -r ab368b7d8765 main.cpp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp Mon Nov 03 05:55:24 2014 +0000
@@ -0,0 +1,34 @@
+#include "mbed.h"
+#include "ShiftBrite.h"
+
+//ShiftBrite Demo
+//DigitalOut latch(p15);
+//DigitalOut enable(p16);
+//Cycles through different colors on RGB LED
+SPI spi(p11, p12, p13);
+
+ShiftBrite myBrite(p15,p16,spi); //latch, enable, spi
+
+int main() {
+int r,g,b;
+r=g=b=50;
+
+ while(1) {
+ myBrite.Write(255,255,255);
+ wait(0.5);
+ myBrite.Write(0,0,255);
+ wait(0.5);
+ myBrite.Write(0,255,0);
+ wait(0.5);
+ myBrite.Write(255,0,0);
+ wait(0.5);
+
+ myBrite.Brightness(r,g,b);
+ if(r<1023)
+ r+=50;
+ else
+ r=50;
+ g=b=r;
+
+ }
+}
diff -r 000000000000 -r ab368b7d8765 mbed.bld --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Mon Nov 03 05:55:24 2014 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/031413cf7a89 \ No newline at end of file
ShiftBrite