Go to Post The Indiana Mafia? We are very insulted. Another comment like that and you could wind up having a couple of broken legs. But thanks for the good words - Bill Beatty [more]
Home
Go Back   Chief Delphi > Technical > Programming > Java
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 17-02-2013, 16:04
Tsarlowland Tsarlowland is offline
Registered User
AKA: Altan
FRC #4566 (TERAdactlys)
Team Role: Programmer
 
Join Date: Feb 2013
Rookie Year: 2013
Location: Georgia
Posts: 5
Tsarlowland is an unknown quantity at this point
Examples for running motors/victors outside of a RobotDrive object?

Hello all!

I was wondering if any of you could show some examples of multiple motors running.

An example of what I am looking for could be that there are 4 motors -- left, right, launcher, and loader.

When initializing the RobotDrive object that controls the drive base, I understand that would be done like:
drive = new RobotDrive(left, right);

How would you control the launcher and loader speed controllers? My experience with victorName.set(double speed) is that it doesn't work.

I think that seeing even a basic example would give me the clarification I need to be able to complete my teams bot, so any help is appreciated.

Thanks again for your help!
~Altan
Reply With Quote
  #2   Spotlight this post!  
Unread 18-02-2013, 09:55
ProgrammerMatt ProgrammerMatt is offline
Programmer-Electrical-Mechanical
FRC #0228 (Gus)
Team Role: Mentor
 
Join Date: Jan 2011
Rookie Year: 2010
Location: Southington
Posts: 138
ProgrammerMatt is just really niceProgrammerMatt is just really niceProgrammerMatt is just really niceProgrammerMatt is just really nice
Re: Examples for running motors/victors outside of a RobotDrive object?

under your public class you should have,
Code:
Victor motor1, motor2, motor3; #and so on
In your robot init you should have,
Code:
motor1 = new Victor(1); #1 is PWM Channel
motor2 = new Victor(2);
motor3 = new Victor(3);
In your teleop code
Code:
motor1.set(double);
motor2.set(double);
motor3.set(double);
__________________
2015-2016 CSA
Software Engineering Student @ Johnson & Wales University
Team 228, Gus Robotics Inc.
Facebook
FLL Mentor for 1107, Edison Eagles!
2015- CT State Champions
2012- WPI Finalist(Thanks 1884 and 549), Spirt, Best Website
2011- WPI Chairman's award winners!
2010- WPI Champions! (thanks 230 & 20), WPI Engineering Inspiration, CT Best Website, CT VEX Champions (VRC228, VRC228b) (21-1-0)
2009- QCC VEX Champions (VRC228) (11-0-0), Innovate Award (VRC228)
Reply With Quote
  #3   Spotlight this post!  
Unread 18-02-2013, 19:38
Tsarlowland Tsarlowland is offline
Registered User
AKA: Altan
FRC #4566 (TERAdactlys)
Team Role: Programmer
 
Join Date: Feb 2013
Rookie Year: 2013
Location: Georgia
Posts: 5
Tsarlowland is an unknown quantity at this point
Re: Examples for running motors/victors outside of a RobotDrive object?

It ended up being a problem on the digital sidecar caused by metal shavings inside. We cleared up the problem.

Thanks for the help, though.
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 22:15.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi