View unanswered posts | View active topics It is currently Tue Dec 23, 2014 12:05 am






Reply to topic  [ 3 posts ] 
Forward, lightsensor sees dark, back to SAME SPOT? 
Author Message
Rookie

Joined: Tue May 27, 2008 2:17 pm
Posts: 5
Post Forward, lightsensor sees dark, back to SAME SPOT?
How do I go foward until light sensor sees dark and then go back to the same spot that I started at :?:


Fri Jun 06, 2008 12:32 pm
Profile
Moderator
Moderator
User avatar

Joined: Wed Mar 05, 2008 8:14 am
Posts: 3297
Location: Rotterdam, The Netherlands
Post Re: Forward, lightsensor sees dark, back to SAME SPOT?
lostmom wrote:
How do I go foward until light sensor sees dark and then go back to the same spot that I started at :?:

Hiya Mum,

Before you start, reset your encoders using
Code:
nMotorEncoder[<your motor1>] = 0;
nMotorEncoder[<your motor2>] = 0;

Then go forward until you hit that spot then set nMotorEncoderTarget for both motors to 0 and hit reverse. This should *theoretically* work.

Regards,
Xander

_________________
| Professional Conduit of Reasonableness
| (Title bestowed upon on the 8th day of November, 2013)
| My Blog: I'd Rather Be Building Robots
| ROBOTC 3rd Party Driver Suite: [Project Page]


Fri Jun 06, 2008 12:54 pm
Profile WWW
Rookie

Joined: Tue May 27, 2008 2:17 pm
Posts: 5
Post Thanks
Thanks :D


Sat Jun 07, 2008 5:01 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 3 posts ] 

Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  



Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.