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 1:cecfed677a08, committed 2014-05-27
- Comitter:
- Eduvance
- Date:
- Tue May 27 07:13:42 2014 +0000
- Parent:
- 0:375418015e74
- Commit message:
- A
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r 375418015e74 -r cecfed677a08 main.cpp
--- a/main.cpp Sat May 17 16:17:55 2014 +0000
+++ b/main.cpp Tue May 27 07:13:42 2014 +0000
@@ -1,12 +1,46 @@
-#include "mbed.h"
+#include "mbed.h"// select multiplexed seven segment display on remote lab
+BusOut Disp1(p26,p25,p24,p23,p22,p21,p20); // ABCDEFGdp
+DigitalOut vdd1(p19);
+DigitalOut vdd2(p18);
+//void setvdd1() {
+// vdd1=1;
+// vdd2=0;
+//}
-DigitalOut myled(LED1);
+void setvdd2() {
+ // vdd1=0;
+ vdd2=1;// to activate 1st seven segment display p18
+ vdd1=0;// to deactivate 2nd seven segment display and vice versa p19
+}
+
+int main()
+{
+while (1)
+{ //setvdd1();
-int main() {
- while(1) {
- myled = 1;
- wait(0.2);
- myled = 0;
- wait(0.2);
- }
+//Disp1 = 0xC0; wait(0.9) ;
+//Disp1 = 0xF9; wait(0.9) ;
+//Disp1 = 0xA4; wait(0.9) ;
+//Disp1 = 0xB0; wait(0.9) ;
+//Disp1 = 0x99; wait(0.9) ;
+//Disp1 = 0x92; wait(0.9);
+//Disp1 = 0x82; wait(0.9);
+//Disp1 = 0xF8; wait(0.9);
+//Disp1 = 0x80; wait(0.9);
+//Disp1 = 0x90; wait(0.9) ;
+
+setvdd2();
+
+Disp1 = 0xC0; wait(0.9) ;
+Disp1 = 0xF9; wait(0.9) ;
+Disp1 = 0xA4; wait(0.9) ;
+Disp1 = 0xB0; wait(0.9) ;
+Disp1 = 0x99; wait(0.9) ;
+Disp1 = 0x92; wait(0.9);
+Disp1 = 0x82; wait(0.9);
+Disp1 = 0xF8; wait(0.9);
+Disp1 = 0x80; wait(0.9);
+Disp1 = 0x90; wait(0.9) ;
+
}
+}