<< return to Pixycam.com

Custom firmware

I am using EV3. For example, I need a function which will get RGBs of pixels in a line from [x,y] = [0,100], to [x,y] = [190,100]. Then, converting it to HSV, return the number of pixels which’s Hue is in range [20-30]. I know how to write this function in Lego Mindstorms EV3, however it’s working very slow (for obvious reasons), so I want to add this function in firmware as a separate mode (or replace one of the defaults). The code for firmware will be something like this:
int count = 0;
for(int i=0;i<190;i++)
{
int Hue = getHueFromRGB( pixy.getRGB (i ,100) ); //custom function for Hue;
if (20 <= Hue && Hue <= 30) count++;
}
return count;

However, i have no idea how to do it. I know that I have to open and change the source code provided on github, compile it and update my firmware to pixy, but I need a more detailed guide for this (name of IDE, name of file with code to be changed, what e result of code compilation, and etc.)

Thanks in advance

Hello,
Here is some information on compiling the firmware:
https://docs.pixycam.com/wiki/doku.php?id=wiki:v2:building_pixy_firmware

Hope this helps :slight_smile:

Edward