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: Crypto RNG mbed WakeUp
Fork of mBuinoBlinky by
Diff: main.cpp
- Revision:
- 1:47c61bf9c81e
- Parent:
- 0:aa0e1ad88af5
- Child:
- 2:fd6008aa85cd
diff -r aa0e1ad88af5 -r 47c61bf9c81e main.cpp
--- a/main.cpp Mon Jul 14 19:09:55 2014 +0000
+++ b/main.cpp Thu Sep 04 11:20:33 2014 +0000
@@ -8,35 +8,25 @@
{
while(1)
{
- delayTime = 0.05;
- for(int x = 0; x < 7; x++)
+ if(delayTime > 0.5)
{
- LED[x] = 1; // turn on
- wait(.2); // delay
-
- LED[x] = 0; // turn off
- wait(delayTime); // delay
+ delayTime = 0.05;
}
- for(int x = 6; x >= 0; x--)
+ for(int x=0; x<7; x++)
{
- LED[x] = 1; // turn on
- wait(.2); // delay
-
- LED[x] = 0; // turn off
- wait(delayTime); // delay
+ LED[x] = 1;
+ wait(delayTime);
+ LED[x] = 0;
+ //wait(delayTime);
}
-
- for(int x = 0; x < 7; x++)
+ for(int x=5; x>0; x--)
{
- LED[x] = 1; // turn on
- wait(delayTime); // delay
- }
- for(int x = 6; x >= 0; x--)
- {
- LED[x] = 0; // turn off
- wait(delayTime); // delay
+ LED[x] = 1;
+ wait(delayTime);
+ LED[x] = 0;
+ //wait(delayTime);
}
-
+ delayTime = delayTime * 1.5;
}
}
