first publish

Dependencies:   MPU9150_DMP MotorControl QuaternionMath SimpleIOMacros mbed

Fork of cool_step_new by Cool-step

Files at this revision

API Documentation at this revision

Comitter:
heuristics
Date:
Sat May 16 11:50:27 2015 +0000
Parent:
18:9f249b8a59ae
Child:
20:c0d085d64905
Commit message:
Motor1+2 calisiyor, encoderlar da canavar, zaa

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/main.cpp	Sat May 16 11:12:40 2015 +0000
+++ b/main.cpp	Sat May 16 11:50:27 2015 +0000
@@ -130,6 +130,44 @@
 
 
 
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
 void TIMER2_IRQHandler(void)
 {
     int bitB = (LPC_GPIO0->FIOPIN>>5) & 0x1;
@@ -151,7 +189,7 @@
         pulsesMotor1--;
     }
 
-    LPC_TIM2->IR |= 0x10;
+    LPC_TIM0->IR |= 0x10;
 }
 
 void initCaptures(void)
@@ -168,7 +206,7 @@
     LPC_TIM2->TCR = (1 << 0);          // start Timer2
     NVIC_EnableIRQ(TIMER2_IRQn);
         
-    LPC_PINCON->PINSEL3  |= 0x00030000; // set P1.26 to CAP0.0
+    LPC_PINCON->PINSEL3  |= 0x00300000; // set P1.26 to CAP0.0
     LPC_SC->PCONP |= (1 << 1);         // Timer0 power on
     // init Timer 2 (cap0.0)
     LPC_TIM0->IR = 0x10;          // clear interrupt register