Log in

View Full Version : [FTC]: Programming


ethan_orion
23-01-2013, 11:43
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
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
RobotC

ethan_orion
23-01-2013, 12:03
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
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
you need to do something like this (my robotc is a little rusty)


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
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
great. we're going to try both.
thanks.

OctagonMaster
21-02-2013, 14:07
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
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