ADC logging with demo drive board for calibration

Dependencies:   mbed MODSERIAL FastPWM ADS8568_ADC

Revision:
27:5dcd526d7598
Parent:
26:dd4f3ef421d1
Child:
28:f2585571ce25
Child:
29:ef9e567bed5b
--- a/main.cpp	Thu Oct 10 16:57:02 2019 +0000
+++ b/main.cpp	Fri Oct 11 14:06:30 2019 +0000
@@ -104,14 +104,17 @@
     wait_ms(START_DELAY);
     timer.start();
 
-
+    // indicate start
+    led_0 = 0;
+    led_1 = 1;
+    
     for (int iStep=0; iStep<N_STEPS; iStep++) {
 
         eTime = timer.read_ms();
     
         for (int iHeater=0; iHeater <2; iHeater++) {
             // measure heater
-            if (iHeater==0)
+            if (iHeater==0) 
                 drive_1.pulsewidth_ticks(1000);
             else
                 drive_2.pulsewidth_ticks(1000);
@@ -130,6 +133,7 @@
                 drive_1.pulsewidth_ticks(0);
             else
                 drive_2.pulsewidth_ticks(0);
+                
             wait_us(MEAS_DELAY);
         
             //Get ADC values
@@ -150,5 +154,9 @@
         pc.printf("%5d, %10d, %10d, %10d, %10.6f, %10.6f, %10d, %10d, %10.6f, %10.6f \n", iStep, eTime, curr[0], v[0], r_adc[0], r_ohm[0], curr[1], v[1], r_adc[1], r_ohm[1]);
         
     }
+    
+    // indicate stop
+    led_0 = 1;
+    led_1 = 0;
 
  }