NXT / problem with 2 colour sensors

Discussion specific to the intelligent brick, sensors, motors, and more.
Post Reply
legojoentje
Posts: 10
Joined: 25 Nov 2010, 11:34

NXT / problem with 2 colour sensors

Post by legojoentje »

Hi,

My FLL team is running into a problem:
We're trying to make a linefollower, with 2 colour sensors.
When both see White, the robot goes straight on.
When one of them sees Black, the robot turns.

This all worked fine.

But then, well, I don't know what happened.
All of a sudden only one colour sensors works.
We checked all connections, and they work; when using View on the NXT both of them work fine (but not simultaneously, obviously)
We even replaced NXT with a spare one.
But when running the program, only one of them works (led emitting light). Sometimes the left one, sometimes the right one.

Any hints on what can be going on are much appreciated!
legojoentje
Posts: 10
Joined: 25 Nov 2010, 11:34

Re: NXT / problem with 2 colour sensors

Post by legojoentje »

I've been testing for a couple of hours this evening, and I've concluded that both sensors work, and simultaneously as well.
I've made a little state machine with nested conditions, to make 4 states in total. (All that within an infinite loop).

If the only thing in the states is a Display Block (displaying the state it is in, basically) it all works as expected.

But if I have move blocks in there as well, it seems that things get mixed up.
For instance: when sensor 3 sees black and sensor 4 sees white, it reports to be black-black!

What on earth is going on?
Are the sensors signals influenced by the motors? Is that possible?

This is sooooooooo frustrating!

Any thoughts?
loopymech
Posts: 35
Joined: 30 Sep 2010, 15:35

Re: NXT / problem with 2 colour sensors

Post by loopymech »

Can you provide some specifics about the type of color sensors you are using and the code that fails?

Cheers,
Loopy
legojoentje
Posts: 10
Joined: 25 Nov 2010, 11:34

Re: NXT / problem with 2 colour sensors

Post by legojoentje »

We're using standard LEGO color sensors from 2 NXT2.0 Retail kits.
Software in the Mindstorms programming environment that cam in the box;
Drag & drop, don't know how to share that here?
loopymech
Posts: 35
Joined: 30 Sep 2010, 15:35

Re: NXT / problem with 2 colour sensors

Post by loopymech »

Can you try posting a screenshot of the code? It's been a while since I've used nxt-g but there is also something called "pack and go" that lets you bundle the files so you can share them (...as an attachment?).
legojoentje
Posts: 10
Joined: 25 Nov 2010, 11:34

Re: NXT / problem with 2 colour sensors

Post by legojoentje »

I'll give that a go tonight!
Thnx for thinking with me!
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest