|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
IR Remote Programming
I'm trying to clarify something. During hybrid mode, we are able to use the IR remote by RoboCoach right? If so, do I need to program my autonomous to recognize IR commands, or does having it in the user_routines.c file the correct way how to do it?
|
|
#2
|
|||
|
|||
|
Re: IR Remote Programming
Quote:
I forget the exact digital input numbers, though, and I don't have our code right now. (It's in the hallway being tested.) EDIT: Apparently, the digital input numbers are just the four digital inputs into which you plug the IR board. Last edited by jacobhurwitz : 02-02-2008 at 14:16. Reason: talked to another programmer |
|
#3
|
|||
|
|||
|
Re: IR Remote Programming
Quote:
|
|
#4
|
|||
|
|||
|
Re: IR Remote Programming
If you connected the IR board to digital inputs 1-4, then in the code, you use: rc_dig_in01, rc_dig_in02, rc_dig_in03, rc_dig_in04. If the button that you trained first is pressed, rc_dig_in01 is 1. Otherwise, it's 0. The second button is rc_dig_in02, etc.
|
|
#5
|
||||
|
||||
|
Re: IR Remote Programming
It would be understandable to misinterpret the first post, I'm not quite sure myself what you mean. If you want your autonomous to react to IR signals, then, yes, your autonomous code will have to change depending on that signal. I'd think a few IFs in the autonomous would suffice. But what exactly are you trying to say?
|
|
#6
|
|||
|
|||
|
Re: IR Remote Programming
That's all I needed to know. My IR board code is currently in Default_Routine under user_routines.c, so from what I'm hearing, it needs to go under User_Autonomous_Code under user_routines_fast.c. Is that correct?
Edit: The PWM cables are currently conncected to the digital 15-18. |
|
#7
|
||||
|
||||
|
Re: IR Remote Programming
That would be correct. Otherwise it would respond in teleoperated.
|
|
#8
|
|||
|
|||
|
Re: IR Remote Programming
I'm having a huge programming error as I'm trying to do this right now. Please check the category User_Autonomous_code to see if I did something wrong. The error was the line "void Process_Data_From_Local_IO(void)" which I made no changes to.
Quote:
|
|
#9
|
||||
|
||||
|
Re: IR Remote Programming
Check your braces over by the next function up, the void User_Autonomous_Code(void). The compiler errors aren't very helpdul with line numbers. I strongly suspect this is the case.
|
|
#10
|
|||
|
|||
|
Re: IR Remote Programming
The braces were removed, but it's still giving me the syntax error.
|
|
#11
|
||||
|
||||
|
Re: IR Remote Programming
Alright, giving this code closer inspection. You need one more brace to close the random brace hovering below the /* Add your own autonomous code here */ line, not removing the braces at the bottom. Or just eliminate that brace. That should fix the problem. Indentation is a good thing!
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Remote | sportman3333333 | Control System | 2 | 27-01-2008 12:41 |
| Remote programming box | Ben Englert | Programming | 4 | 23-02-2006 22:56 |
| Remote Network | Ryan F. | IT / Communications | 12 | 01-07-2004 15:06 |
| Remote Remote Kickoff for Southern California | ChrisH | Southern California Regional Robotics Forum | 0 | 05-01-2004 12:36 |
| Remote Remote Kick off at University High School | George1902 | Off-Season Events | 4 | 04-01-2004 21:05 |