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.
Diff: main.cpp
- Revision:
- 1:5002e9577641
- Parent:
- 0:b7855d83d15b
--- a/main.cpp Sun Sep 04 02:34:07 2016 +0000
+++ b/main.cpp Sun Sep 04 07:55:21 2016 +0000
@@ -8,7 +8,7 @@
DigitalOut yy(D13);
DigitalOut zz(D14);
-const int state[10][7]= {
+const int state[10][8]= {
{ 0, 1, 1, 1, 1, 1, 1}, // 0
{ 0, 0, 0, 0, 1, 1, 0}, // 1
{ 1, 0, 1, 1, 0, 1, 1}, // 2
@@ -86,11 +86,16 @@
}
int main()
{
- int round=0,round2=0,round3=0,round4=0;
+ int round=0,round2=0,round3=0,round4=0,r=0;;
while(1)
{
seg1(round);
- round++;
+ r++;
+ if (r>=30)
+ {
+ round++;
+ r=0;
+ }
wait_ms(5);
seg2(round2);
wait_ms(5);