View unanswered posts | View active topics It is currently Sun Dec 21, 2014 4:54 am






Reply to topic  [ 6 posts ] 
Color sensors from HiTechnic 
Author Message
Rookie

Joined: Wed Jun 27, 2007 3:33 pm
Posts: 2
Location: canada
Post Color sensors from HiTechnic
Hello,

I was wondering if anyone has any sort of sample code for color sensors from hitechnic in RobotC

any help will be greatly appreciated

:wink:


Wed Jun 27, 2007 3:37 pm
Profile
Rookie

Joined: Sat Jun 09, 2007 8:41 am
Posts: 7
Post color sensor
Hello JT

I just started a program that uses the color sensor. I'm built the LEGO TriBot, and the TriBot arm is suposed to come down and pick up a blue ball that is on a stand.

In the RobotC Motors and Sensors Setup I have:

name: colorSensor
type: SONAR 9V

In my program I have:

if (SensorValue(colorSensor) == 2) break;

As the TriBot arm comes down, the sensor value is 0. When the color sensor gets close to the blue ball, the color sensor value changes to 2.

Steve


Thu Jun 28, 2007 9:21 am
Profile
Rookie

Joined: Sat Jun 16, 2007 6:24 pm
Posts: 14
Post 
If you are interested, I own a couple of these sensors, I could add the sensor to my sensor driver posted in another thread in these forums.


Sat Jun 30, 2007 1:43 pm
Profile
Rookie

Joined: Wed Jun 27, 2007 3:33 pm
Posts: 2
Location: canada
Post 
dtrotzjr wrote:
If you are interested, I own a couple of these sensors, I could add the sensor to my sensor driver posted in another thread in these forums.


thanks...your help is much appreciated


Wed Jul 04, 2007 9:17 pm
Profile
Rookie

Joined: Sat Jun 16, 2007 6:24 pm
Posts: 14
Post 
Sorry JT2007 I have been using nXc lately and haven't spent much time with RobotC. I will try to get to this for you by the end of the week. It should be pretty easy to do since I have a basic skeleton in place.

-- David


Tue Jul 17, 2007 12:47 am
Profile
Rookie

Joined: Sat Jun 16, 2007 6:24 pm
Posts: 14
Post 
I have added the Color Sensor to the NXT_I2C_DeviceDrivers.c
See:
viewtopic.php?t=212

I hope this is helpful. This sensor has some other readings that can be obtained from the sensor, such as the raw RGB values the sensor sees.

If anyone is interested I can add this to a future release of the driver.

-- David Trotz


Sun Jul 22, 2007 4:27 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 6 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.