Michael Antonucci / Mbed 2 deprecated A3_2_Ticker

Dependencies:   mbed

Revision:
3:e0ef8152a0f6
Parent:
2:302216e564bf
--- a/main.cpp	Tue Oct 11 13:38:14 2022 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,37 +0,0 @@
-//Base code for modification for Assignment 3.2
-//Blinks LED2 every 200ms using a single Ticker object.
-//Created: S. Licht, 10/04/2020
-#include "mbed.h"
-Ticker tickerLED2;  //creat ticker object
-InterruptIn switch1(p5);
-DigitalOut LEDOut2(LED2);
-DigitalOut LEDOut4(LED4);
-
-void changeLED2()  //the function that will be called by the ticker object.
-{
-    LEDOut2 = !LEDOut2;
-}
-
-void changeLED4()  //the function that will be called by the ticker object.
-{
-    LEDOut4 = !LEDOut4;
-}
-
-
-int main()
-{
-    tickerLED2.attach(&changeLED2,0.5); //the address of the function to call
-    //and the interval in seconds between
-    //calls to that function
-
-    while(1) {
-        wait(0.1);
-        wait(0.1);
-        wait(0.1);
-        //the main loop is spinning every 300ms, but the LED needs to go faster!
-
-    } //while
-
-    switch1.rise(&changeLED4);
-
-}