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!
NXT / problem with 2 colour sensors
-
- Posts: 10
- Joined: 25 Nov 2010, 11:34
Re: NXT / problem with 2 colour sensors
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?
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?
Re: NXT / problem with 2 colour sensors
Can you provide some specifics about the type of color sensors you are using and the code that fails?
Cheers,
Loopy
Cheers,
Loopy
-
- Posts: 10
- Joined: 25 Nov 2010, 11:34
Re: NXT / problem with 2 colour sensors
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?
Software in the Mindstorms programming environment that cam in the box;
Drag & drop, don't know how to share that here?
Re: NXT / problem with 2 colour sensors
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?).
-
- Posts: 10
- Joined: 25 Nov 2010, 11:34
Re: NXT / problem with 2 colour sensors
I'll give that a go tonight!
Thnx for thinking with me!
Thnx for thinking with me!
Who is online
Users browsing this forum: No registered users and 3 guests