Skip to content

SPIKE color sesnor keeps report green when see half black line #1760

Answered by laurensvalk
shihhaoyang asked this question in Q&A
Discussion options

You must be logged in to vote

The code you're showing looks good, I think.

When you change that loop to just print the colors, does it give you the correct result? In other words, were both of your pictures above taken with the robot in the same place?

Can you try setting the S value for black and white to 0? And perhaps increase the S value for green a bit. This should make it less likely to report green when it isn't seeing it.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@shihhaoyang
Comment options

Answer selected by shihhaoyang
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants