Go to Post Desperation is the mother of accomplishment. - Koko Ed [more]
Home
Go Back   Chief Delphi > Other > FIRST Tech Challenge
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 23-02-2007, 15:09
emmell's Avatar
emmell emmell is offline
Murphy was an Optimist!
AKA: Mannie Lowe
no team (Radbotics, RoboKnights, CircuitRunners, Oscar, and more...)
Team Role: Coach
 
Join Date: Dec 2005
Rookie Year: 2005
Location: Marietta, GA
Posts: 178
emmell is just really niceemmell is just really niceemmell is just really niceemmell is just really niceemmell is just really nice
[FVC]: MPLab using two transmitters

Okay, I looked and looked and can't find example code to do the following: One transmitter drives the bot. The other transmitter handles the arm and servos. I see how to do it with EasyC, but how do you do it in MPLab. Do I have access to two RxData/TxData data structures. Where?
Quote:
/*
* Driver Control - Rx1 preferably
* pwm03 - left side drive
* pwm04 - right side drive (reverse it)
*
* Arm Control - Rx2 preferably
* pwm01 - Arm raise/lower
* pwm02 - Arm extend/retract
* pwm05 - Servo to lock arm
*
*/
Thank you!

Mannie Lowe
__________________
Mannie Lowe
FIRST Program Manager - Center for Mathematics and Science Education - University of Mississippi
Mississippi FIRST Tech Challenge Affiliate Partner


Reply With Quote
  #2   Spotlight this post!  
Unread 23-02-2007, 15:55
Mark McLeod's Avatar
Mark McLeod Mark McLeod is offline
Just Itinerant
AKA: Hey dad...Father...MARK
FRC #0358 (Robotic Eagles)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Hauppauge, Long Island, NY
Posts: 8,797
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
Re: [FVC]: MPLab using two transmitters

PWM_in1 through 6 are from the first Vex receiver port
PWM_in7 through 12 are from the second Vex receiver port.

So...
Code:
// Driver Control - Rx1 preferably
  pwm03 = PWM_in1;  // Depends on what mode you select on the transmitter
pwm04 = PWM_in2;

//Arm Control - Rx2 preferably
pwm01 = PWM_in7; //- Arm raise/lower (on CH 1 of 2nd transmitter)
pwm02 = PWM_in9; //- Arm extend/retract (on CH 3 of 2nd transmitter)
pwm05 = PWM_in11; //- Servo to lock arm (on CH 5 of 2nd transmitter)
In ifi_aliases.h you'll see them:
Code:
/*
 *-------------------------------------------------------------------------------
 *---------- Aliases for R/C PWM IN connectors -------------------------------
 *-------------------------------------------------------------------------------
 *  Below are aliases for the PWM inputs received from the radio-control receiver.
 */
#define PWM_in1         rxdata.oi_analog01
#define PWM_in2         rxdata.oi_analog02
#define PWM_in3         rxdata.oi_analog03
#define PWM_in4         rxdata.oi_analog04
#define PWM_in5         rxdata.oi_analog05
#define PWM_in6         rxdata.oi_analog06

#define PWM_in7         rxdata.oi_analog07
#define PWM_in8         rxdata.oi_analog08
#define PWM_in9         rxdata.oi_analog09
#define PWM_in10        rxdata.oi_analog10
#define PWM_in11        rxdata.oi_analog11
#define PWM_in12        rxdata.oi_analog12
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle

Last edited by Mark McLeod : 23-02-2007 at 16:05.
Reply With Quote
  #3   Spotlight this post!  
Unread 24-02-2007, 00:33
emmell's Avatar
emmell emmell is offline
Murphy was an Optimist!
AKA: Mannie Lowe
no team (Radbotics, RoboKnights, CircuitRunners, Oscar, and more...)
Team Role: Coach
 
Join Date: Dec 2005
Rookie Year: 2005
Location: Marietta, GA
Posts: 178
emmell is just really niceemmell is just really niceemmell is just really niceemmell is just really niceemmell is just really nice
Re: [FVC]: MPLab using two transmitters

Mark:

Thank you. Thank you. I knew that. I just had a brain freeze these past three days trying to get ready for the tournament that I'm running on 2/24 (Georgia FVC) and mentoring my team at the same time.

I coded it right after I got your reply and it worked like a charm. Chimera #832 thanks you very much.

Mannie
__________________
Mannie Lowe
FIRST Program Manager - Center for Mathematics and Science Education - University of Mississippi
Mississippi FIRST Tech Challenge Affiliate Partner


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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Using MPLAB SIM koenig3456 Programming 5 11-02-2008 14:39
Teams using MPLAB Ctrl Alt Delete FIRST Tech Challenge 4 22-09-2006 22:37
Problem using two transmitters jamesgecko FIRST Tech Challenge 9 12-05-2005 09:30
using the MPLAB IDE MPLAB SIM simulator WizardOfAz Programming 1 03-11-2003 01:24
Using two Large PAPST Fans? SuperDave Electrical 9 17-02-2003 15:11


All times are GMT -5. The time now is 17:44.

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