<< return to Pixycam.com

White balance, RGB LED, and Arduino API

Hi,

Using Arduino, I’d like to retrieve the RGB value of the ambient light during the auto white balance and feed that into the RGB LED so that the extra light provided is the same value as the ambient light.

Turning on the top LEDs is fine, so long as the ambient light value is the same as that output by the top LEDs. If the ambient light is ‘warm’, it throws the color detection off as the Pixy approaches the object and it looses it’s ‘lock’.

I’ve also observed that when on a shiny floor, if the RGB LED being ‘on’ to the same value as the tracked object, the reflection on the floor ‘confuses’ and shows up as another instance of the tracked object, so being able to do this will kill two birds with one stone.

I hope this makes sense.

I suppose that I could buy a variety of LEDs with different CIE co-ordinates and replace the stock ones, but I’d just as soon do it all in software.

Hello,
The API doesn’t currently support getting the white balance value (sorry).

You can change the default brightness of the LED however through PixyMon, the “LED brightness” parameter:

https://docs.pixycam.com/wiki/doku.php?id=wiki:v2:pixymon_index#color-connected-components-expert-tab

Perhaps dimming it will fix/reduce the false positives you’re seeing.

Edward

Hi Edward,

Thanks for the response.

Is a change to the API in the queue?

best,
Michael

Hello,
We’ll add your suggestion to the list of feature requests. I don’t have much right now though – whether it will be implemented or the timeframe (sorry).

Edward