Need help with using data from arduino the right way (I dont have arduino problems!)

sklepp bass's icon

Hello, Im using Arduino to get values from sensors into max and I need help with using these values in the right way. I have a MPU6050 and a 20step rotary encoder with pushbutton. I want to use the x and y values to control fx and filter and I use the rotary encoder to recreate a vinyl like effect.
Getting the right values into max works, and the rotary encoder already performs the way I want it to. Its just the gyro with the effects. Can someone take a look at my max patch? I just started 2 weeks ago so I think you dont have to be a pro pro to be able to help me :) In the max patch I put comments with descriptions of what the elements do and should do! Thank you so much!

using 3 arduino serial prints to influence sound.maxpat
Max Patch

TFL's icon

Nicely commented patch! Seems like all you're missing is the [split] object. For example [split -100. 0.] will make everything between -100. and 0. output from its left outlet, while everything outside of that range will output from its right outlet. This, a bit of scaling, some logic for the filter and you should be good.