Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   FIRST Tech Challenge (http://www.chiefdelphi.com/forums/forumdisplay.php?f=146)
-   -   [FTC]: Programming (http://www.chiefdelphi.com/forums/showthread.php?t=111862)

ethan_orion 23-01-2013 11:43

[FTC]: Programming
 
Dear FTC Teams,

We like to run a subroutine which runs a DC motor and a servo motor.
Basically resetting the position of our arm and hand back to a position for grabbing rings. We'd like to do this while driving back to the ring stand.

Do we need encoders to make sure this happens?
We'd like to do this from only one controller.

Any snags we have to watch out for when trying to code this?

Thanks!
FTC 71

Mr. 1033 23-01-2013 12:01

Re: [FTC]: Programming
 
What programming language is your team using?

If it's LabView my team FTC 1033 can help.

If it's Robot C I have a guy on my FRC Team that programs his robot in Robot C.

ethan_orion 23-01-2013 12:02

Re: [FTC]: Programming
 
RobotC

ethan_orion 23-01-2013 12:03

Re: [FTC]: Programming
 
We currently have a button we push that resets our arm.
we'd like to incorporate that into our drive routine such that we can push the button and then continue driving around.

Mr. 1033 23-01-2013 12:08

Re: [FTC]: Programming
 
Shoot me an email and I'll have him respond to you at 3pm when he gets into our lab.

paulelathrop@gmail.com

ferret_guy 23-01-2013 14:14

Re: [FTC]: Programming
 
you need to do something like this (my robotc is a little rusty)

Code:

var button-pressed

if button1 = 1
    { button-pressed = 1}
      ELSE {}
if button-pressed = 1
    { if arm > goal
          {armdown}
        ELSE
          {armstop
            button-pressed = 0}
    }
    ELSE {}


ethan_orion 25-01-2013 15:46

Re: [FTC]: Programming
 
That part we have. The difficult part is that the DC motor runs with a time interval and so we are in a time dependent while loop so we can't access our button. we'd like to run a time dependent loop while at the same accessing the signals of the controller.

ferret_guy 25-01-2013 15:48

you start a timer and check if it has reached the target time but an encoder is bettor

ethan_orion 25-01-2013 16:09

Re: [FTC]: Programming
 
great. we're going to try both.
thanks.

OctagonMaster 21-02-2013 14:07

Re: [FTC]: Programming
 
Hey we are having the worst time making our robot move forward after locking on to the ir beacon, when it does move forward the arm continues to extend (almost breaking) can anyone help. We are using labview.

ferret_guy 21-02-2013 15:05

Quote:

Originally Posted by OctagonMaster (Post 1237915)
Hey we are having the worst time making our robot move forward after locking on to the ir beacon, when it does move forward the arm continues to extend (almost breaking) can anyone help. We are using labview.

could you post a screen shot of the relevent code


All times are GMT -5. The time now is 18:15.

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