Thread: IR board
View Single Post
  #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.