sensory_array / Mbed 2 deprecated ymbed_haptic_belt_slave_onethread

Dependencies:   USBDevice mbed mbed-rtos

Revision:
2:1a0d675eaa6f
Parent:
1:2af026a7c290
Child:
3:6a249e8de7d8
--- a/main.cpp	Thu Mar 26 19:51:11 2015 +0000
+++ b/main.cpp	Thu Mar 26 20:21:30 2015 +0000
@@ -113,7 +113,6 @@
     int counter_ms = 0;
 
     //initialize and start everything
-    char btData[50];
     unsigned long startTime_ms[NUM_LRAS];
     int elapsed_ms[NUM_LRAS];
     int leftToWait_ms[NUM_LRAS];
@@ -138,13 +137,13 @@
         if(getBluetoothData()){ //if the bluetooth data has finished sending (there is a \0 detected)
             //read buffer
             //parse data
-            strcpy(returnBluetoothData(), btData, 50);
+            //strcpy(returnBluetoothData(), btData, 50);
             console1.printf("btData: ");
             console1.printf(bluetoothData);
             console1.printf("\n");
-            processData(btData);
-            if(counter_ms % 100 == 0){
-                int num = btData[0] - '0';
+            processData(bluetoothData);
+            if(counter_ms % 3 == 0){
+                int num = bluetoothData[0] - '0';
                 console1.printf("processed Data: ");
                 console1.printf("Motor#: %d | ", num);
                 console1.printf("Intensity : ");