Go to Post The answer the last 3 years would be any regional that 1114 attends. - Cory [more]
Home
Go Back   Chief Delphi > FIRST > General Forum
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 02-02-2017, 15:58
EliStevens12 EliStevens12 is offline
Registered User
FRC #4925
 
Join Date: Feb 2014
Location: Wolfeboro
Posts: 35
EliStevens12 has a spectacular aura aboutEliStevens12 has a spectacular aura about
Code works well, but robot will not drive

Our lead programmer left last year so we are back to square 1. After hours of youtube videos, we made a new program. It is just a simple tank drive program with nothing else. We uploaded it to the robot and it gave us no errors, but the robot would not drive. We tried our program from last year and it worked. It may be an output problem for the motor id (port number) or something like that.

General programming help is also wanted. (we are currently using robot builder too)
We can also use raw code if anyone can help us with that.

Last edited by EliStevens12 : 02-02-2017 at 16:02.
Reply With Quote
  #2   Spotlight this post!  
Unread 02-02-2017, 16:18
dvanvoorst dvanvoorst is offline
Registered User
FRC #2771 (Code Red)
Team Role: Mentor
 
Join Date: Jan 2012
Rookie Year: 2012
Location: Grand Rapids, MI
Posts: 73
dvanvoorst is an unknown quantity at this point
Re: Code works well, but robot will not drive

Which language are you using?
If you post your code, we can be of more help.

In the future, posting to a forum specific to your language would increase responses too.
__________________

Reply With Quote
  #3   Spotlight this post!  
Unread 02-02-2017, 16:27
GreyingJay GreyingJay is offline
Robonut
AKA: Mr. Lam
FRC #2706 (Merge Robotics)
Team Role: Mentor
 
Join Date: Mar 2015
Rookie Year: 2015
Location: Ottawa, Canada
Posts: 786
GreyingJay has a reputation beyond reputeGreyingJay has a reputation beyond reputeGreyingJay has a reputation beyond reputeGreyingJay has a reputation beyond reputeGreyingJay has a reputation beyond reputeGreyingJay has a reputation beyond reputeGreyingJay has a reputation beyond reputeGreyingJay has a reputation beyond reputeGreyingJay has a reputation beyond reputeGreyingJay has a reputation beyond reputeGreyingJay has a reputation beyond repute
Re: Code works well, but robot will not drive

If you're using C++ or Java, the wpilib plugins in Eclipse are really great for learning how to use the code. You can create a simple example program to do, say, tank drive, or play with pneumatics, etc. by just going to "File", "New", and selecting WPILib Example Project. There's a whole list of samples you can play with.

In the case of a basic tank drive program, if your robot isn't moving, the first step is to go to the hardware and determine where exactly the drive motors are wired.

If they're connected to the RoboRio via PWM connections, note which ports.

If they're Talon SRX's connected over CAN, note what their CAN ID's are. If you're not sure, or if you haven't given them each unique CAN ID's, then that's your next step.

I'm assuming you've also done basic checks on the hardware like making sure the motors themselves are wired correctly, that the motor controllers are powered on, there's a breaker in the PDP, etc.

Once you know what the PWM ports or CAN ID's are, then double check that your code is setting the correct values when you create the instance of the motor controller(s).

Good luck!
__________________
"If I'm going to mentor someone, I'm going to be involved in their life as a positive force." -Mechvet
Reply With Quote
  #4   Spotlight this post!  
Unread 03-02-2017, 12:16
Harshal Harshal is offline
Registered User
FRC #4678
Team Role: Mentor
 
Join Date: Feb 2017
Rookie Year: 2013
Location: Canada
Posts: 3
Harshal is an unknown quantity at this point
Re: Code works well, but robot will not drive

Make sure you have your SpeedController object created and initialized for the right port, if its a Can device, you can get the can ID from the WebView (Plugin or Wirelessly Connect and then go to http://172.22.11.2/). If the speed controller is plugged into the PWM, then initialize the object with the port labelled. First try setting the motor values independent of drive to make sure they are connected and working. I can provide more specific information if you provide your coding language, speed controllers, and port mapping.
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 19:36.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi