Mark Schwarzer / Mbed 2 deprecated Schwarzer_A3_2_Tickers

Dependencies:   mbed A3_1_Single_Timer

Revision:
3:d90d04dce9f2
Parent:
2:de9d94dc0454
diff -r de9d94dc0454 -r d90d04dce9f2 main.cpp
--- a/main.cpp	Tue Oct 06 14:53:06 2020 +0000
+++ b/main.cpp	Tue Oct 06 15:04:26 2020 +0000
@@ -1,18 +1,24 @@
-
 #include "mbed.h"
 Ticker tickerLED2;  //creat ticker object
+Ticker tickerLED3; 
 DigitalOut LEDOut2(LED2);
+DigitalOut LEDOut3(LED3);
 
 void changeLED2()  //the function that will be called by the ticker object.
 {
     LEDOut2 = !LEDOut2;
 }
+void changeLED3() //function called for other ticker object LED3
+{
+    LEDOut3 = !LEDOut3;
+}
 
 int main()
 {
     tickerLED2.attach(&changeLED2,0.2); //the address of the function to call
     //and the interval in seconds between
     //calls to that function
+    tickerLED3.attach(&changeLED3,0.8); //changing the interval in seconds for LED3
 
     while(1) {
         wait(0.1);