View Single Post
  #1   Spotlight this post!  
Unread 25-01-2015, 20:47
roialex's Avatar
roialex roialex is offline
Registered User
FRC #5444 (Vobotik)
Team Role: Mentor
 
Join Date: Dec 2014
Rookie Year: 2015
Location: Trois-Rivières
Posts: 4
roialex is an unknown quantity at this point
Encoder+PID = How make robot going straight

Hi,

My team and I tried to make robot going straight by using pid en the rate of our encoder on our motor (1 each side). Unfortunately it finish by not working at all. Here is our code that we tried but the robot was just spinning without any control you just needed to make the robot enable and it was spinning alone. We took the rate of our encoder divide it by 3700 wich is a theoretical value that represent the maximum rate that our motor were able to go. This should now gave us a value between 0 and 1. We took this value and make it the process variable in our PID. We too also the variable fromm our joystick wich range between -1 and 1 and make it our setpoint in the PID. We took the output of the pid and set it to the motor. Brief it doesn't works maybe we are not doing it right. Our goal is just to make our robot going straight how to do it ? Do you have any advice on how make you robot going straght with encoder or how improve our code ?

Thanks in advance,

Alex Rousseau
Student programmer
VObotik team 5444
Attached Thumbnails
Click image for larger version

Name:	1a0a4be504c975a14d1584b19b7904f4.png
Views:	104
Size:	60.3 KB
ID:	17988  
Reply With Quote