View unanswered posts | View active topics It is currently Tue Sep 02, 2014 8:58 am






Reply to topic  [ 2 posts ] 
How to USE LEGO Color Sensor In Light Active mode 
Author Message
Rookie
User avatar

Joined: Tue Oct 04, 2011 6:05 am
Posts: 1
Location: Thailand
Post How to USE LEGO Color Sensor In Light Active mode
I wanna know how to Use LEGO Color Sensor In Light Active mode like a general Light Sensor
but I don't know how to configure it.


:programmer:


Mon Jan 30, 2012 12:34 pm
Profile WWW
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: How to USE LEGO Color Sensor In Light Active mode
Here are the three setup configurations:
Code:
#pragma config(Sensor,S3,S3,sensorCOLORRED)
#pragma config(Sensor,S3,S3,sensorCOLORGREEN)
#pragma config(Sensor,S3,S3,sensorCOLORBLUE)


You can, of course, use any port you want. It returns the reflected light value as a integer, and lights the light as defined in the #pragma. i.e. sensorCOLORGREEN lights the Green LED.

_________________
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 Jan 30, 2012 1:03 pm
Profile WWW
Display posts from previous:  Sort by  
Reply to topic   [ 2 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.