DIY sysex fader box status and questions.

Peter Korsten peter at severity-one.com
Tue May 1 23:14:09 CEST 2012


Op 1-5-2012 22:50, ToAd schreef:

> an update of the programs:
> www.thebigear.be/SDIY/sketch_may1_enc_read_v1.ino is the working code.
> www.thebigear.be/SDIY/sketch_may1_enc_read_funct_v1.ino is the sketch
> with my function in it, not working...
> I've simplified the calculation, but nothing changed to the setup of the
> program.

You can simplify the calculation more if you do something like the 
following, using an exclusive-or:

int changedA;
int changedB;

changedA = a ^ oldA;
changedB = b ^ oldB;

if( changedA && !changedB )
{
     ...
}

- Peter


More information about the music-bar mailing list