Go to Post Try to remember, FIRST is like life, it is about the journey not the destination. - rees2001 [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 31-01-2008, 21:23
ShotgunNinja's Avatar
ShotgunNinja ShotgunNinja is offline
Programming Mentor, FRC 4247
AKA: Nicholas Iannone
FRC #4247 (CougarBOTS)
Team Role: Mentor
 
Join Date: Jan 2008
Rookie Year: 2006
Location: Milwaukee, WI
Posts: 160
ShotgunNinja is a jewel in the roughShotgunNinja is a jewel in the roughShotgunNinja is a jewel in the roughShotgunNinja is a jewel in the rough
Hybrid Mode Help

Hello. I am my team's website guy and, new to this year, programmer. I have ROBOTC 1.14 installed on the team comp, and I (somewhat) grasp the coding language, but I am having problems with the hybrid mode. Here are some of my questions:

- How would I interface with the hybrid mode controls? (We are using a standard TV remote)
- Can I still utilize the Code Template that came along with the ROBOTC program? (void main(), task Autonomous(), task Human_Control())
- Does the ROBOTC language allow typedef structs like ANSI C does?
- Why does the compiler hate me so much?
__________________
Team #2970 Alum
Team #1652 Alum
2006: School Mascot for Team 1652
2007-2008: Programmer for Team 1652 (Robot Mafia)
2009: Programmer on Team 1652 (Robot Mafia), Programmer on Team 2970 (eSchool eBots)
2010-2016: Volunteer, Wisconsin Regional
2017: Programming Mentor, FRC 4247 (CougarBOTS, Obama SCTE, Milwaukee, WI)
  #2   Spotlight this post!  
Unread 31-01-2008, 21:55
cardinalman86's Avatar
cardinalman86 cardinalman86 is offline
0001 0101 0010 1001 System Lead!!
AKA: Corey
FRC #1529
Team Role: Leadership
 
Join Date: Jan 2006
Rookie Year: 2006
Location: Southport,Indiana
Posts: 112
cardinalman86 will become famous soon enough
Send a message via Yahoo to cardinalman86
Re: Hybrid Mode Help

here, check this thread out. it really helped me and let me do what i wanted to do with the programming. Good Luck.
__________________
Before you practice zen, a bowl is a bowl and a cup is a cup. During zen, a bowl is not a bowl and a cup is not a cup. After practicing zen, a bowl is a bowl and a cup is a cup.
  #3   Spotlight this post!  
Unread 01-02-2008, 11:07
timville's Avatar
timville timville is offline
Registered User
AKA: Timothy Friez
FRC #1185 (X-Bots)
Team Role: Alumni
 
Join Date: Mar 2007
Rookie Year: 2003
Location: Pittsburgh
Posts: 18
timville is an unknown quantity at this point
Send a message via AIM to timville
Re: Hybrid Mode Help

Hi ShotgunNinja

If you wanted to interface with the Hybrid Mode with the IR, we actually have a sample to do. Here's the code for the Initialization and Autonomous Sections:

Code:
#include "FRC_Comp_Include.c"

void Initialization()
{
	bMotorReflected[port2] = true;  //Reflect Motor
	frcDigitalIODirection[pio3] = dirInput;  //IR Output 1 on Digital IO 3
	frcDigitalIODirection[pio4] = dirInput;  //IR Output 2 on Digital IO 4
	frcDigitalIODirection[pio5] = dirInput;  //IR Output 3 on Digital IO 5
	frcDigitalIODirection[pio6] = dirInput;  //IR Output 4 on Digital IO 6
}

task Autonomous()
{
	int IRswitch1;
	int IRswitch2;
	int IRswitch3;
	int IRswitch4;

	while(true)
	{
	   IRswitch1 = frcDigitalIOValue[pio3];  //Update Variables
	   IRswitch2 = frcDigitalIOValue[pio4];  //So we can see status in the Debugger
	   IRswitch3 = frcDigitalIOValue[pio5];
	   IRswitch4 = frcDigitalIOValue[pio6];

	   if(IRswitch1 == 1)  //If Switch 1 is pressed (it pulses, doesn't remain on)
	   {
	     motor[port1] = 50;
	     motor[port2] = 50;
	   }

	   if(IRswitch2 == 1)  //If Switch 2 is pressed
	   {
	     motor[port1] = 0;
	     motor[port2] = 0;
	   }

	   if(IRswitch3 == 1)  //If Switch 3 is pressed
	   {
	     motor[port1] = -50;
	     motor[port2] = 50;
	   }

	   if(IRswitch4 == 1)  //If Switch 4 is pressed
	   {
	     motor[port1] = 50;
	     motor[port2] = -50;
	   }
	}
}
Yes, You can use Typedef structs like ANSI C.

What issues are you having with the compiler?

I recommend you take a look at some of the support/samples we have at the ROBOTC website: http://robotc.net/ifi/frc/support.htm
__________________
2003 - Rookie All-Stars Awards - #1185 (Pittsburgh)
2004-2008 FIRST Volunteer - Ref/Head Ref (Pittsburgh)
2002-2007 FIRST Lego League Volunteer - Head Ref (Pittsburgh)
  #4   Spotlight this post!  
Unread 01-02-2008, 14:34
feliks_rosenber's Avatar
feliks_rosenber feliks_rosenber is offline
Félix
AKA: Mentor of Teams #2217 & #2669
FRC #2217 (FOMHA & KY Bots)
Team Role: Mentor
 
Join Date: Jan 2007
Rookie Year: 2007
Location: Kiriat-Motzkin, Israel
Posts: 207
feliks_rosenber is a jewel in the roughfeliks_rosenber is a jewel in the roughfeliks_rosenber is a jewel in the rough
Send a message via MSN to feliks_rosenber
Re: Hybrid Mode Help

Hello!

I am the mentor of team 2669 from Kiryat Yam, Israel.

We stand behind the Hybrid4all initiative aimed at helping teams get started with their autonomous mode.

Here is a link to a presentation explaining about the basics.

http://www.chiefdelphi.com/media/papers/tags/frc2669

To the left you will find another presentation about our 'Go Black' initiative.

To the right you will see the presentation of Hybrid4all.

If you have any questions feel free to contact Team2669 KY Bots!
__________________
Visit team 2217 channel:
http://www.youtube.com/profile?user=team2217
2007 Israel Regional GM/Technion Rookie All Stars
Participated in 2007 Atlanta World Championships (Newton Division)

______________________________________________
Visit team 2669 channel at:
http://www.youtube.com/user/team2669
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
Help needed in autonomous programming for hybrid mode Team_STORM Programming 3 21-01-2008 19:11
Hybrid mode? Mrtrom General Forum 20 21-01-2008 07:11
Hybrid mode question. ks_mumupsi Rules/Strategy 13 14-01-2008 22:43
<G40> in hybrid mode clydefrog88 Rules/Strategy 2 10-01-2008 16:01
Hybrid mode issue Los Frijoles General Forum 2 07-01-2008 18:52


All times are GMT -5. The time now is 23:06.

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