|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
|||
|
|||
|
So this is our first year of using a second side car and its not working... here is the code:
Code:
vicShoulder(6,10);
and it still blinks orange any ideas????????? |
|
#2
|
|||
|
|||
|
Re: Victors not working please help
anyone?
|
|
#3
|
|||
|
|||
|
Re: Victors not working please help
Is it safe to assume that you declared vicShoulder as a Victor and not a Jaguar?
Can you get a Jaguar working on the second sidecar? |
|
#4
|
|||
|
|||
|
Re: Victors not working please help
Could you post a more thorough section of the code, rather than one line? It'd help us a lot more in figuring things out.
|
|
#5
|
|||
|
|||
|
Re: Victors not working please help
Make sure you are declaring the victor properly
Code:
Victor* vicShoulder; Where the PWM number is where you plug it into your digital sidecar Code:
vicShoulder = new Victor(PWMNUMBERHERE); Code:
vicShoulder->Set(float value of speed); Make the appropriate changes, and if still does not work put a multimeter on the proper pwm output channel to see if its a bad victor or not. |
|
#6
|
|||
|
|||
|
Re: Victors not working please help
Actually dboisvert, I suspect that tomy's writing his code based off the simple robot class, which doesn't use pointers, but creates objects directly. For that the syntax would be*:
Code:
Victor vicShoulder; Code:
RobotClassName():
vicShoulder(slotNum, portNum)
{
...
Code:
vicShoulder.Set(speed); I agree on your other points though. I don't know how many times I've forgotten to turn off a motor, or how many times I've poured through my code only to discover an electrical failure was the problem. Also agree with theprgramerdude, more code = more help. *This was from memory, so it might be off a little. Idea's the same though. |
|
#7
|
|||
|
|||
|
Re: Victors not working please help
I believe Code Monkey has it exactly correct. Also, be sure you're not wiring the PWM cable in backwards to the Victor, as there are no markings if I can remember right on the case. In addition, make sure you initialize it right, with the ClassConstructor():
blablaobject(stuff), morestuff(otherstuff), vicShoulder(6,10) <- These lines are where you should make sure to initialize the constructors, and they have to be in the order you specified them in the class template. { more stuff here... } |
|
#8
|
|||
|
|||
|
Re: Victors not working please help
this is parts of our code:
Code:
RobotClass;
Victor vicShoulder;
RobotVoid;
vicshoulder(6,1);
WhileinOperatorControl{
.....
if(armstick2.getY()){
vicShoulder.set(armstick2.getY);
}
could it be an older victor that we cant program anymore cause we got stuff from an older team and the victors look old but they turn on and the fan works its just that the light blinks orange |
|
#9
|
|||
|
|||
|
Re: Victors not working please help
Well, the first part looks funky and strange to me, as its still a bit out of scope (referring to, we need the code around the lines too), but what really caught my eye was the last few. Your "if" code makes no sense; what it's doing right now is getting the Y value off the joystick and checking whether its centered or not... that, and the Set command requires a capital S. Why not just remove the if statement altogether? It's useless.
All Victor 884's are the same; to my knowledge they haven't changed since they came out. At the top of your code you have vicshoulder(6,1); For one thing, the S isn't capitalized again, and.... you need to initialize the Victor object in the class initilization section above the braces. I'll put some of my similiar code here later. |
|
#10
|
||||
|
||||
|
Re: Victors not working please help
Check that the PWM cable is inserted fully into the Victor, and all the pins are lining up perfectly straight into the connector. Sounds simple, but is often incredibly hard to do. The easy way to check is to pull the PWM cable out of the Victor, and if any, or all of your pins aren't PERFECTLY STRAIGHT, then you likely inserted it wrong. Even the slightest bit of deflection means that you likely missed the connector inside the Victor.
Inserting your PWM cable into the Victor should take almost no downward force, if aligned perfectly. If you have to push a little too hard to get the connector in, you've plugged it in wrong. |
|
#11
|
|||
|
|||
|
Re: Victors not working please help
Lol that was the wrong if statement
We are using two sensors with our shoulder joint and I do not have the code with me at the moment |
|
#12
|
|||
|
|||
|
Re: Victors not working please help
anyone got advice?
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|