Society of Robots - Robot Forum
Software => Software => Topic started by: ratcateme on June 20, 2008, 01:51:51 AM
-
I have bought the AtMega168 instead of the AtMega8 because i can compile then run the same C source files on it. but will the hex file in the servo tutorial still work?
if it wont work how do i code a new file to do the same thing? i am using a Fuatba s3003 servo if that makes any difference.
Scott.
-
I don't think so. I suppose you'll have to make your own .hex as the fuse for m168 are different than those of the m8.
I'm working at it this morning, if I manage to get it work i'll post here.
-
Have your 168 run this code below. Before modifying your servo, run the code and modify '30' until the servo centers. Then modify the servo and turn the pot until the servo doesn't rotate.
while(1)
{
wheel_left(30);
delay_ms(20);
}
(hoping that made sense)
-
cool thanks admin i just have to finish my circuit tonight.
-
Should the servo be silent as well as still? Or can it make a slight noise and small, I mean less than half a degree if that, movement? And does it matter in the end?
-
Servos sometimes make noise and twitch if your signal is between two different angles. I have a digital servo that gets really noisy sometimes . . .
Unfortunately that twitching will waste battery power and potentially warm/heat up the servo.
But for a HS-311, probably not a big deal at all.
-
I know this is an old post, but I have the same question as the OP. Admin, you say "Have your 168 run this code below. Before modifying your servo, run the code and modify '30' until the servo centers. Then modify the servo and turn the pot until the servo doesn't rotate."
Maybe I don't understand how the servo functions because I haven't built the circuit and powered it up yet. So I run the code and adjust the value until the servo centers, but is something still moving at this point? Because then you say modify the servo and turn the pot until it doesn't rotate. Is it still moving after it centers? Any clarification would be appreciated.
-
So all the little gears inside are removed and you have access to the pot. Turn the pot until nothing moves (the motor in the servo should not spin).
-
I opened a new thread, the link is
http://www.societyofrobots.com/robotforum/index.php?topic=7565.0 (http://www.societyofrobots.com/robotforum/index.php?topic=7565.0)
-
Also, I tried turning the LED on using LED_on() and that also did not work...
-
Also, I tried turning the LED on using LED_on() and that also did not work...
Make sure that in the header file under simplified functions that 'LED_on()' is set up so the port is 'low'.