![]() |
[FTC]: Light Senser
My code is trying to use the light senser to follow the white lines during autonomous. I have seen other teams do this and i was wondering if someone could post some code for it.
Thanks:D |
Re: [FTC]: Light Senser
here is some basic code that will drive until your sensor hits the line:
Code:
motor[drive_right] = 100; //start driving the motorsfollowing the line is a bit tougher, the general idea is to go straight unless the light sensor goes off the line, if it does, turn until it is on the line again. Good luck getting it working, and if you need another hint, just ask! |
Re: [FTC]: Light Senser
On important thing is make sure you declare tapecolor with
int tapecolor = ____; As for following the line, i would highly recommend two sensors for line following, just so you get a good tracking. |
| All times are GMT -5. The time now is 18:01. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi