View unanswered posts | View active topics It is currently Sat Oct 31, 2020 6:44 pm

Reply to topic  [ 3 posts ] 
Struggling to workout a project 
Author Message

Joined: Tue Apr 15, 2014 10:45 pm
Posts: 1
Post Struggling to workout a project
Basically I need a robot to follow a line, and push objects off the line than continue following a line. I got the robot to follow the line fine using the colour sensor fairly easily using the sample code provided, however getting it to push objects (Foam cups) off the line is proving difficult. The line is just a metre by metre square so I was thinking I could get it to detect the object with sonar, make a 90 degree turn, move forward, 90 degree turn, move forward (pushes object off) than try and redetect line. No idea how to do this is coding though. Any advice?

Tue Apr 15, 2014 11:07 pm

Joined: Thu Jan 03, 2013 5:10 pm
Posts: 207
Location: The plateau north of the Ohio River Valley, also known as Cave Country.
Post Re: Struggling to workout a project
Try this:


while no object is detected
    follow the line

push off the object
go backwards to where you were

continue following the line

Since it sounds like this is a school project, I can't give you actual code, but that should get you on the right track.


I'm not a robot! I'm british! ~ quote from an asparagus
I am not a robot! I am a unicorn! ~ quote from a robot

Tue Apr 22, 2014 3:51 pm
User avatar

Joined: Sun Nov 15, 2009 5:46 am
Posts: 1523
Post Re: Struggling to workout a project
Please define "push objects off the line". If there are foam cups on the line, wouldn't the robot push them off the line while following the line without you doing anything special? In that case, you never leave the line and don't need to "find the line again".

Wed Apr 23, 2014 2:32 am
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.