Arduino using Maxiuno and Max - problem with analog inputs

edsonedge's icon

I am using maxuino an arduino mega, some pressure sensors hooked up to it, and Max msp

I get a reading in max from the pressure sensors: a float from 0. to 0.99

then i connect the floatBox to [if $i1 > 0.01 then out bang]

the bang sets of a drum sound

but when I press the pressure pad, even though the float box goes way up close to 1. I still get no bang from it

The wierd thing is that If I use the mouse to drive the same floatbox up it sends a bang

It seems like Max doesnt want to listen to the float box if it is connected to arduino

Anyone?

Best regards.

Max Patch
Copy patch and select New From Clipboard in Max.

Here is an example of how this is connected

ch's icon

Hi,

I haven't look at your patch, but the issue is probably that
you wrote [if $i1 > 0.01 then out bang] instead of [if $f1 > 0.01 then out bang].
Also, I personally prefer to write it that way : [> 0.01] -> [sel 1]
but it's maybe just a matter of taste :)

edsonedge's icon

I thought "i" just stood for "input"

Silly me :)