Sound update

Dependencies:   4DGL-uLCD-SE Physac-MBED PinDetect SDFileSystem mbed-rtos mbed

Revision:
12:5d913b57da7c
Parent:
11:e00a208bd85a
Child:
16:6cf744b2623a
--- a/main.cpp	Tue Nov 29 23:05:30 2022 +0000
+++ b/main.cpp	Wed Nov 30 21:20:21 2022 +0000
@@ -1,28 +1,30 @@
 #include "mbed.h"
 #include "rtos.h"
-#include "wave_player.h"
+
+#include "globals.h"
+#include "hockey.h"
+
 //#include "Speaker.h"
 #include "SDFileSystem.h"
 #include "uLCD_4DGL.h"
 
-SDFileSystem sd(p5, p6, p7, p8, "sd"); // the pinout on the mbed Cool Components workshop board
+//SDFileSystem sd(p5, p6, p7, p8, "sd"); // the pinout on the mbed Cool Components workshop board
 
 DigitalOut myled(LED1);
-AnalogOut DACout(p20);
-PwmOut Rgb(p23);
-PwmOut rGb(p24);
-PwmOut rgB(p25);
-PwmOut PWMout(p21);
-wave_player waver(&DACout);
+//AnalogOut DACout(p20);
+//PwmOut Rgb(p23);
+//PwmOut rGb(p24);
+//PwmOut rgB(p25);
+//PwmOut PWMout(p21);
+//wave_player waver(&DACout);
+
+uLCD_4DGL uLCD(p9,p10,p30);
+BluefruitController blue(p13,p14);
+
 
 volatile bool game1 = false;
 volatile bool game2 = false;
-
-void thread2(void const *argument)
-{
-
-}
-
+/*
 void thread3(void const *argument)
 {
     FILE *wave_file;
@@ -67,15 +69,20 @@
         }
     }
 }
+*/
 int main()
 {
-    Thread thread2(thread2);
-    Thread thread3(thread3);
-    Thread thread4(thread4);
-    while(1) {
+    printf("Starting thread 2\r\n");
+    game2 = true;
+    Thread thread2(hockeyGame);    
+    //Thread thread3(thread3);
+    //Thread thread4(thread4);
+    
+    printf("Blinking LED:\r\n");
+    while (true) {
         myled = 1;
-        wait(0.2);
+        Thread::wait(500);
         myled = 0;
-        wait(0.2);
+        Thread::wait(500);
     }
 }