![]() |
Initializing and Using Buttons to Control Victor Motor Controllers
Hello everyone, I have made a thing to use buttons 4 & 5 to control the servo motor to our Axis camera. The servos are connected to the PWM channels and we just need to program the motor. Would the following code work to accomplish our task?
Code:
#include "WPILib.h" |
Re: Initializing and Using Buttons to Control Victor Motor Controllers
You titled your note with "Victor Motor Controllers", but you asked about "the servo motor". I don't see any servos in your code. What are you really trying to control?
Why do you have parentheses around the names of your Victor objects when you declare them? You declared "victorc" and "victord", but you're trying to set "Intakevictorc" and "Intakevictord". If you fix the names to match, your code will run motor C on PWM 3 forward when you press button 4, and motor D on PWM 4 backward when you press button 5. It never runs those motors in the other direction. |
Re: Initializing and Using Buttons to Control Victor Motor Controllers
Sorry, I meant to ask about the servo motors not the victor motors. If one were trying to initialize and use the servo motors would it be initialized like this (initializing two servos):
Code:
class RobotDemo : public SimpleRobotCode:
//Example code |
| All times are GMT -5. The time now is 12:49. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi