Example_Max7221

Dependencies:   Max7221 mbed

Files at this revision

API Documentation at this revision

Comitter:
jakowisp
Date:
Thu Aug 08 08:50:18 2013 +0000
Commit message:
Example program for Max7221
;

Changed in this revision

Max7221.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
mbed.bld Show annotated file Show diff for this revision Revisions of this file
diff -r 000000000000 -r 5e4c7202a555 Max7221.lib
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Max7221.lib	Thu Aug 08 08:50:18 2013 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/jakowisp/code/Max7221/#e2b160410338
diff -r 000000000000 -r 5e4c7202a555 main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Thu Aug 08 08:50:18 2013 +0000
@@ -0,0 +1,33 @@
+ #include "mbed.h"
+ #include "Max7221.h"
+ 
+
+// p5: DIN, p7: CLK, p8: LOAD/CS
+Max7221 max7221disp1(p5, p7, p8);
+//Max7221 max7221disp2(p5, p7, p8);
+//Max7221 max7221disp3(p11, p13, p14);
+//Max7221 max7221disp4(p11, p13, p14);
+
+int count=-99;
+
+void loop(void) {
+   max7221disp1=count;
+   if (count < 100)
+      count=count+1;
+   else 
+      count=-99; 
+}
+
+int main() {  
+    max7221disp1.Setup();
+    //Max7221::SetupALl();
+    max7221disp1.WriteFloat(123.125);
+    wait(1.0);  
+
+    while (1) {
+        loop();
+        wait(1.0);
+    }
+}
+
+
diff -r 000000000000 -r 5e4c7202a555 mbed.bld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Thu Aug 08 08:50:18 2013 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/e3affc9e7238
\ No newline at end of file