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.
Fork of drugi_zad by
Revision 0:936716d22580, committed 2014-03-06
- Comitter:
- tim007
- Date:
- Thu Mar 06 13:53:29 2014 +0000
- Commit message:
- LV1_Grupa5_Tim007_Zadatak2
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
| mbed.bld | Show annotated file Show diff for this revision Revisions of this file |
diff -r 000000000000 -r 936716d22580 main.cpp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp Thu Mar 06 13:53:29 2014 +0000
@@ -0,0 +1,42 @@
+#include "mbed.h"
+
+DigitalOut myled(LED1);
+
+int main() {
+ int uzlazno=1;
+ float u=1;
+ float i=1;
+ myled = 0;
+ wait(1);
+ myled = 1;
+ wait(1);
+ while(1) {
+
+ if(uzlazno == 1)
+ {
+ u=u+0.06;
+ i=i-0.06;
+ myled = 0;
+ wait(u);
+
+ myled = 1;
+ wait(i);
+ if(u>=1.9 || i<=0.1)
+ uzlazno=-1;
+ }
+ else
+ {
+ u=u-0.06;
+ i=i+0.06;
+ myled = 0;
+ wait(u);
+
+ myled = 1;
+ wait(i);
+ if(i>=1.9 || u<=0.1)
+ uzlazno=1;
+ }
+
+
+ }
+}
diff -r 000000000000 -r 936716d22580 mbed.bld --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Thu Mar 06 13:53:29 2014 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/8e73be2a2ac1 \ No newline at end of file
