![]() |
IR board code
I'm am the programmer for team 1691 and I'm am currently working on programming the ir board. I think that the sort of thing that i want to do is have one button coorespond with just going around the track, one for knocking the trackball off of the left spot, one for knocking it off of the middle, and the last for knocking it off of the right spot. i was wondering if any one out that has done something along these lines could send me a sample of their program?
as you know the ship date is on tuesday, so the sooner you can respond the better off i will be. Thank you for any help you can bring to the table. |
Re: IR board code
just do
if((pick the digital io you want)==1) { // add code here } |
Re: IR board code
Actually, that will always run as the IR returns 1 unless the signal matches. You will need to have an equivalency check with 0, and probably code to avoid running without the IR connected. I'll post an example once I get back to my code...
As for the actual autonomous mode... Are you basically looking for a complete code to base yours off or something specific you need an example of? If you're looking for something in general, I can post an example of our team's state machine stuff... Once again when I get the laptop back. |
Re: IR board code
That is pretty much what i was thinking. we are short on time and we have one way or another fried our ir board, so we are making a code in hopes of getting it fixed with the help of other teams at our regional.
|
Re: IR board code
If the IR board's gone, then that would significantly change the strategy... Maybe you'll be able to purchase another before the actual regional, so in case you get one working, this is what we used for the IR board:
Code:
// IR InputsCode:
static int routine = 0;Code:
typedef enum{Code:
usigned char do_half_lap (void){I'll leave the subfunction implementation code up to you; but it should be pretty easy. Let me know if any of this is too complicated. Keep in mind these are all samples and haven't been tested. I advise not copy/pasting anything and writing your own with this as a reference. |
| All times are GMT -5. The time now is 01:00. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi