Hitechnic Color Sensor

This is where you talk about the NXJ hardware related topics such as the brick, sensors, LEGO pieces, etc.

Moderators: imaqine, 99jonathan, roger

New User
Posts: 1
Joined: Fri Apr 26, 2013 2:29 pm

Hitechnic Color Sensor

Postby mah » Thu May 02, 2013 12:22 pm


Could anyone help me, please?

I am working in a project which I need to use a color sensor. Firstly, I chose the Hitechnic sensor, because acording to my studies, the reading's Hitechnic sensor doesn't change a lot with the variation environment light. But I don't understand the returned values. For example, I use the following code for reading:
red =cs.getRGBComponent(Color.RED);
green = cs.getRGBComponent(Color.GREEN);
blue = cs.getRGBComponent(Color.BLUE);

So the returned values are bigger than 255. Sometimes it works, but why sometimes? The values are changing a lot. I don't know if it's because the position (I put the sensor in tilt position, because I am using the version 2 and I saw in a blog). I thought that the reason was the calibration. So I calibrated it, but the problem continued. :cry:
Now I am using the LEGO sensor, I tried this sensor in LEGO's program, and I saw that its reading is OK. I am thinking about using the LEGO sensor, because I know that it works. But I also know that the Hitechnic sensor is better, I wanted to use the Hitechnic sensor. Help me?

I hope that you understand me. My English isn't well.

Thank you! I wait your response anxiously. =)

Return to “NXJ Hardware”

Who is online

Users browsing this forum: No registered users and 2 guests