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: mbed
Revision 1:fdf5e90de5d0, committed 2017-06-05
- Comitter:
- mijimy
- Date:
- Mon Jun 05 08:30:31 2017 +0000
- Parent:
- 0:1690fdfbb3c5
- Commit message:
- 2 segment;
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Mon Jun 05 08:19:44 2017 +0000
+++ b/main.cpp Mon Jun 05 08:30:31 2017 +0000
@@ -1,12 +1,13 @@
#include "mbed.h"
BusOut Seg1(PC_9,PC_8,PB_8,PC_6,PB_9,PC_5,PA_5,PA_12);// A,B,C,D,E,F,G,DP
+BusOut Seg2(PA_8,PB_1,PB_10,PB_15,PB_4,PB_14,PB_5,PB_13);// A,B,C,D,E,F,G,DP
char SegConvert(char SegValue); // functionprototype
int main() { // main program
while (1)
{ // infinite loop
- for (int i=9;i>-1;i--)
- {
- Seg1=SegConvert(i); //function call
+ for (int i=99;i>-1;i--)
+ { Seg1=SegConvert(i/10); //function call
+ Seg2=SegConvert(i%10); //function call
wait(0.2);
}
}