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.
Fork of Max7221 by
Diff: main.cpp
- Revision:
- 2:828c62cc1861
- Parent:
- 1:d8589d1f368c
diff -r d8589d1f368c -r 828c62cc1861 main.cpp
--- a/main.cpp Tue Aug 06 08:18:53 2013 +0000
+++ b/main.cpp Wed Aug 07 02:15:17 2013 +0000
@@ -3,28 +3,26 @@
// p5: DIN, p7: CLK, p8: LOAD/CS
-// Max7221 max7221disp1(p5, p7, p8);
-Max7221 max7221disp1(p11, p13, p14);
+Max7221 max7221disp1(p5, p7, p8);
+//Max7221 max7221disp2(p5, p7, p8);
+//Max7221 max7221disp3(p11, p13, p14);
+//Max7221 max7221disp4(p11, p13, p14);
-int count=-9999999;
+int count=-99;
void loop(void) {
max7221disp1.WriteInt(count);
- if (count < 10)
+ if (count < 100)
count=count+1;
else
- count=-9999999;
+ count=-99;
}
-int main() {
-
+int main() {
max7221disp1.Setup();
- Max7221::WriteAll(0x0f,0x01);
- wait_ms(500);
- Max7221::WriteAll(0x0f,0x00);
+ //Max7221::SetupALl();
max7221disp1.WriteFloat(123.125);
- wait(1.0);
-
+ wait(1.0);
while (1) {
loop();
@@ -32,3 +30,4 @@
}
}
+
