Go to Post I believe it is in the spirit of the game is to score more points than your opponent within the rules. That means offense AND defense. - Gary Dillard [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 15-03-2008, 20:13
XXShadowXX's Avatar
XXShadowXX XXShadowXX is offline
They call me Cody.
no team (None currently :\)
Team Role: Mentor
 
Join Date: Jan 2008
Rookie Year: 2008
Location: Pontiac; MI
Posts: 408
XXShadowXX has much to be proud ofXXShadowXX has much to be proud ofXXShadowXX has much to be proud ofXXShadowXX has much to be proud ofXXShadowXX has much to be proud ofXXShadowXX has much to be proud ofXXShadowXX has much to be proud ofXXShadowXX has much to be proud ofXXShadowXX has much to be proud ofXXShadowXX has much to be proud of
IR board

Guess what, shadow returns with more questions....


First concerns post on usfirst.org, does the IR plug in work for robot contoller?
If not were i can iget one, or is it easier to make one (one week till regional)?


When IR board is not active (signal 1 not sent) will switch 1 on the robot controller read a 1 or 0 (got 4 options on this 2 yes, 2 no so im not sure)?

Code:

PHP Code:
/*IR inports*/
/*digital inputs 1-4 are used for IR board*/

#define func1 rc_dig_in01
#define func2 rc_dig_in02
#define func3 rc_dig_in03
#define func4 rc_dig_in04

/*all the other stuff*/

inIRSignal 0
if(func1 ==){
 
IRSignal 1;
{else if(
func2 ==){
 
IRSignal 2)
{else if(
func3 ==){
 
IRSignal 3)
{else if(
func4 == 1){
 
IRSignal 4;
}

switch(
IRSinal){

 case 
0:
  {
no button pushed yet}
  break;
 case 
1:
  {
button 1 pushed}
  break;
 case 
2:
  {
button 2 pushed}
  break;
 case 
3:
  {
button 3 pushed}
  break;
 case 
4:
  {
button 4 pushed}
  break;


Will this piece of code save the IR board command (switch 1 tripped), and keep that the switch will stay tripped for entire hybird? And will the code keep the same variables?

If this code will not work what changes must be made?

If this will work, after corrected, or not, were should it be inserted
__________________
Is now an engineer thanks to FIRST.

Last edited by XXShadowXX : 15-03-2008 at 20:28.
  #2   Spotlight this post!  
Unread 15-03-2008, 20:19
XXShadowXX's Avatar
XXShadowXX XXShadowXX is offline
They call me Cody.
no team (None currently :\)
Team Role: Mentor
 
Join Date: Jan 2008
Rookie Year: 2008
Location: Pontiac; MI
Posts: 408
XXShadowXX has much to be proud ofXXShadowXX has much to be proud ofXXShadowXX has much to be proud ofXXShadowXX has much to be proud ofXXShadowXX has much to be proud ofXXShadowXX has much to be proud ofXXShadowXX has much to be proud ofXXShadowXX has much to be proud ofXXShadowXX has much to be proud ofXXShadowXX has much to be proud of
Re: IR board

well thats a very long post.

so ill post the next question on a new post


If im incorrect on any thing please tell me.
The gear tooth sensor doen't automatical count the teeth that pass a program must, this being true, were can i find one?
__________________
Is now an engineer thanks to FIRST.
  #3   Spotlight this post!  
Unread 15-03-2008, 20:23
SL8's Avatar
SL8 SL8 is offline
...
AKA: Jesus
FRC #0647 (Cyber Wolf Corps)
Team Role: Programmer
 
Join Date: Dec 2007
Rookie Year: 2008
Location: Killeen, Texas (Fort Hood)
Posts: 352
SL8 has much to be proud ofSL8 has much to be proud ofSL8 has much to be proud ofSL8 has much to be proud ofSL8 has much to be proud ofSL8 has much to be proud ofSL8 has much to be proud ofSL8 has much to be proud ofSL8 has much to be proud ofSL8 has much to be proud of
Send a message via Yahoo to SL8
Re: IR board

I think you have misswritten your names, ie irsingal==1,ir signal. and your variable set as unsigned char will probably save memory.
__________________


  #4   Spotlight this post!  
Unread 15-03-2008, 20:25
XXShadowXX's Avatar
XXShadowXX XXShadowXX is offline
They call me Cody.
no team (None currently :\)
Team Role: Mentor
 
Join Date: Jan 2008
Rookie Year: 2008
Location: Pontiac; MI
Posts: 408
XXShadowXX has much to be proud ofXXShadowXX has much to be proud ofXXShadowXX has much to be proud ofXXShadowXX has much to be proud ofXXShadowXX has much to be proud ofXXShadowXX has much to be proud ofXXShadowXX has much to be proud ofXXShadowXX has much to be proud ofXXShadowXX has much to be proud ofXXShadowXX has much to be proud of
Re: IR board

idk, you wrote it.

should it be that?


the amazing thing is that your only on when i, i even check your other postes, it's kind of freaky.
__________________
Is now an engineer thanks to FIRST.

Last edited by XXShadowXX : 15-03-2008 at 20:39.
  #5   Spotlight this post!  
Unread 15-03-2008, 20:35
SL8's Avatar
SL8 SL8 is offline
...
AKA: Jesus
FRC #0647 (Cyber Wolf Corps)
Team Role: Programmer
 
Join Date: Dec 2007
Rookie Year: 2008
Location: Killeen, Texas (Fort Hood)
Posts: 352
SL8 has much to be proud ofSL8 has much to be proud ofSL8 has much to be proud ofSL8 has much to be proud ofSL8 has much to be proud ofSL8 has much to be proud ofSL8 has much to be proud ofSL8 has much to be proud ofSL8 has much to be proud ofSL8 has much to be proud of
Send a message via Yahoo to SL8
Re: IR board

Quote:
Originally Posted by XXShadowXX View Post


the amazing thing is that your only on when i, i even check your other postes, it's kind of freaky.

lol
__________________


  #6   Spotlight this post!  
Unread 15-03-2008, 20:46
XXShadowXX's Avatar
XXShadowXX XXShadowXX is offline
They call me Cody.
no team (None currently :\)
Team Role: Mentor
 
Join Date: Jan 2008
Rookie Year: 2008
Location: Pontiac; MI
Posts: 408
XXShadowXX has much to be proud ofXXShadowXX has much to be proud ofXXShadowXX has much to be proud ofXXShadowXX has much to be proud ofXXShadowXX has much to be proud ofXXShadowXX has much to be proud ofXXShadowXX has much to be proud ofXXShadowXX has much to be proud ofXXShadowXX has much to be proud ofXXShadowXX has much to be proud of
Re: IR board

im signing off for the night, so if anyone else has something to add ill check in the morning
__________________
Is now an engineer thanks to FIRST.
  #7   Spotlight this post!  
Unread 15-03-2008, 20:33
SL8's Avatar
SL8 SL8 is offline
...
AKA: Jesus
FRC #0647 (Cyber Wolf Corps)
Team Role: Programmer
 
Join Date: Dec 2007
Rookie Year: 2008
Location: Killeen, Texas (Fort Hood)
Posts: 352
SL8 has much to be proud ofSL8 has much to be proud ofSL8 has much to be proud ofSL8 has much to be proud ofSL8 has much to be proud ofSL8 has much to be proud ofSL8 has much to be proud ofSL8 has much to be proud ofSL8 has much to be proud ofSL8 has much to be proud of
Send a message via Yahoo to SL8
Re: IR board

What im saying is is that the actual typing replace with,
unsigned char IRSingal = 0 ;
if(func1 ==1
){
IRSingal = 1
;
}
else if(
func2 ==1
){
IRSignal = 2;

}
else if(
func3 ==1
){
IRSignal = 3;

}
else if(
func4 == 1
){
IRSignal = 4
;
}

switch(
IRSignal
){


__________________


  #8   Spotlight this post!  
Unread 17-03-2008, 16:16
SL8's Avatar
SL8 SL8 is offline
...
AKA: Jesus
FRC #0647 (Cyber Wolf Corps)
Team Role: Programmer
 
Join Date: Dec 2007
Rookie Year: 2008
Location: Killeen, Texas (Fort Hood)
Posts: 352
SL8 has much to be proud ofSL8 has much to be proud ofSL8 has much to be proud ofSL8 has much to be proud ofSL8 has much to be proud ofSL8 has much to be proud ofSL8 has much to be proud ofSL8 has much to be proud ofSL8 has much to be proud ofSL8 has much to be proud of
Send a message via Yahoo to SL8
Re: IR board

Quote:
Originally Posted by SL8 View Post
What im saying is is that the actual typing replace with,
unsigned char IRSingal = 0 ;
if(func1 ==1 ){
IRSingal = 1;
}
else if(func2 ==1 ){
IRSignal = 2;
}
else if(func3 ==1 ){
IRSignal = 3;
}
else if(func4 == 1){
IRSignal = 4;
}

switch(IRSignal){

I mean...

unsigned char IRSignal = 0 ;
if(func1 ==1 ){
IRSignal = 1;
}
else if(func2 ==1 ){
IRSignal = 2;
}
else if(func3 ==1 ){
IRSignal = 3;
}
else if(func4 == 1){
IRSignal = 4;
}

switch(IRSignal){
__________________


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
IR Board BeyondRamo General Forum 3 13-03-2008 20:03
IR board chattycat14 General Forum 0 15-02-2008 18:42
IR board. bilal1219 Programming 9 14-02-2008 16:21
Lights in Joystick board or control board rcubes85 Control System 15 26-02-2005 23:40
Perf Board = BS2-IC Carrier Board? indieFan Electrical 2 16-09-2004 08:28


All times are GMT -5. The time now is 00:55.

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