Given LED PinName and blink interval, spawns a thread that blinks that LED at the specified interval

Dependents:   Blinky_Tests Blinky_Tests_GreenTea1

Files at this revision

API Documentation at this revision

Comitter:
sarahmarshy
Date:
Mon Sep 19 19:52:49 2016 +0000
Parent:
0:8fe86312b714
Commit message:
Force led low in constructor;

Changed in this revision

Blinky.cpp Show annotated file Show diff for this revision Revisions of this file
diff -r 8fe86312b714 -r 5b51a271d47e Blinky.cpp
--- a/Blinky.cpp	Mon Sep 19 16:21:27 2016 +0000
+++ b/Blinky.cpp	Mon Sep 19 19:52:49 2016 +0000
@@ -3,6 +3,7 @@
 Blinky::Blinky(PinName led, int interval):
         _led(led), _interval(interval){
     stop_blink=false;
+    _led=1;
 }
 void Blinky::start(){
     _blinker.start(this, &Blinky::blink_led);