Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
167 views
in Technique[技术] by (71.8m points)

python - TCS230 color sensor not working propperly on RPI3. way to high values?

Jan, Im not new to programming but im a noob.

A little background So im making a color sorter that can sort skittle/M&M etc. by color. To detect the color i use a TCS230 color sensor. which i setup with this guide. (https://www.electronicshub.org/raspberry-pi-color-sensor-tutorial/)

The Problems On that page are 2 codes 1 is raw colors and 1 is color detection. I get the raw color to work but it outputs/print values that are way above the 20000 some even 37000. and the other code the color detection code keeps giving me errors telling me

"runtimewarning: this channel is allready in use, continuing anyway. Use GPIO.setwarnings(false) to disable warnings. GPIO.setup(s2,GPIO.out)"

What I tried

So since both codes are bassically the exact same and raw color doesnt give a warning I compared them to see if anything is diffrent or maybe a typo was made. But no they are the same exept for 1 line but i dont think that causes it.

And for the problem that i get to high values. I had no sollution.

I tried to find other sites covering this sensor and a raspi but i couldnt find 1. i also checked for just a color sensor and pi so a bit less specific but no luck.

So I hope i explained it as good as possible. im currently stuck because i dont know how to convert raw values to rgb and i get errors.

i hope anyone can help me get this project done.

Kind regards Gert-Jan

question from:https://stackoverflow.com/questions/65927884/tcs230-color-sensor-not-working-propperly-on-rpi3-way-to-high-values

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...