View unanswered posts | View active topics It is currently Fri Jun 23, 2017 6:33 am

 Page 1 of 1 [ 3 posts ]
 Print view Previous topic | Next topic
Servo Rotation Programming
Author Message
Rookie

Joined: Tue Oct 12, 2010 11:40 am
Posts: 2
Servo Rotation Programming
Hi my name is Evan Rogers, I am apart of the Marble Falls BEST Robotic Team. I have a question concerning the rotation of the Servo. So far the Servo goes at a rotation of about 120, but we want the Servo to rotate a full 180. How do we do that or what is the Programming that we need in order to make the Servo Rotate a full 180?

Fri Oct 22, 2010 11:12 am
Moderator

Joined: Tue Sep 14, 2010 9:19 pm
Posts: 496
Re: Servo Rotation Programming
The servo can go 120 in either direction. It's natural position is 0, which is exactly in the center. so when you give your servo a power of 50, it will go 50 to the right and stay there. When you give it -50, it will go 50 to the left and stay there. You have to start off at -60 and then turn to +120 if you want a 180 degree turn angle.

_________________
sudo rm -rf /

Sat Oct 23, 2010 6:34 am
Guru

Joined: Sun Nov 15, 2009 5:46 am
Posts: 1523
Re: Servo Rotation Programming
I am new to programming servo in RobotC too, but I read the RobotC function library help and it said the servo array takes a value between 0 and 255. So I tried it out. I coded the following:
 Code:while (true){    servo[servoArm] = 0;    wait1Msec(2000);    servo[servoArm] = 128    wait1Msec(2000);    servo[servoArm] = 255;    wait1Msec(2000);}

This code basically set the servo to 0-degree, 90-degree and then 180-degree and paused 2 seconds in between. It worked as expected.

Mon Nov 01, 2010 3:32 am
Display posts from previous:  Sort by
 Page 1 of 1 [ 3 posts ]

#### Who is online

Users browsing this forum: No registered users and 2 guests

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

Search for:
 Jump to:  Select a forum ------------------ ROBOTC Applications    ROBOTC for LEGO MINDSTORMS       Third-party sensors    ROBOTC for CORTEX & PIC    ROBOTC for VEX IQ    ROBOTC for Arduino    Robot Virtual Worlds    Multi-Robot Communications    Issues and Bugs Competitions & Partners    Mini Urban Challenge    CS2N Robot Virtual Worlds Competitions       VEX Skyrise Competition 2014-2015       VEX Toss Up 2013-2014       FTC Block Party! 2013-2014    Competitions using VEX - BEST, TSA, VEX, and RoboFest!    FTC Programming    RoboCup Junior and Other ROBOT Competitions Virtual Brick Robotics Discussions    General Discussions    Project Discussions Off-Topic ROBOTC Forum & ROBOTC.net Suggestions/Feedback    ROBOTC Forums Suggestions/Comments    ROBOTC.net Suggestions/Comments       NXT Programming: Tips for Beginning with ROBOTC       VEX Programming: Tips for Beginning with ROBOTC    2013 Robotics Summer Of Learning       VEX Toss Up Programming Challenge       FTC Ring It Up! Programming Challenge    International Forums       Spanish Forums          ROBOTC for MINDSTORMS          ROBOTC for VEX       French Forums          ROBOTC pour Mindstorms          ROBOTC pour IFI VEX       Japanese Forums （日本語のフォーラム）       German Forums    2015 Spring Carnival Event    PLTW (Project Lead The Way)    Robotics Merit Badge    2014 Robotics Academy Summer of Learning