First Commit

Dependencies:   mbed Crypto_light mbed-rtos

Spin it 2 win it

Revision:
1:a530f6235850
Parent:
0:88c3d6c8a4eb
Child:
2:862ee3609eee
diff -r 88c3d6c8a4eb -r a530f6235850 main.cpp
--- a/main.cpp	Sun Mar 11 17:26:02 2018 +0000
+++ b/main.cpp	Sun Mar 11 17:31:26 2018 +0000
@@ -98,7 +98,7 @@
     int8_t orState = 0;    //Rotot offset at motor state 0
     int8_t intState = 0;
     int8_t intStateOld = 0;
-    float delay = 0.5;
+    float delay = 0.05;
     //Initialise the serial port
     Serial pc(SERIAL_TX, SERIAL_RX);
     pc.printf("Hello\n\r");
@@ -117,7 +117,7 @@
             motorOut(intState); //+6 to make sure the remainder is positive
         
         wait(delay);
-        delay = delay*0.98;
+        
     
         pc.printf("State: %x intState: %x Speed : %f \n\r", readRotorState(), intState, 1/(delay*6));
         //orState is subtracted from future rotor state inputs to align rotor and motor states