View unanswered posts | View active topics It is currently Fri Oct 24, 2014 5:25 pm






Reply to topic  [ 8 posts ] 
Servo problem 
Author Message
Rookie

Joined: Mon Jan 26, 2009 6:41 pm
Posts: 5
Post Servo problem
Hi,
I was finishing up my program for my school's robot when a big problem occurred.
Up until now I've used something like...
Code:
servo[servo1] = joystick.joy2_y2 + 127;


To control my servos but all the sudden there is a problem.
It says that it can't convert it to a const number and won't compile.
I can use...

Code:
servoTarget[servo1] = joystick.joy2_y2 +127;


and it will compile but the servos won't respond at all.
Could someone please help me?


Mon Jan 26, 2009 6:54 pm
Profile
Rookie

Joined: Thu Jan 08, 2009 7:51 pm
Posts: 25
Post Re: Servo problem
What is the exact message the compiler gives you?

_________________
It must be user error.


Mon Jan 26, 2009 7:04 pm
Profile WWW
Rookie

Joined: Mon Jan 26, 2009 6:41 pm
Posts: 5
Post Re: Servo problem
Code:
**Severe*:Can't assign to read only 'const' variable


That's the error message I keep getting.


Tue Jan 27, 2009 3:50 pm
Profile
Rookie

Joined: Mon Jan 26, 2009 6:41 pm
Posts: 5
Post Re: Servo problem
:Update

Ok I solved my previous problem and now have a new one...
I go to debug and test the program and in the servo debug window it says that the servos are moving but in
reality they aren't. I've even tried setting them to stuff like 50, 100, 255, and 0 and it says that the position is what I told it
to be but on the robot it doesn't even twitch.

I've checked the wiring over and over and it is hooked up correctly the program reads that they are connected but nothing I do effects the servos. Even when the position is changed manually it doesn't register the change. It's like the servos in the program and debugger are in their on little world oblivious to what is really happening.

Please someone tell me what could I be doing wrong if I am doing anything wrong.


Tue Jan 27, 2009 6:54 pm
Profile
Rookie

Joined: Thu Jan 08, 2009 7:51 pm
Posts: 25
Post Re: Servo problem
Is your servo actually named servo1? Because if it is, try changing it to something else and see if that works.

_________________
It must be user error.


Tue Jan 27, 2009 7:05 pm
Profile WWW
Rookie

Joined: Mon Jan 26, 2009 6:41 pm
Posts: 5
Post Re: Servo problem
I've tried renaming them by position and it did pretty much the same thing.
It says their moving in the debug window but in reality they aren't.


Tue Jan 27, 2009 7:40 pm
Profile
Rookie

Joined: Wed Jan 21, 2009 4:08 pm
Posts: 10
Post Re: Servo problem
You may have a stripped gear inside the servo. Try taking the cover of the servo off and examining the gears to see if all the teeth are intact.


Tue Jan 27, 2009 11:13 pm
Profile
Rookie

Joined: Mon Jan 26, 2009 6:41 pm
Posts: 5
Post Re: Servo problem
:Update

I found the problem...
It wasn't a programming problem at all it was just
a hardware problem with the servo controller.


Wed Jan 28, 2009 12:03 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 8 posts ] 

Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  



Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.