|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Would anyone have any tips for sensor programming and testing? We're trying to find the Optical sensor line tracking. Would anyone know to do this?
|
|
#2
|
||||
|
||||
|
The optical sensors are digital (On/Off) devices. Wire them up to Robot Controller and sent the output to the Operator Interface LED
example: out8 = rc_sw1 'optical sensor 1 wired to switch 1 out9 = rc_sw2 'optical sensor 2 wired to switch 2 Now you can see what the robot is seeing Tim Tedrow |
|
#3
|
||||
|
||||
|
Line tracking is very simple. I can do it with one sensor and 5 lines of user code added to the default code. I hooked the white wire to rc_sw1(port one on the Digital Inputs) and used this code.
Code:
if rc_sw1 = 0 then PWM1 = 137 PWM2 = 90 else PWM1 = 90 PWM2 = 137 endif Hope this helps. |
|
#4
|
||||
|
||||
|
make sure there is contrast between the floor and the tape (or whatever you're tracking). i've tried a simple program, but it doesn't work because of that reason. i think i've found a floor that works now though
. |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Testing Autonomous at Competition | Yan Wang | Programming | 9 | 21-02-2003 19:17 |
| Image Discuss: Team 356: Drive base ramp testing | CD47-Bot | Robot Showcase | 5 | 14-02-2003 19:44 |
| testing (EOM) | archiver | 2001 | 0 | 24-06-2002 04:08 |
| testing | archiver | 2001 | 0 | 24-06-2002 00:58 |
| testing | team222badbrad | Chit-Chat | 5 | 15-01-2002 09:49 |