|
Page 1 of 1
|
[ 6 posts ] |
|
Color sensors from HiTechnic
| Author |
Message |
|
JT2007
Rookie
Joined: Wed Jun 27, 2007 3:33 pm Posts: 2 Location: canada
|
 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

|
| Wed Jun 27, 2007 3:37 pm |
|
 |
|
steve
Rookie
Joined: Sat Jun 09, 2007 8:41 am Posts: 7
|
 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 |
|
 |
|
dtrotzjr
Rookie
Joined: Sat Jun 16, 2007 6:24 pm Posts: 14
|
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 |
|
 |
|
JT2007
Rookie
Joined: Wed Jun 27, 2007 3:33 pm Posts: 2 Location: canada
|
thanks...your help is much appreciated
|
| Wed Jul 04, 2007 9:17 pm |
|
 |
|
dtrotzjr
Rookie
Joined: Sat Jun 16, 2007 6:24 pm Posts: 14
|
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 |
|
 |
|
dtrotzjr
Rookie
Joined: Sat Jun 16, 2007 6:24 pm Posts: 14
|
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 |
|
|
|
Page 1 of 1
|
[ 6 posts ] |
|
Who is online |
Users browsing this forum: No registered users and 1 guest |
|
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
|
|