|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
|||
|
|||
|
[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 |
|
#2
|
||||
|
||||
|
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. |
|
#3
|
|||
|
|||
|
Re: [FTC]: Programming
RobotC
|
|
#4
|
|||
|
|||
|
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. |
|
#5
|
||||
|
||||
|
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 |
|
#6
|
|||
|
|||
|
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 {}
|
|
#7
|
|||
|
|||
|
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.
|
|
#8
|
|||
|
|||
|
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.
|
|
#9
|
|||
|
|||
|
you start a timer and check if it has reached the target time but an encoder is bettor
|
|
#10
|
|||
|
|||
|
Re: [FTC]: Programming
great. we're going to try both.
thanks. |
|
#11
|
|||
|
|||
|
could you post a screen shot of the relevent code
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|