Pilot 1 working code (excluding new patient after calculation). %d changed in %f sensordata serial log.

Dependencies:   ADS1015 MPU6050 PixelArray mbed

Fork of Momo_New by Momo Medical

Revision:
15:635303444c81
Parent:
12:7b3a5940f911
--- a/Sensorplate/main.cpp	Thu Sep 28 14:07:12 2017 +0000
+++ b/Sensorplate/main.cpp	Thu Sep 28 14:23:10 2017 +0000
@@ -80,14 +80,11 @@
 
 void serial_read()                                                          // Serial read for select LED intensity and colour.
 {
-    pc.printf("It works :)!");
     
     if (pi.readable()) {
-        char message[3];
+        char message[20];
         pi.scanf("%s",message);
         pc.printf("%s", message);
-        message[strlen(message)] = '\n';
-
         if (message[0] == '0') {
             intensity_select = 0;
         }
@@ -449,6 +446,7 @@
     new_patient.fall(&timer_calibration);                                   // Falling edge for calibration algorithm option.
     delay.reset();                                                          // Delaytimer reset en start.
     delay.start();
+    sample_cycle.attach_us(&read_adc, cycle_time);
 
     while (1) {
         wait_us(cycle_time+1); // wait indefinitely because the ticker restarts every 50 ms