Sweep a servo according to Proximity sensor measure

Dependencies:   Servo X_NUCLEO_6180XA1 mbed

Fork of HelloWorld_6180XA1 by ST

Revision:
25:2c4710283e02
Parent:
24:018a59122fe3
Child:
26:e19e6cb2e6bb
--- a/main.cpp	Tue Nov 03 07:56:58 2015 +0000
+++ b/main.cpp	Tue Nov 03 15:28:39 2015 +0000
@@ -52,7 +52,7 @@
 
 void DisplayRefresh(OperatingMode op_mode)
 {
-   char str[4];
+   char str[5];
    
    if(op_mode==range_continuous_interrupt)
    {
@@ -63,7 +63,7 @@
       }
       else
       {
-         sprintf(str,"%s","---");
+         sprintf(str,"%s","----");
          board->display->DisplayString(str, strlen(str));
       }
    }
@@ -76,7 +76,7 @@
       }
       else
       {
-         sprintf(str,"%s","---");
+         sprintf(str,"%s","----");
          board->display->DisplayString(str, strlen(str));
       }
    }    
@@ -88,8 +88,8 @@
    /* user button used to stop measurements in interrupt mode */
    InterruptIn stop_button(USER_BUTTON);
    STMPE1600DigiIn measure_type(device_i2c, GPIO_11);
-   int status, measure;
-   char str[4];
+   int status, status_t, measure;
+   char str[5];
  
    //device_i2c.frequency(400000); //change i2c frequncy from 100kHz to 400kHz
    pc.baud(115200); //change the printf baudrate