ROBOTC.net forums
http://robotc.net/forums/

IRSeeker code help please
http://robotc.net/forums/viewtopic.php?f=1&t=10268
Page 1 of 1

Author:  JAYPD [ Thu Jan 15, 2015 11:25 am ]
Post subject:  IRSeeker code help please

I have been trying to program an IS sensor but every code that came up but none worked :evil: can some one give me an example code for 4.26-4.27? I would like it before the 24th of this month because thats the ftc championship for my league.

Author:  BurningLights [ Thu Jan 15, 2015 2:18 pm ]
Post subject:  Re: IRSeeker code help please

There's some sample programs in the NXT\3rd Party Driver Library\examples directory. Just choose Open Sample Program from the File menu in ROBOTC. Also, to make the sample programs work, you might have to tell ROBOTC where to find the drivers. Simply go to View->Preferences->Detailed Preferences. Choose the Compiler tab, then the Include Directories sub-tab. Click on the browse button next to the first textbox and select C:\Program Files (x86)\Robomatter Inc\ROBOTC Development Environment 4.X\Sample Programs\NXT\3rd Party Driver Library\include.

Author:  JAYPD [ Thu Jan 15, 2015 3:02 pm ]
Post subject:  Re: IRSeeker code help please

Thanks :P code green

Author:  JAYPD [ Fri Jan 16, 2015 1:00 pm ]
Post subject:  Re: IRSeeker code help please

I found the example code but there were a "few" errors

code RED

the issues were:
**Severe*:Couldn't open '#include' file 'hitechnic-irseeker-v2.h'
**Error**:Undefined variable 'tHTIRS2'. 'short' assumed.
**Error**:Expected->';'. Found 'irSeeker'
**Error**:Undefined variable 'irSeeker'. 'short' assumed.
*Warning*:Meaningless statement -- no code generated
**Error**:Undefined procedure 'initSensor'.
**Error**:'irSeeker' is not a reference to a 'struct'
**Error**:')' missing. Ummatched left parenthesis '('
**Error**:Expected->')'. Found 'mode'
**Error**:Undefined variable 'mode'. 'short' assumed.
**Error**:Undefined variable 'DSP_1200'. 'short' assumed.
**Error**:Missing ';' before ')'
**Error**:Unexpected ')' during parsing
*Warning*:Meaningless statement. Did you mean '=' instead of '=='?
**Error**:Unexpected 'else'. Ignored.
**Error**:Unexpected 'displayTextLine' during parsing
*Warning*:')' exepected before before ','. Automatically inserted.
**Error**:Expected->';'. Found ','
**Error**:Unexpected ',' during parsing
**Error**:Unexpected ' DC 600' during parsing
**Error**:Unexpected ')' during parsing
**Error**:Undefined procedure 'getXbuttonValue'.
**Error**:Undefined variable 'xButtonEnter'. 'short' assumed.
**Error**:'irSeeker' is not a reference to a 'struct'
**Error**:Expected->';'. Found 'mode'
**Error**:')' missing. Ummatched left parenthesis '('
**Error**:Expected->')'. Found 'mode'
**Error**:Missing ';' before ')'
**Error**:Unexpected ')' during parsing
**Error**:Unexpected '?' during parsing
*Warning*:Meaningless statement -- no code generated
*Warning*:Meaningless statement. Did you mean '=' instead of '=='?
**Error**:Undefined procedure 'readSensor'.
**Error**:'irSeeker' is not a reference to a 'struct'
**Error**:')' missing. Ummatched left parenthesis '('
**Error**:Expected->')'. Found 'dcDirection'
**Error**:Expected->';'. Found 'dcDirection'
**Error**:Undefined variable 'dcDirection'. 'short' assumed.
**Error**:Expected->';'. Found ','
**Error**:Unexpected ',' during parsing
**Error**:Expected->';'. Found 'acDirection'
**Error**:Undefined variable 'acDirection'. 'short' assumed.
**Error**:Expected->';'. Found 'enhDirection'
**Error**:Undefined variable 'enhDirection'. 'short' assumed.
**Error**:Missing ';' before ')'
**Error**:Unexpected ')' during parsing
*Warning*:Meaningless statement -- no code generated
**Error**:'irSeeker' is not a reference to a 'struct'
**Error**:')' missing. Ummatched left parenthesis '('
**Error**:Expected->')'. Found 'dcValues'
**Error**:Expected->';'. Found 'dcValues'
**Error**:Undefined variable 'dcValues'. 'short' assumed.
**Error**:LValue for '[]' operator must be a pointer
**Error**:'[]' operator requires pointer value on left hand side [2].
**Error**:Expected->';'. Found ','
**Error**:Unexpected ',' during parsing
**Error**:Expected->';'. Found 'acValues'
**Error**:Undefined variable 'acValues'. 'short' assumed.
**Error**:Missing ';' before ')'
**Error**:Unexpected ')' during parsing
*Warning*:Meaningless statement -- no code generated
**Error**:'irSeeker' is not a reference to a 'struct'
**Error**:')' missing. Ummatched left parenthesis '('
**Error**:Expected->')'. Found 'dcValues'
**Error**:Expected->';'. Found 'dcValues'
**Error**:LValue for '[]' operator must be a pointer
**Error**:'[]' operator requires pointer value on left hand side [2].
**Error**:Expected->';'. Found ','
**Error**:Unexpected ',' during parsing
**Error**:Expected->';'. Found 'acValues'
**Error**:Missing ';' before ')'
**Error**:Unexpected ')' during parsing
*Warning*:Meaningless statement -- no code generated
**Error**:'irSeeker' is not a reference to a 'struct'
**Error**:')' missing. Ummatched left parenthesis '('
**Error**:Expected->')'. Found 'dcValues'
**Error**:Expected->';'. Found 'dcValues'
**Error**:LValue for '[]' operator must be a pointer
**Error**:'[]' operator requires pointer value on left hand side [2].
**Error**:Expected->';'. Found ','
**Error**:Unexpected ',' during parsing
**Error**:Expected->';'. Found 'acValues'
**Error**:Expected->';'. Found 'enhStrength'
**Error**:Undefined variable 'enhStrength'. 'short' assumed.
**Error**:Missing ';' before ')'
**Error**:Unexpected ')' during parsing
*Warning*:Meaningless statement -- no code generated
**Error**:'irSeeker' is not a reference to a 'struct'
**Error**:')' missing. Ummatched left parenthesis '('
**Error**:Expected->')'. Found 'dcValues'
**Error**:Expected->';'. Found 'dcValues'
**Error**:LValue for '[]' operator must be a pointer
**Error**:'[]' operator requires pointer value on left hand side [2].
**Error**:Expected->';'. Found ','
**Error**:Unexpected ',' during parsing
**Error**:Expected->';'. Found 'acValues'
**Error**:Missing ';' before ')'
**Error**:Unexpected ')' during parsing
*Warning*:Meaningless statement -- no code generated
**Error**:'irSeeker' is not a reference to a 'struct'
**Error**:')' missing. Ummatched left parenthesis '('
**Error**:Expected->')'. Found 'dcValues'
**Error**:Expected->';'. Found 'dcValues'
**Error**:LValue for '[]' operator must be a pointer
**Error**:'[]' operator requires pointer value on left hand side [2].
**Error**:Expected->';'. Found ','
**Error**:Unexpected ',' during parsing
**Error**:Expected->';'. Found 'acValues'
**Error**:Missing ';' before ')'
**Error**:Unexpected ')' during parsing
*Warning*:Meaningless statement -- no code generated
**FATAL**:Too many errors. Compilation aborted

