Exchanging encoders
authorJordi <jordiguerrero@gmail.com>
Fri, 12 Feb 2016 14:35:42 +0000 (14:35 +0000)
committerJordi <jordiguerrero@gmail.com>
Fri, 12 Feb 2016 14:35:42 +0000 (14:35 +0000)
Fresonbot.py
Fresonbot.pyc
PID_test.py
pinout.pyc
test_IR.py

index 8a87946..e4e9fad 100644 (file)
@@ -65,7 +65,7 @@ class Fresonbot(object):
         global TicksLeft
         global TicksRight
 
-        fTicksLeft = "/sys/devices/ocp.3/48302000.epwmss/48304280.eqep/position"
+        fTicksLeft = "/sys/devices/ocp.3/48302000.epwmss/48302180.eqep/position"
         fTicksRight = "/sys/devices/ocp.3/48304000.epwmss/48304180.eqep/position"
         foTicksLeft = open(fTicksLeft, "r")
         foTicksRight = open(fTicksRight, "r")
index a8b089c..233825e 100644 (file)
Binary files a/Fresonbot.pyc and b/Fresonbot.pyc differ
index bbe9614..6e99cf0 100644 (file)
@@ -216,7 +216,7 @@ measureDistance();
 
 #it = iter([400,0,400,400,0,400,200,200,0,0,400,0,400,400,0,400,200,200,0,0])
 #it = iter([200,0,200,200,0,200,0,0])
-it = iter([200,0])
+it = iter([200,50])
 for xT, yT in zip(it, it):
     xTarget = xT
     yTarget = yT
index 50329eb..54b2942 100644 (file)
Binary files a/pinout.pyc and b/pinout.pyc differ
index 6f19270..0bcb3f1 100644 (file)
@@ -5,10 +5,11 @@ import time
 ADC.setup()
 
 while 1:
-#    voltage1 = ADC.read("AIN1")
-    voltage4 = ADC.read_raw("AIN1")
-#    voltage4 = ADC.read_raw("AIN3")
-#    print("AIN1" ,voltage1)
-    print("AIN4", voltage4)
-    time.sleep(0.05)
+    voltage0 = ADC.read_raw("AIN0")
+    voltage1 = ADC.read_raw("AIN1")
+    voltage2 = ADC.read_raw("AIN2")
+    voltage3 = ADC.read_raw("AIN3")
+    voltage4 = ADC.read_raw("AIN4")
+    print("0-1-2-3-4" , voltage0, voltage1, voltage2, voltage3, voltage4)
+    time.sleep(0.1)