Hello, I have an arduino MEGA connected to a touchscreen, 2 rotary encoders and 12 buttons via GPIO. On the other side I have a Raspberry pi 3B+ with a HifiBerry DAC+ADC running pure data. I want to use the Raspberry as a sampler/synth and arduino as a controller AND a GUI. What I do understand is that there are 2 ways to interface arduino with raspberry (GPIO and USB).
GPIO (Rx Tx) would be perfect as I already done that between two arduinos interfaced with a custom made protocol, however the Hifiberry HAT is sitting on top of all Raspberry GPIOs. I guess I could use cables between the pins that Raspberry and HifiBerry need to talk to each other, thus freeing up the Tx and Rx pins of Raspberry (Hifiberry does not use them).
Second option, USB, is even easier regarding hardware connections, just plug-in the USB cable and Raspbian detects the arduino. What I do not understand is how to interface arduino with PureData. I would really like to avoid PDuino and Firmata, as it would be extremely difficult if not impossible to use the touchscreen this way. My project requires: 1. reading a specific folder from the Raspberry file structure and desplaying it to the Touchscreen so that the user can choose which soundset is going to be used 2. sending a command from the touchscreen to save PRESETS on the raspberry 3. sending PLAY/STOP/VOLUME/PITCHBEND/etc commands to Puredata.
Can anyone guide me please? Thank you