Go to Post I suggest that FIRST should include a "big red button" in the KOP next year to make everyone happy. :p - Jay H 237 [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 17-02-2006, 03:01
Calvin Calvin is offline
Registered User
no team
 
Join Date: Feb 2005
Location: Portland OR
Posts: 105
Calvin has a spectacular aura aboutCalvin has a spectacular aura about
Digital inputs in autonomous mode?

I've noticed that we have pwm and relay set to 127 and 0... but nothing set for digital, will digital inputs work during the autonomous?

I mean can I go ahead and say:

if(!rc_dig_in12)
{
DestoryPlanetEarth();
}

Also, one more question: I don't have a switch box built for the Competition port... yet... Is there a way I can enable the autonomous mode through a button on a joystick?

Thank you for your help in advance!
  #2   Spotlight this post!  
Unread 17-02-2006, 06:37
aaronm_k aaronm_k is offline
Registered User
no team
 
Join Date: Jan 2006
Rookie Year: 2006
Location:  
Posts: 10
aaronm_k is on a distinguished road
Re: Digital inputs in autonomous mode?

Quote:
Originally Posted by Calvin
I've noticed that we have pwm and relay set to 127 and 0... but nothing set for digital, will digital inputs work during the autonomous?

I mean can I go ahead and say:

if(!rc_dig_in12)
{
DestoryPlanetEarth();
}

Also, one more question: I don't have a switch box built for the Competition port... yet... Is there a way I can enable the autonomous mode through a button on a joystick?

Thank you for your help in advance!
Digital controller inputs (such as rc_dig_in12) will work in autonomous mode, as they are plugged directly into the RC. Digital OI inputs, on the other hand, will not work as the OI is disabled during autonomous mode.

If you want to simulate autonomous mode using a joystick button, open main.c and change line 52 to:
Code:
if (autonomous_mode || p2_sw_top)
and open user_routines_fast.c and change line 105 to:
Code:
while (autonomous_mode || p2_sw_top)
where p2_sw_top is the joystick button you want to use.
  #3   Spotlight this post!  
Unread 17-02-2006, 14:10
Matt Krass's Avatar
Matt Krass Matt Krass is offline
"Old" and Cranky. Get off my lawn!
AKA: Dark Ages
FRC #0263 (Sachem Aftershock)
Team Role: Mentor
 
Join Date: Oct 2002
Rookie Year: 2002
Location: Long Island, NY
Posts: 1,187
Matt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond repute
Send a message via AIM to Matt Krass
Re: Digital inputs in autonomous mode?

Make sure to remove that before competition, you don't need your drivers accidentally enabling autonomous
__________________
Matt Krass
If I suggest something to try and fix a problem, and you don't understand what I mean, please PM me!

I'm a FIRST relic of sorts, I remember when we used PBASIC and we got CH Flightsticks in the KoP. In my day we didn't have motorized carts, we pushed our robots uphill, both ways! (Houston 2003!)
  #4   Spotlight this post!  
Unread 17-02-2006, 14:40
CarpeDiem CarpeDiem is offline
Registered User
FRC #0135
 
Join Date: Dec 2005
Location: Indiana
Posts: 37
CarpeDiem is an unknown quantity at this point
Re: Digital inputs in autonomous mode?

If you dont have the box built for entering auto then you can just turn the theam number to 1 i think to enter auto mode.
  #5   Spotlight this post!  
Unread 17-02-2006, 21:50
Jake M Jake M is offline
void* Jake;
FRC #1178 (DURT)
Team Role: Programmer
 
Join Date: Jan 2006
Rookie Year: 2005
Location: Missouri
Posts: 118
Jake M has a spectacular aura aboutJake M has a spectacular aura about
Re: Digital inputs in autonomous mode?

You could just take a small piece of wire, strip the ends, and connect the auto and ground pins. I forget which is which, but it is in the manual
__________________
Code:
void function(void)
 {
  function();
 }
  #6   Spotlight this post!  
Unread 18-02-2006, 07:46
Ryan M. Ryan M. is offline
Programming User
FRC #1317 (Digital Fusion)
Team Role: Programmer
 
Join Date: Jan 2004
Rookie Year: 2004
Location: Ohio
Posts: 1,508
Ryan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud of
Re: Digital inputs in autonomous mode?

Quote:
Originally Posted by CarpeDiem
If you dont have the box built for entering auto then you can just turn the theam number to 1 i think to enter auto mode.
0, actually. But yeah, that'll work.
__________________

  #7   Spotlight this post!  
Unread 18-02-2006, 13:04
steven114 steven114 is offline
Programming Wizard and Team Captain
AKA: Steven Schlansker
FRC #0114 (Eaglestrike)
Team Role: Programmer
 
Join Date: Feb 2004
Location: Los Altos, CA
Posts: 335
steven114 is a jewel in the roughsteven114 is a jewel in the roughsteven114 is a jewel in the rough
Send a message via AIM to steven114
Re: Digital inputs in autonomous mode?

Because the competition port pins are hooked directly up to the PIC inside, IFI recommends (in one of their documents, forget which) that instead of hooking your wires directly to the port, you should insert a resistor on one leg. Sounds like good advice to me...
__________________
Shift to the left, shift to the right!
Pop up, push down, byte, byte, byte!
  #8   Spotlight this post!  
Unread 18-02-2006, 13:13
Windward's Avatar
Windward Windward is offline
Registered User
FRC #1452
Team Role: Programmer
 
Join Date: Nov 2005
Rookie Year: 2004
Location: So Cal
Posts: 88
Windward is an unknown quantity at this point
Re: Digital inputs in autonomous mode?

Quote:
Originally Posted by steven114
Because the competition port pins are hooked directly up to the PIC inside, IFI recommends (in one of their documents, forget which) that instead of hooking your wires directly to the port, you should insert a resistor on one leg. Sounds like good advice to me...

What would that do? We just have them connected.
__________________
  #9   Spotlight this post!  
Unread 18-02-2006, 13:16
steven114 steven114 is offline
Programming Wizard and Team Captain
AKA: Steven Schlansker
FRC #0114 (Eaglestrike)
Team Role: Programmer
 
Join Date: Feb 2004
Location: Los Altos, CA
Posts: 335
steven114 is a jewel in the roughsteven114 is a jewel in the roughsteven114 is a jewel in the rough
Send a message via AIM to steven114
Re: Digital inputs in autonomous mode?

If you accidentally touch the wrong pin, say a +5 to GND, it would prevent you from frying the chip. (for example)
__________________
Shift to the left, shift to the right!
Pop up, push down, byte, byte, byte!
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
a simple autonomous mode question chippermonky Programming 3 18-02-2005 01:54
Future of Autonomous Mode FadyS. Programming 41 24-05-2004 19:45
heres the code. y this not working omega Programming 16 31-03-2004 15:18
autonomous mode problem on field Chris_C Programming 17 26-03-2003 19:11


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

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