|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
|||||
|
|||||
|
Re: ir sensor Board ??????????????????????
Quote:
Quote:
|
|
#2
|
||||
|
||||
|
Re: ir sensor Board ??????????????????????
Quote:
no......the maximum pwm value is 256......its an extrema |
|
#3
|
||||
|
||||
|
Re: ir sensor Board ??????????????????????
Actually, the maximum PWM value is 255, or 2^8 - 1, which is the maximum value that can be held in 8 bits of memory - the size of an unsigned char. Going above this will cause an overflow problem, where you'll loop around and start at 0 again.
|
|
#4
|
||||
|
||||
|
Re: ir sensor Board ??????????????????????
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 |
|
#5
|
|||
|
|||
|
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 |
|
#6
|
|||||
|
|||||
|
Re: ir sensor Board ??????????????????????
If your goal is to test the ability to use IR commands to control motors, that's probably the right place to put it.
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. |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Wiring the IR sensor board | govvijay | Programming | 9 | 05-02-2008 19:41 |
| Technical Details for the IR sensor board | tuzzer | Electrical | 1 | 19-01-2008 08:38 |
| How to program ir sensor board?? | RRA4LIFE2 | Programming | 1 | 11-01-2008 21:47 |
| Perf Board = BS2-IC Carrier Board? | indieFan | Electrical | 2 | 16-09-2004 08:28 |
| Making a Sensor Board | SpaceOsc | Technical Discussion | 11 | 15-05-2004 12:46 |