View unanswered posts | View active topics It is currently Mon Jul 28, 2014 4:20 am






Reply to topic  [ 3 posts ] 
color sensor need help! 
Author Message
Rookie

Joined: Mon Mar 11, 2013 7:34 am
Posts: 2
Post color sensor need help!
hi im having difficulties using color sensor
heres what i have in mind
Code:
   
 if (SensorValue[S1]==REDCOLOR)
   {
     motor[Left]=0;
     motor[Right]=100;
   }

is this even right? im making a line tracer robot that detects red line.
thanks in advance


Mon Mar 11, 2013 7:40 am
Profile
Senior Roboticist
User avatar

Joined: Wed Sep 28, 2011 10:13 pm
Posts: 630
Location: If I told you, I'd have to kill you.
Post Re: color sensor need help!
Yes that should be right. Is it not working? Have you defined S1 as the LEGO Color Sensor? Could you please post the whole program, and maybe describe what your doing, and what exactly isn't working in more detail?

_________________
A.K.A. inxt-generation
Self-proclaimed genius, and future world dominator.
My Brickshelf Folder
"Don't they teach recreational mathematics anymore?" - The Tenth Doctor
Bow down to Nikola Tesla, King of the Geek Gods.


Mon Mar 11, 2013 10:25 am
Profile WWW
Rookie

Joined: Mon Mar 11, 2013 7:34 am
Posts: 2
Post Re: color sensor need help!
oh i figure it out, thanks for the reply
silly me, im using old version which causes compiling error

just upgraded to latest version :D


Mon Mar 11, 2013 10:49 am
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.