Julius Bernth / Mbed OS Cuvette_Centrifuge_Test_v1-2_ParallelMode

Dependencies:   QEI LIS3DH_spi

Revision:
8:41cd1fc8cbbe
Parent:
7:e36f61608c10
Child:
9:b1f53e4eb453
--- a/main.cpp	Tue Aug 10 11:00:13 2021 +0000
+++ b/main.cpp	Tue Aug 10 15:52:39 2021 +0000
@@ -51,7 +51,10 @@
 Serial pc(USBTX,USBRX);
 
 DigitalOut      pinStatusLED    (D13);
-DigitalIn       pinButton       (PC_13);
+
+DigitalIn       pinButton       (PC_8);
+DigitalOut      pinLedWhite     (PC_6);
+DigitalOut      pinLedRed       (PC_5);
 
 /* Still to allocate
 
@@ -255,6 +258,7 @@
                 tickerPrint.detach();
                 
                 printf("state = %d\r\n",state);
+                pinLedRed = 0;
                 TestCompleteNotification();//send notification
                 //deactivate motor
                 //PrintThread.terminate();//terminate print thread
@@ -274,7 +278,7 @@
         testTimer.start();//start timer
         
         char spinState;
-        
+        pinLedRed = 1;
         //set up ticker to allow motor control thread to run periodically
         
         encoder.reset();//reset encoder
@@ -303,7 +307,7 @@
         semButton.wait();
         int count = 0;
             
-        while(!pinButton.read())
+        while(pinButton.read())
         {
             count++;
             if (count ==1){
@@ -370,6 +374,10 @@
     pinButton.rise(ISR_Button_Rise);
     pinButton.fall(ISR_Button_Fall);
 */
+    pinButton.mode(PullDown);
+    pinLedWhite = 1;
+
+
     
     state = STATE_READY;//set state to READY
     //start all threads