hello.
I'm trying to adapt a code that a friend helped me to do in processing to arduino. The code is basically changing the colors of a background in processing and doing some fades depending on the keys pressed. In the arduino I'm getting the colors from the database using the wifly shield and some inputs of the accelerometer.
the problem I'm gaving now is that one of the functions of the processing code my friend did is returning an array
int[] get_colour(int side)
{
int[] value = new int[3];
if (side == 1) {
value[0] = 255;
value[1] = 0;
value[2] = 100;
}
the way you declare arrays on arduino is different so my guess was to do this
int get_colour[](int side)
{
int value[] = new int[3];
if (side == 1) {
value[0] = 255;
value[1] = 0;
value[2] = 100;
}
but I'm getting the error " declaration of 'get_colour' as array of functions"
which makes sense.... but how can I make that function return this array of value?