ECE3872 HW/SW Project Code

Dependencies:   mbed Servo mbed-rtos 4DGL-uLCD-SE PinDetect X_NUCLEO_53L0A1

Revision:
25:7764baddb7bc
Parent:
18:0e0edd4f9e4d
Child:
26:2063ee8419cc
--- a/main.cpp	Mon Apr 13 02:43:08 2020 +0000
+++ b/main.cpp	Mon Apr 13 21:32:00 2020 +0000
@@ -1,8 +1,9 @@
 #include "mbed.h"
 #include <iostream>
+#include <vector>
 #include "speaker_out.h"
-#include "uLCD_4DGL.h"
 #include "motor_ctl.h"
+
 DigitalOut myled1(LED1);
 DigitalOut myled2(LED2);
 DigitalOut myled3(LED3);
@@ -17,6 +18,10 @@
 
 enum sm_state {sRESET, sSTOP, sRECORD, sPLAY, sERASE};
 
+//SongPlayer music; 
+//Puppet puppet;
+vector<float> song; //stores all notes recorded by user
+
 void reset(){ 
     /* reset state:
         Initial state upon powering up the device
@@ -28,6 +33,9 @@
         6. LED goes from green to red
         NOTE: ONLY exits to stop or erase state 
     */
+    //puppet.reset();
+    //music.reset();
+    //led = red; //use rgb red for this
 }
 void stop(){
     /* stop state:
@@ -36,6 +44,8 @@
         2. Stop recording
         3. Mute all audio
     */
+    //puppet.stop();
+    //music.stop(); 
 }
 void record(){
     /* record state:
@@ -46,6 +56,7 @@
         4. Append to list of frequencies
         5. 
     */
+    //music.record(); //need to play as recording happens
 }
 void play(){
     /* play state:
@@ -55,11 +66,14 @@
             - moving servo motors accordingly
             - playing corresponding sounds
     */
+    //puppet.dance();
+    //music.play();
 }
 void erase(){
     /* erase state:
         erases entire audio recording
     */
+    //song.erase();
 }
 
 void state_machine_mgr(){
@@ -156,8 +170,6 @@
 }
 
 int main() {
-    myled1 = 1; 
-    //hardware_init();
     //state_machine_mgr();
-    move_motors();
+    puppet_move();
 }