Quantcast
Channel: Pimoroni Buccaneers - Latest posts
Viewing all articles
Browse latest Browse all 53886

Flotilla Colour cannot see all three color components

$
0
0

There's actually a 4th channel on this, and most RGB colour sensors, which is usually called something nonsensical like: "clear".

It represents the unfiltered light level, so normally you can do something like: red/clear, green/clear and blue/clear to get each colour channel as a ratio against the total light level.

It works considerably better than the clamping method, although I've dropped that code from the dock now so Rockpool, or the API, can apply whatever scaling/logic they see fit.

Temperature is an interesting one- it outputs a value in degrees C, but to scale that into Rockpool-speak I need to set a low/high bound. It makes it possible to do an in-your-head conversion, but where possible/sensible Rockpool will show real-world values anyway.

It isn't so much that the range is fuzzy, since it's generally given as a 16bit signed or unsigned integer ( IE 0 to 65535 ), and thus has an absolute minimum and maximum bound, but quite often a great deal of the range is useless and unnecessary- you'd be hard pushed to measure something at 300 degrees C for example :D

Similarly, maxing out the light level involves shining an LED right into the sensor, and the range varies depending on ambient lighting conditions in the room- making Rockpool make sense is... tricky!


Viewing all articles
Browse latest Browse all 53886

Trending Articles