Has anyone got the colour sensor to work?


#1

Colour Sensor not working for me.

First:

  • Touch sensor on port 3 is fine, controlling it via Python.
  • NXT Colour sensor checked out fine when used with the NXT Brick itself.

I noticed that, when used with the NXT brick, the colour sensor turns a light on to detect colour. No light comes on when used with the BrickPi. It only detects black. (well, that makes sense if there’s no light).

I’ve tried with Port 1 and Port 2. I have the last version on the Pi, as I installed everything this week for the first time.

I also have the same problem if going through Scratch btw.


#2

I had the same problem.
Some have succeed in using color sensor by adding a second color sensor on second port.
But it didn’t work for me and I had to make a modification on the firmware :

http://www.dexterindustries.com/forum/?topic=brickpi-colour-sensor/#post-2589

But apparently, noone from Dexter industries care of us !
They didn’t answer on my post concerning this problem although i had found a clue to resolve it !

It seems they don’t care !!


#3

It does seem you’re right. And that worries me as I backed them again for GoPiGo and Tiddlybot. If we don’t get better support, I’ll bail out!


#4

Hello Cleo and flopsoft,
First, sorry to hear about the troubles with the color sensor. Indeed, you can see from our forum that a lot of folks have struggled with this. We haven’t been able to recreate the problem as much as we’ve tried over the past few months.

I will redouble our efforts on this and try to work through a solution.

As far as not caring, we’ve been a little silent lately trying to get our GoPiGo kickstarter shipped. I hope this is not viewed as not caring but we have a very small team.


#5

By the way, the Tidlybot is not our work Cleo.


#6

Hey folks, after working on this a bit, I still can’t recreate the problem. I’m using a BrickPi, a Raspberry Pi, the latest version of Raspbian, and a LEGO color sensor (not a HiTechnic color sensor). I see black on the screen until I run a lego colored ball under the sensor and I can see Blue, Yellow, and Red pretty regularly (when I transition balls, the different colors go by).


#7

I also just tested the following setup, which worked: I used the power from the Pi to run the sensor, rather than the BrickPi power pack.

Could something be different about your color sensor? It has the three color LED’s, RGB, correct?


#8

YEAH! Thanks!! Faith restored!

My colour sensor doesn’t even turn on. When I use it with the standard Lego Brick, and it starts sensing, it also starts emitting light. I never get to that point with the BrickPi.

I have two Lego colour sensors at my disposal, both of them the standard one that comes with Mindstorms NXT (I just happen to own two NXT).

I’ve tried with a battery power pack hooked to the BrickPi, and the pi powered in independently. There’s plenty of power going in but I can get the multimeter out if you tell me where to check.


#9

I made an answer about that here : http://www.dexterindustries.com/forum/?topic=brickpi-colour-sensor&paged=2#post-2743


#10

I got my Brick Pi recently. Making my way through sensor tests with Scratch. LEGO NXT Color sensor returns only Black.
I have read through some of the posts here and tried other ports. Only Black is returned. If anyone got it working in Scratch, Pl provide the code.


#11

Which color sensor are you trying to use with Scratch? Can you attach a picture?


#12

Nope, this problem is here since 2013 and still remains… I have also still the same problem like a lot of other people here, tried a lot, but failed realy hard. Everything is up to date I think but I can not check the firmware currently running on the hardware. This is the image again… https://www.brickwatch.net/nl-NL/set/9694/Color-Sensor.html

Is there a youtube movie showing the Lego Color Sensor 9694 in full operation using the BrickPi?

Here is the post of 2013 http://www.dexterindustries.com/topic/problems-with-lego-color-sensor/ and yes The topic ‘Problems with LEGO Color sensor’ is closed to new replies. Faith not restored…


#13

Pl see picture. This is color sensor that is originally part of Lego NXT 8547.


#14

Hey temecula.us, unfortunately you can see some folks are having trouble with the color sensor. We’ve been trying to troubleshoot this for a while now. I have a color sensor that looks exactly like yours, but I don’t have trouble reading different colors.

I know you’ve posted in our forums before, but I couldn’t find it; can you post a picture of your BrickPi board? I just want to have an idea of how old it is and where you got it from.


#15

Hi John, I got my BrickPi 4 wks ago directly from Dexter. The latest is: Color sensor is working with Scratch.
I did the following steps:

  1. I tried with Python. Even though the sensor was in S1, I configured S2 as well in Python.
  2. Python program started working fine.
  3. I shut down BrickPi. Gave it few min and started again.
  4. I added configuration of S2 in Scratch. Then Scratch was able to see the colors correctly from S1.
    I am not sure if there is any reasoning behind this. when I have time I may try other ports.
    Thanks a lot for your prompt responses always.

#16

Well, good to hear you got it going. But I’m sorry it was so painful. Thank you so much for letting us know the outcome.


#17

Is it true that firmware https://github.com/DexterInd/BrickPi/tree/master/Firmware_BrickPi/Firmware_2.5 is the latest? I am very eager to solve this, but just checking if this is the correct latest version.

Kind regards,
Maarten


#18

Yes, this is the latest.


#19

running into the same issue, brand new BrickPi (says v2.8 on board, firmware version returns 2).
ColorSensor-LED lights up in selected color if using specified color mode (Red, Green, Blue), but not when going for FullColor mode.
It does start working however (all 3 colors light up, haven’t examined returned values) when using the workaround found described earlier and configured port3 (where CS is attached) and port4 together for a color sensor (see http://www.dexterindustries.com/topic/problems-with-lego-color-sensor/ )

Given for FullColor mode, a much wider return value is used, and the workaround does not work if using Port 4 (or 2), I almost suspect some memory location may be out of range.
Or might be an timing issue, setting up the CS results in a timeout on my receiver side on the RPI, while all other sensors (original NXT2, some HiTechnic) work well so far. Don’t have a logic analyzer at hand to verify timings, At least I can exclude the timing issue between RPI and BrickPi, this part works reliably now after some more work, I missed the fact the CS needs somewhat more time to initialize.
Remains the issue as per above that initialization needs to be done on both port of the same Arduino, and only works if the CS is attached to the first of those ports, so my gut feeling is some address issue in the firmware for CS & FullColor mode.

If someone has an idea how to track that further down, ideas are welcome. Would be great to see this issue solved on BrickPi, also given it’s an ongoing issue for more than 2.5 years already (as per thread above and this other thread http://www.dexterindustries.com/topic/brickpi-colour-sensor/).

Maybe DI take one of the retail BrickPI kits with preinstalled FW to debug, if you else can’t recreate the issue else (with your dedicated debug board & FW??!)?


#20

Hello
Yes that would be nice and I hope DI will help also. I realy need this to be operational. I will buy a programmer for the controllers and will debug the monitor programm. I have to do this in my spare time so bear with me. Are you also able to programm microcontrollers? would be nice to make this a shared effort