Kiko Ishimoto
/
mbed_class3
I was studyed class.
Revision 0:c4f4357595c7, committed 2014-11-04
- Comitter:
- kikoaac
- Date:
- Tue Nov 04 14:20:46 2014 +0000
- Commit message:
- ?????????3
;
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 c4f4357595c7 main.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Tue Nov 04 14:20:46 2014 +0000 @@ -0,0 +1,24 @@ +#include "mbed.h" +Serial pc(USBTX, USBRX); +DigitalOut myled(LED1); +class LED { + private: + float time; + public: + LED(float t){time=t;}; + void action(); +}; +void LED::action() +{ + wait(time); + myled=!myled; +} +int main() { + LED *s; + s=new LED(0.5); + while(1) + { + s->action(); + } + delete s; +} \ No newline at end of file
diff -r 000000000000 -r c4f4357595c7 mbed.bld --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Tue Nov 04 14:20:46 2014 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/031413cf7a89 \ No newline at end of file