I like to build my own version of the rubics cube solver. First I reproduced the Tilted Twister which has two obvious problems:
1) The cube falls sometime out - I build my own hardware which does not have this problem.
2) The color detection fails often, it cannot properly distinguish between orange and red - I did not find a solution for that.
The color sensor return red for both. So I tried to distinguish between red and orange by inspecting the brightness (raw R+G+B). But that did not help because the difference is less than 5% and depends on the distance of the sensor, stray light, temperature, luck and horoscope
I am not able to place any hardcoded threshold value into my source code which can be used to say whether the colour is red or orange.
Also calculating the quotient of R/B or R/G (which produce the same result because G=B for both colors) does not help. AGain, the difference is less than 5%.
Has somebody an idea how I could technically distinguish between red and orange, as the eyes of each human can do easily?


