Hi, I think there was a problem in your arduino code:
you did the testing against the address outside the while loop, so you will only have access to the latest message. The point of the while loop is that it will keep reading new OSC messages till the buffer is empty. So do your matching *inside* the while loop, right after a new message has been filled. Also, since your if clauses are mutually exclusive, you should do 'else if', so it will stop testing once you got 'true'. I attached a corrected version. You can try it and see if it works now. Unfortunately I couldn't test it myself.
I also did an optimized version, where I made an array fad[0] which gives you more flexibility and lets you do the matching with a simple for loop instead of chained if clauses. Again, not tested.
For this kind of application, you probably wouldn't need OSC. The question how to handle the bitshifting in a MIDI style protocol has already been answered in this thread ;-)
https://lists.puredata.info/pipermail/pd-list/2016-06/115160.html
Christof
Gesendet: Donnerstag, 16. Juni 2016 um 22:58 Uhr
Von: "Martin Peach" <chakekatzil@gmail.com>
An: "pd-list@lists.iem.at" <pd-list@lists.iem.at>
Betreff: Re: [PD] Pduino sysex vs. OSC advice