|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Talon not responding
I think we have everything set up for the Talons. Can someone confirm that the following is correct?
I have tested the motor as good. The Talon sits blinking orange, never confirming it is receiving signal from PWM. Code:
package edu.wpi.first.wpilibj.templates;
import edu.wpi.first.wpilibj.SimpleRobot;
import edu.wpi.first.wpilibj.Talon;
public class AwesomOSimple extends SimpleRobot {
Talon frisbeeIndexer;
public void robotInit() {
frisbeeIndexer = new Talon(9);
}
public void operatorControl() {
frisbeeIndexer.set(1.0);
}
}
I'm going to check that no one plugged something in backwards tonight, so that's still up in the air, I just wanted to cover the software. |
|
#2
|
||||
|
||||
|
Re: Talon not responding
operatorControl() is only called once. If you want to actually do something, you have to make a loop.
Code:
public void tele()
{
frisbeeIndexer.set(1.0);
}
//Don't modify the following method
public void operatorControl()
{
while (isOperatorControl())
{
tele();
Timer.delay(3/1000); //this prevents the cRIO from becoming overloaded, especially if tele() is empty
}
}
|
|
#3
|
|||
|
|||
|
Re: Talon not responding
Sigh.. Someone plugged in the Talon backwards. Lol. I had to restart the whole robot after the Talon was plugged in correctly to get it to respond happily. The minute I turned it around, it worked fine.
If you query my username, I think every question I have asked has been answered this way for the past 3 years.. Haha.. Thank you! |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|