![]() |
ir sensor Board ??????????????????????
We are a rookie team. we do not know how to start up the sensor board. to what type of battery do you connect it, or do you need to buy that battery adapter or what we need help fast!!!!!! |
Re: ir sensor Board ??????????????????????
Whoa, calm down there now :yikes:
There have been a ton of threads posted about this, there are a couple of images that show some of the wiring too. http://www.chiefdelphi.com/forums/search.php It will end up being wired to 4 digital ports on the robot and it will end up going into the main battery through one of the circuits. On another thread you posted someone linked you to the page that shows the pin-out of the actual board. Follow that. There is also a pdf somewhere that shows how the wiring goes with the different panels and the controller etc. |
Re: ir sensor Board ??????????????????????
I've been searching the forums for remedies to why we can't make our IR Board work. And i've found some that for me have had no effect on the performance of our motors. Right now to test if we can program anything to correspond with the signals that tie IR board reveives/gives, we inserted the following code:
Code:
if (rc_dig_in07 = 0)Any suggestions for resources or troubleshooting options?? Thanks, Team 2348 |
Re: ir sensor Board ??????????????????????
Quote:
In short, replace the = with ==. Some people use the technique of always putting the constant on the left in a test like this. That way the compiler will notice and complain if you accidentally use a single equals sign. Oh, and your test is backwards. The IR receiver board outputs 0 when nothing is detected, and gives a 100 millisecond 1 pulse when a valid signal is received. |
Re: ir sensor Board ??????????????????????
I was trying the following for our IR board and nothing seems to happen
if (rc_dig_in15 == 1) { pwm_13 = 256; } This was just to test if pressing a button on the remote did anything (the remote was already programmed etc,.) is there anything wrong that we are doing? This snippet was placed in the user_routines.c is that the correct place or should it be under user_routines_fast.c? Thanks for any help |
Re: ir sensor Board ??????????????????????
Quote:
I am not 100% positive on this, but here is my thoughts and what to try. The rc_dig_in7 - 18 are tied high when they are set as inputs. If they are considered active when a switch is closed across them to ground, and the output of the IR board goes high when it is active, then you need to test for a !rc_dig_inxx. So try: Code:
if (rc_dig_in15 == 0)Code:
if (!rc_dig_in15)Again, I am not a pro at this, just a learner at this point. BTW, the signal will pulse, so hold the button down. |
Re: ir sensor Board ??????????????????????
Try this code on a post I made a few days ago. Use MPLAB and add it to the autonomous program. Put whatever you want the robot to do under mode 1 ,mode 2, or mode 3.
http://www.chiefdelphi.com/forums/sh...1&postcount=19 |
Re: ir sensor Board ??????????????????????
Quote:
Quote:
|
Re: ir sensor Board ??????????????????????
Quote:
no......the maximum pwm value is 256......its an extrema |
Re: ir sensor Board ??????????????????????
Quote:
I placed it under Default_Routine() is that the wrong place? I couldnt find a function called Process_Data_From_Local_IO(), in user_routines.c |
Re: ir sensor Board ??????????????????????
Quote:
|
Re: ir sensor Board ??????????????????????
1 Attachment(s)
We were trying to find a way to program the Robot Cotroller so that when any of 2 inputs receive a signal, it will leave the autonomous code and enter a 'maual' autonomous code. The manual autonomous code would work based on 2 if statements that loop back to the other. The if statements would either say left or right and cotinue until our timer value ran out. Our code in the attached file, only makes the motors pulse for some other direction or go to one and continue straight without any further response. Any problems with our coding? Also does anyone know an easier way of accomplishing the same tasks?
Thanks always for the help, Team 2348 |
Re: ir sensor Board ??????????????????????
Quote:
But you need to make sure that the pwm outputs you set don't get set to something else later on. You can do that most easily by putting the IR sensing code near the end of the function, so it gets the last opportunity to force the motors to move as you want. |
| All times are GMT -5. The time now is 23:46. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi