Template project for University of York ELE00032C Lab 8

Dependencies:   UoY-serial

Revision:
2:ebee08edbab9
Parent:
1:acb591685a28
--- a/main.cpp	Thu Feb 04 17:12:01 2021 +0000
+++ b/main.cpp	Wed Feb 10 16:06:39 2021 +0000
@@ -3,12 +3,18 @@
 DigitalOut green(D2);
 DigitalOut red(D3);
 
-int main()
-{
-    while (true) {
-        green = true;
-        thread_sleep_for(500);
-        green = false;
-        thread_sleep_for(2500);
-    }
+Thread redThread;
+
+void redThreadFn() {
+    
+    // Flash the red LED here
+    
 }
+
+int main() {
+    
+    redThread.start(redThreadFn);
+    
+    // Flash the green LED here
+    
+}