7

The color sensor works pretty well as long as the object is about 1 1/2- 2 modules from the object. The sensing is best when the object is flat. The object is large enough to be fully contained within the "spotlight" that the sensor emits. As long as this is true, it doesn't really matter what the background color is. Another thing to consider is that ...


6

One way of doing this is using a loop and interrupting it. How it works: The "Loop Interrupt" block stops all blocks running inside of the loop, so by interrupting the loop after either wait block, it will stop the other wait block. The type of loop doesn't actually matter because we never reach that point. I chose to wait for "Logic" with a value of "...


5

When you take a Raw value from any sensor, the EV3 brick passes on the reading as reported directly from the sensor, without doing any processing. Especially for the color sensor, where you have several modes such as Reflection and Color Number, the EV3 brain does do post-processing on the input value to make the output easier to understand and/or use. By ...


5

It is not possible to increase the sensitivity of the touch sensor in-programming. Generally, you can use a lever to decrease the amount of force required. Here the "load" is the touch sensor button, the "effort" is the ball hitting the lever, and the beam is a lego beam. If the ball you're using is too light, you still probably won't be able to ...


4

The Original Mindstorms NXT only came with the NXT Light Sensor. The NXT Light Sensor cannot detect colors, so this is most likely what you have. You can currently purchase the NXT Color Sensor from Bricklink.com for under $30.


4

Based on this API reference and this discussion of the color sensor it looks like "pct" is short for percent as in a ratio with 100. David added in a comment: EV3 hardware developer kit provides a bit more info on what 100% means: The output from the sensor within light sensor mode is a value between 0 – 100 where 0 equals no reflected light ...


3

To understand how to use the data, it help to understand how the color sensor works. Let's take a step back for a minute and have a look. The sensitive electrical component here is just a photodiode or phototransistor that lets us measure light intensity. If we turn all of the LEDs off we are just measuring ambient light. If we turn on just one of the LEDs ...


3

Green does tend to be tricky on the LEGO EV3 Color sensor. Example Here are some suggestions: Build a shroud to eliminate ambient light. I have seen people use electrical tape for this or build something from LEGO parts. Using the raw RGB values, convert to HSV (there is a link in Example 1 for this). Use the algorithm for the NXT color sensor from the EV3 ...


3

The returned values are the reflected light intensities for each of the three LED colors (red/green/blue). The scale is actually 0-1023. Basically, this is the raw value returned by a 10-bit analog to digital converter in the color sensor (2 ^ 10 = 1024). The LEDs themselves may not put out enough light that you could ever reach the maximum value, so you ...


2

There is a modified Color sensor block available here. As of this writing, this is the most up-to-date direct link to download the block.


2

You may try to use the color sensor in RGB mode using a 3rd party block found here: http://mindcuber.com/mindcub3r/mindcub3r.html#ColorSensorRGBBlock With this block you get a set of three 0-255 values, one for each R G B color. It will still be tricky to correctly classify the color of your objects as the readings are noisy - you can try to set ranges to ...


2

The color of the LED on the LEGO EV3 Color Sensor depends on which mode it is in. From the EV3 help file: COLOR MODE When the Color Sensor is in Color mode, red, green, and blue LED lights on the front of the sensor will turn on. REFLECTED LIGHT INTENSITY MODE When the Color Sensor is in Reflected Light Intensity mode, a red ...


2

Looking at the stack trace in the exception you've posted, the error seems to be coming from a call to RemoteEV3.createRegulatedMotor: at lejos.remote.ev3.RemoteEV3.createRegulatedMotor(Unknown Source) at test_bluetooth.Bluetooth.main(Bluetooth.java:186) After that it's just going through the motions to try and open a port on a remote device... Having a ...


2

Not sure what language you are using, or calls you are making before this, but: float var_Min = var_R; if (var_G > var_Min) var_Min = var_G; if (var_B > var_Min) var_Min = var_B; Should be (note the use of < rather than >) float var_Min = var_R; if (var_G < var_Min) var_Min = var_G; if (var_B < var_Min) var_Min = var_B; Your posted code is ...


2

There will certainly be some mechanical and robotics questions that you'll need to figure out, such as where on the car to position the sensors, and how to ensure that the car is reliably reading both colors at every intersection. (Which brings up contextual questions like "are there discrete intersections?") From a programming perspective, 49 possible ...


2

The loop does stop but you can not see it: You should add a brake block after the loop that runs until colour sensor<20 otherwise there is no visible indication that the loop has stopped. Hope this helped.


2

I believe that this is the block that you are looking for: https://www.hitechnic.com/upload/545-HiTechnicEV3Color.zip The database listing downloads appears to be down, but the files are still available. Here's what I did to find the internal link: Pull up the download listings on archive.org: https://web.archive.org/web/20180203011745/https://www....


1

Lego has made colour sensors for various robotics themes, including Boost, EV3, and NXT. NXT is pretty old so you'll need to head to a 3rd party website like Bricklink to buy one.


1

Thank you! The answer from jncraton did the trick. Summary: the direct download for the EV3 sensor block for the HiTechnic Color Sensor V2 is here: https://www.hitechnic.com/upload/545-HiTechnicEV3Color.zip The zip archive includes three files: (1) instructions (HTColorREADME.txt) (2) the control block (HTColor.ev3b) (3) a sample file demonstrating use ...


1

Light sensors are mainly affected by three independent variables: Distance between the sensor and the surface Color of the surface Amount of ambient light What this means is, in order to measure one of these things, the other two variables must be held constant. So, in order to measure color, the distance must be constant and the ambient light ...


1

It will from 1 to 255. Now I try to measure color via RGB value to make the rank higher than using color sensor value block.


1

Since you are trying to solve a Rubik's cube, check out the source code for the MindCuber. The solution there is that the values are not actually converted into colors. Rather the raw values are converted to HSV and then sorted by hue. The actual value does not matter, just how close it is to the other values. The Mindcuber also has a white calibration. ...


Only top voted, non community-wiki answers of a minimum length are eligible