DIY sysex fader box status and questions.

ToAd tom.adam at thebigear.be
Tue May 1 21:57:43 CEST 2012


Hello,
Got the first 4 pot's working now. (Well, one tiny thing needs fixing, 
it counts 0-3-6-9-12... but that's an easy fix.)
But something else got my attention right now.
How does one make a function with these variables:
byte ByteA1;
byte Byte A2;             // - input of the function
byte ByteB1;
byte ByteB2;            // - input to the function, but also changed 
during the function and than also an output to the function
int ArrayA1[4];
int ArrayA2[4];        // - output of the function
int ArrayB1[4];
int ArrayB2[4]        //- input to the function, but also changed during 
the function and than also an output to the function

//  something in the way of:
int functionname (byte A, byte B, int B[], int & A[])

int functionname (byte A, byte B, Array B[], Array A[])
{ // - Do something with the bytes and arrays
}

void loop()
{
int functionname (byte ByteA1, byte ByteB1, int ArrayB1[], int &ArrayA1[]);
int functionname (byte ByteA2, byte ByteB2, int ArrayB2[], int &ArrayA2[]);
}

I don't even know what to google ;-)

Anyway,
www.thebigear.be/SDIY/sketch_apr29_enc_read_funct_v2.ino
is what I came up with. Compiling, but not working.

Here's the sketch with the "function" in the main loop. This is working 
code ;-)
www.thebigear.be/SDIY/sketch_apr28_enc_read_v4.ino

I start to wonder how many times one can write a program into an arduino...

And I got me a book, now I have to read it...

Any help appreciated!
ToAd


More information about the music-bar mailing list