HELP - How to make a pressure sensor function as a button in my patch?

Hey vvvv freinds :)

I uploaded a patch a while ago on this forum and im still patching on it.
I got some help to construct a patch caoable of playing random samples when random toogle buttons was pressed. what I really want to do, is to make an external pressure sensor work as a button instead of a toogle button inside vvvv. I have the arduino application + an arduino with an analog sensor attached throuh analog inn… + I have the firmata also… I have uploaed standard firmata to my board and connected the sensor. Im not sure how to expand my patch? As you can see I have the arduinofirmata node in my patch… the sounds goes crazy when I enable the node. can some one please give me a some advice on how to use a pressure sensor as a button to trigger the sounds in my patch

4_4 mine.v4p (6.2 kB)
4_4 mine.v4p (6.2 kB)

please edit your post and avoid spaces at the beginning of a line, it will make a code line which breaks formatiing. use the ‘*’ at the beginning of a line to make a list…

About arduino, before rushing to firmata youcould try to read simple serial messages you can script in your sketch. There are several versions of firmata and several patchs. Firmata is not really easy to handle and this known not to work with every version of firmata and vvvv. Try a search you will find this is notreally simple. Aniway, if you want to use firmata first try your script with the firmata exe to have the clue your sketch is ok, before going inside vvvv