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:f17f1b284f68, committed 2019-03-14
- Comitter:
- corsa1600
- Date:
- Thu Mar 14 18:32:08 2019 +0000
- Parent:
- 0:300fb6f45ac9
- Commit message:
- version2
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Thu Mar 14 17:58:43 2019 +0000
+++ b/main.cpp Thu Mar 14 18:32:08 2019 +0000
@@ -4,18 +4,29 @@
DigitalOut led2(LED2);
Thread thread;
-void led2_thread() {
+void led2_thread()
+{
+ double x, y =1.99, z=0.99;
while (true) {
led2 = !led2;
- wait(1);
+ wait(0.5);
+
+ for (int j=0; j<100; j++)
+ for (int i=0; i<100000; i++)
+ x = y*z+x;
+
}
}
int main() {
thread.start(led2_thread);
-
+ double x, y=1.99, z=0.99;
while (true) {
led1 = !led1;
- wait(0.5);
+ wait(0.25);
+ for (int j=0; j<200; j++)
+ for (int i=0; i<100000; i++)
+ x = y*z+x;
+
}
}
\ No newline at end of file