homayoun mh
/
Arduino_BlinkWithoutDelay_Timer
Arduino_BlinkWithoutDelay_Timer sample code ported.
main.cpp
- Committer:
- homayoun
- Date:
- 2014-09-03
- Revision:
- 0:9dccd331cbdc
File content as of revision 0:9dccd331cbdc:
#include "mbed.h" DigitalOut myled(LED1); Timer t; int interval = 1000; void setup() { t.start(); } void loop() { if(t.read_ms() > interval) { t.reset(); myled = !myled; } } int main() { setup(); while(1) loop(); }