Trying to use a library
Dependencies: mbed-rtos mbed BlinkLib
Fork of NerfUS by
Revision 10:2419cf5479c7, committed 2017-02-09
- Comitter:
- dupm2216
- Date:
- Thu Feb 09 16:52:32 2017 +0000
- Parent:
- 9:2d5e60c13461
- Commit message:
- Use BlinkerLib and MbedBlinker
Changed in this revision
BlinkLib.lib | Show annotated file Show diff for this revision Revisions of this file |
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r 2d5e60c13461 -r 2419cf5479c7 BlinkLib.lib --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/BlinkLib.lib Thu Feb 09 16:52:32 2017 +0000 @@ -0,0 +1,1 @@ +https://developer.mbed.org/users/dupm2216/code/BlinkLib/#77124b36cdd4
diff -r 2d5e60c13461 -r 2419cf5479c7 main.cpp --- a/main.cpp Thu Feb 09 16:35:02 2017 +0000 +++ b/main.cpp Thu Feb 09 16:52:32 2017 +0000 @@ -1,15 +1,13 @@ #include "mbed.h" -#include "rtos.h" +#include "MbedBlinker.hpp" -DigitalOut myled(LED1); +DigitalOut led(LED1); int main() { + MbedBlinker blinker(led); while(1) { - myled = 1; - wait(0.5); - myled = 0; - wait(0.5); + blinker.blink(); } }