Initial Commit

Files at this revision

API Documentation at this revision

Comitter:
Throwbot
Date:
Tue Oct 21 21:29:54 2014 +0000
Parent:
4:0eeea5f05e28
Commit message:
Initial (Test) Commit

Changed in this revision

robot.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/robot.cpp	Tue Oct 14 17:54:20 2014 +0000
+++ b/robot.cpp	Tue Oct 21 21:29:54 2014 +0000
@@ -12,8 +12,8 @@
 //*********************************CONSTRUCTOR*********************************//
 HC05 bt(tx_bt,rx_bt,EN_BT);
 //QEI wheel (PTA16, PTA17, NC, 24);
-QEI right (PTA16, PTA17, NC, 150, QEI::X4_ENCODING);
-QEI left (PTA14, PTA13, NC, 150, QEI::X4_ENCODING);
+QEI right (PTA16, PTA17, NC, 300, QEI::X4_ENCODING);
+QEI left (PTA14, PTA13, NC, 300, QEI::X4_ENCODING);
 //Serial bt(rx_bt,tx_bt);
 //MPU6050 mpu(PTE0, PTE1);
 DigitalOut myled(myledd);
@@ -235,8 +235,8 @@
 void encoder_thread(void const *args)
 {
     while(true) {
-        left_current_reading=left.getPulses()*(-1)/5;
-        right_current_reading= right.getPulses()/5;
+        left_current_reading=left.getPulses()*(-1)/9.85;
+        right_current_reading= right.getPulses()/10;
         left_change  = left_current_reading- left_prev_read;
         right_change =right_current_reading- right_prev_read;
         left_prev_read=left_current_reading;