ORTP-L Version 0.1

Dependencies:   Motordriver RIT mbed

Fork of ORTP-L_V01 by Yoonseok Pyo

Files at this revision

API Documentation at this revision

Comitter:
passionvirus
Date:
Sat Mar 30 01:16:25 2013 +0000
Parent:
0:efc7a2c2f18e
Commit message:
Initial Release

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
diff -r efc7a2c2f18e -r 1fa7efbfc2d3 main.cpp
--- a/main.cpp	Fri Mar 29 09:19:21 2013 +0000
+++ b/main.cpp	Sat Mar 30 01:16:25 2013 +0000
@@ -44,7 +44,7 @@
     rithits++;
 }
 
-RIT rit(1); //10ms
+RIT rit(1); // 1ms
 
 int main() 
 {
@@ -55,9 +55,9 @@
 
     
     serial.baud(115200);
-    rit.setup_us(10);
+    rit.setup_us(10); // 10us
 
-    rit.append(RIT_IRQHandler);
+    rit.append(RIT_IRQHandler); // Append function isr to global interrupt handler. 
 
     rit_timing.start();
     rit.enable();
@@ -80,20 +80,21 @@
    
 
         if(sensor[0] == 1 || sensor[1] == 1 || sensor[2] == 1)
-        {   //Left
+        {   // Left
             L_Motor.speed(0.3);
             R_Motor.speed(0.7);
             LLED = 1; RLED = 0;   
         }
         else if(sensor[4] == 1 || sensor[5] == 1 || sensor[6] == 1)
         {
-            //Right
+            // Right
             L_Motor.speed(0.7);
             R_Motor.speed(0.3);
             LLED = 0; RLED = 1;
         }
         else
         {
+            // Forward
             L_Motor.speed(0.3);
             R_Motor.speed(0.3);
             LLED = 0; RLED = 0;