newTicker_demo
Dependencies: NewTicker mbed millis
Revision 0:eaded7c397f7, committed 2014-10-31
- Comitter:
- lisper
- Date:
- Fri Oct 31 08:05:44 2014 +0000
- Commit message:
- newTicker_demo
Changed in this revision
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/NewTicker.lib Fri Oct 31 08:05:44 2014 +0000 @@ -0,0 +1,1 @@ +http://developer.mbed.org/teams/DFRobot/code/NewTicker/#c143e6906ab5
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Fri Oct 31 08:05:44 2014 +0000 @@ -0,0 +1,30 @@ +/* + * Copyright: DFRobot + * license: GPL + * Author: lisper (lisper.li@dfrobot.com) + * Date: 2014-10-30 + * Description: example program for new ticker library + */ + + +#include "mbed.h" +#include "NewTicker.h" + +DigitalOut myled(LED1); + +void blink () +{ + myled = !myled; +} + +int main() +{ + startMillis (); //must call this function if you want use millis (); + + NewTicker ticker; + + ticker.attach (blink, 1000); + while(1) { + ticker.update (); + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Fri Oct 31 08:05:44 2014 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/031413cf7a89 \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/millis.lib Fri Oct 31 08:05:44 2014 +0000 @@ -0,0 +1,1 @@ +http://developer.mbed.org/users/lisper/code/millis/#9492904126e9