Go to Post YES... ITS VERY VERY VERY VERY VERY VERY VERY BAD for my health, cause I like it way too much that at times I will forget to sleep. I love FIRST. :] - Arefin Bari [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 21-01-2014, 18:37
AGPapa's Avatar
AGPapa AGPapa is offline
Registered User
AKA: Antonio Papa
FRC #5895
Team Role: Mentor
 
Join Date: Mar 2012
Rookie Year: 2011
Location: Robbinsville, NJ
Posts: 323
AGPapa has a reputation beyond reputeAGPapa has a reputation beyond reputeAGPapa has a reputation beyond reputeAGPapa has a reputation beyond reputeAGPapa has a reputation beyond reputeAGPapa has a reputation beyond reputeAGPapa has a reputation beyond reputeAGPapa has a reputation beyond reputeAGPapa has a reputation beyond reputeAGPapa has a reputation beyond reputeAGPapa has a reputation beyond repute
Re: We Need Serious Robot Help!

Quote:
Originally Posted by chris.boyle View Post
I suspect that since you opened two instances of the drive system, they were competing with each other.
This is almost certainly the problem.

You only need to have one drive system, the default arcade drive code works fine for your application and did not need to be changed.

I've attached a photo if you don't want to download Chris's code.
Attached Thumbnails
Click image for larger version

Name:	Chris.JPG
Views:	33
Size:	50.6 KB
ID:	15904  
__________________
Team 2590 Student [2011-2014]
Team 5684 Mentor [2015]
Team 5895 Mentor [2016-]
Reply With Quote
  #2   Spotlight this post!  
Unread 21-01-2014, 21:59
John's Avatar
John John is offline
Registered User
AKA: John Gillespie
FRC #1153 (Roborebels)
Team Role: Mechanical
 
Join Date: Sep 2011
Rookie Year: 2009
Location: Walpole MA
Posts: 71
John is just really niceJohn is just really niceJohn is just really niceJohn is just really niceJohn is just really nice
Re: We Need Serious Robot Help!

Quote:
Originally Posted by AGPapa View Post
This is almost certainly the problem.

You only need to have one drive system, the default arcade drive code works fine for your application and did not need to be changed.

I've attached a photo if you don't want to download Chris's code.
The code is the a problem. You are commanding the same motor to go forward and reverse at once, making it not move.

This is actually not a direct result of using two drive systems (they cannot fight each other, drive one only uses PWM 1 and drive two PWM 2). The problem is because you have configured the left and right motors on each drive to feed to the same PWM, and then inverted one of them.

So your code works like this (when you go forward).
-->Get joystick value (1)
-->Set leftmotor to inverted joystick value (-1)
-->Set rightmotor to noninverted joystick value (1)
-->Left motor is PWM 1, set PWM 1 to value of -1
-->Right motor is PWM 1, set PWM 1 to value of 1

Nothing ever happens because you make the motors go full forward and full backward as fast as the code can execute.

Use Chris's code, but modify it for 4 talons (or use y-cables)

Last edited by John : 21-01-2014 at 22:07. Reason: I should not have presumed that this is the only problem.
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 14:42.

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