hi, i hope maybe someone can help me with a part of my patch :
i am using distance sensors going into an arduino and then into max msp.
max msp then makes sounds in relation to the readings from the sensors
the sensors are on a wall as part of an interactive painting.
when someone stands in front of the sensors they work well, and the numbers that come into max as a result are fairly steady (eg 12, 13, 15, 11, 14, 12.....etc) and max plays the appropriate sound
when no-one stands in front of a sensor they give their maximum range as you would expect and max plays a silent sample. but they also start giving fairly random readings which causes max to play sounds when no one is there.
i have tried many methods to try and stop these random readings but i am still stuck. i have tried different methods of wiring the sensors, changing the arduino code but all to no avail.
i am trying to filter out these random readings in max but have only had partial success so far.
i need to make a small patch to test the range of numbers coming in to max. if the number range is large (sensors are on maximum range and behaving randomly) then i need to stop the numbers influencing the patch but if the range is small and steady (someone is stood in front of a sensor) then i need to use those numbers in the rest of the patch.
i really hope someone can help me as im still fairly new to maxmsp and i am finding it a bit of a struggle
i am using max 4.5
many thanks in advance for any help