Go to Post Look at the success of the Banebot's gearboxes this year. Cheap, light, small, and a lot of people are using them, even though their quality may be a bit questionable... Make a similar gearbox for a drivetrain (with a bit more robustness) and I think you've got a winner. - Ben Piecuch [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
 
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 02-06-2010, 11:40
Whelch Whelch is offline
Registered User
no team
 
Join Date: May 2010
Location: Minnesota
Posts: 3
Whelch is an unknown quantity at this point
GetRxInput vs GetOIDInput

I'm a very inexperienced programmer so if this question sounds dumb, i appologize in advanced. I'm doing a school poject with my robotics team and we're programming a very basic robot, but easier said than done when you don't know how to program in the first place.

We're using the MPlab environment, and i've got two questions to ask.

1) what is the difference between Get|OID - OIA - Rx|Input?

am i to understand OIA gives values between 0-255? and is reserved for ports 1-4?
and OID is 5/6 and either 1/0?
and Rx is whatever the port delivers?
well if this is the case, then how am i able to use (and the robot does what i want when i do) OID for ports 1-4 (but not 5-6) and Rx compiles and returns an error 'could not find definition of symbol 'GetRxInput''? (OIA for ports 1-2 work (and i havn't tested for 3-4 because i don't need them))

the second question i have is. . .

2) how can i get more than just 2 (or in my bizare case, 4) digital inputs from one controller?

also, we're using WPIlib - - i don't know if that's obvious or not but yeah . . .
  #2   Spotlight this post!  
Unread 03-06-2010, 15:44
Whelch Whelch is offline
Registered User
no team
 
Join Date: May 2010
Location: Minnesota
Posts: 3
Whelch is an unknown quantity at this point
Re: GetRxInput vs GetOIDInput

the IFI controller
  #3   Spotlight this post!  
Unread 03-06-2010, 15:51
Whelch Whelch is offline
Registered User
no team
 
Join Date: May 2010
Location: Minnesota
Posts: 3
Whelch is an unknown quantity at this point
Re: GetRxInput vs GetOIDInput

Also, completely seperate question, but how do you set a relay motor hooked up to a spike in reverse?

my current code (in c) is as follows

...

SetRelay(8,0,0) //neutral
if(GetOIDInput(2,3) == 1) //hold forward
{
SetRelay(8,0,1)
}
if(GetOIDInput(2,4) == 1)//hold reverse
{
SetRelay(8,1,0)
}

The forward motion works, and stopping it works if neither are held, but i can't get the motor to run backwards.
I've even tried switching the two SetRelay() calls for kicks and giggles, and unsuprisingly, the reverse still does not work and the forward does.

helps me plox!!
Closed Thread


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
Programming: MotorRcControl() vs GetRxInput()/SetServo() GlennGraham FIRST Tech Challenge 4 11-04-2006 07:08


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

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