Riad_ Bajraktarevic
/
NightRider
09_12_19
Revision 0:52e07f851640, committed 2019-12-09
- Comitter:
- riad
- Date:
- Mon Dec 09 18:02:07 2019 +0000
- Commit message:
- Night_Rider_02
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 52e07f851640 main.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Mon Dec 09 18:02:07 2019 +0000 @@ -0,0 +1,25 @@ +#include "mbed.h" + +PwmOut myled(p23); + +int main() +{ + myled.period(0.01f); + myled = 0.0f; + + while(1) + { + for(float i = 0.0f; i<1.0f ; i += 0.03f) + { + myled = i; + wait(0.03f); + } + for(float i = 1.0f; i>0.0f ; i -= 0.03f) + { + myled = i; + wait(0.03f); + } + } +} + +
diff -r 000000000000 -r 52e07f851640 mbed.bld --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Mon Dec 09 18:02:07 2019 +0000 @@ -0,0 +1,1 @@ +https://os.mbed.com/users/mbed_official/code/mbed/builds/65be27845400 \ No newline at end of file