Author:  MHTS [ Fri Jan 16, 2015 3:57 pm ]
Post subject:  Re: IRSeeker code help please

Your main problem is this error:
Code:
**Severe*:Couldn't open '#include' file 'hitechnic-irseeker-v2.h'

This means the compiler cannot find Xander's IR seeker driver. I'd bet if you fix this, all other errors will go away.
You should be able to find Xander's drivers at:
c:\Program Files (x86)\Robomatter Inc\ROBOTC Development Environment\Sample Programs\NXT\3rd Party Sensor Drivers\drivers for RobotC 3.x
and
c:\Program Files (x86)\Robomatter Inc\ROBOTC Development Environment 4.X\Sample Programs\NXT\3rd Party Driver Library\include for RobotC 4.x

Author:  JAYPD [ Sun Jan 18, 2015 5:03 pm ]
Post subject:  Re: IRSeeker code help please

well, I got everything set up so the errors will go away and now the program crashes when I compile the sample!
what does RobotC have against me?!

code red

Author:  MHTS [ Sun Jan 18, 2015 5:25 pm ]
Post subject:  Re: IRSeeker code help please

JAYPD wrote:
well, I got everything set up so the errors will go away and now the program crashes when I compile the sample!
what does RobotC have against me?!

code red

What do you mean by "the program crashes"? Did you have a compiler error or are you saying RobotC compiler crashed? Would you post the code that you have trouble with?

Author:  JAYPD [ Sun Jan 18, 2015 5:33 pm ]
Post subject:  Re: IRSeeker code help please

I mean it says "ROBOTC integrated Developement has stopped working"

Author:  MHTS [ Sun Jan 18, 2015 5:42 pm ]
Post subject:  Re: IRSeeker code help please

Did you try again and it crashed again or was it just one time? What about rebooting your computer and try again? Would you post the code that caused the issue?

Author:  JAYPD [ Sun Jan 18, 2015 5:47 pm ]
Post subject:  Re: IRSeeker code help please

MHTS wrote:
Did you try again and it crashed again or was it just one time? What about rebooting your computer and try again? Would you post the code that caused the issue?


every time since friday

Author:  MHTS [ Sun Jan 18, 2015 5:57 pm ]
Post subject:  Re: IRSeeker code help please

Did RobotC crash when you just start it up or it crashed when you compiled the code? If RobotC wasn't crashing when it starts up, you may want to click the "View" menu and click "Delete All registry values". Then close RobotC and starts it up again. See if this fixed the crashing problem.

Author:  JAYPD [ Sun Jan 18, 2015 5:59 pm ]
Post subject:  Re: IRSeeker code help please

Do I need uninstall and re-install?

Author:  JAYPD [ Sun Jan 18, 2015 6:00 pm ]
Post subject:  Re: IRSeeker code help please

MHTS wrote:
Did RobotC crash when you just start it up or it crashed when you compiled the code? If RobotC wasn't crashing when it starts up, you may want to click the "View" menu and click "Delete All registry values". Then close RobotC and starts it up again. See if this fixed the crashing problem.


it crashes when I load the file

Author:  JAYPD [ Sun Jan 18, 2015 6:06 pm ]
Post subject:  Re: IRSeeker code help please

IT WORKS! thanks so much, now I just need to make a tetrix bot follow the IR beacon as autonomous in VW

Page 1 of 1 All times are UTC - 5 hours [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/