Switch on/off a toggle in Max using digital input


I'm doing a uni project in which I need to trigger sounds in Max using objects. I've got a Max patch connected to Maxuino, and now I need to switch on and off manually (not clicking on the screen) the toggle that activates the sounds in Max.

I have in mind using aluminium foil and jogurt pots. The aluminium foil would be sticked on the bottom of the pot. So when I put an object in the pot, this touches the cables that would activate the circuit (GND + pin number). When the circuit is activated, it should turn the toggle on in Max, so the sound would sound.

Mi question: how do I switch on the toggle in Max? Do I need resistors? Is there any specific electronic circuit for this, or is just a simple circuit?

I'm a begginer on this, so I would very much appreciate any kind of help.


You need to sense these things on the Arduino. When you detect an event you send a serial message over to max. At the max end you receive this serial message and activate what you want.

This link should get you started :- http://playground.arduino.cc/interfacing/MaxMSP

Thanks! I'll check the link out and try it again. :)

You can look up capacitive sensing, resistive sensing, ultrasonic (sonar) sensing, reflected IR, passive IR (PIR), heat sensor, IR beam interrupt, piezo touch sensor, load (weight) sensor, microphone if it makes sound, light detector, color sensor, magnet sensor, or whatever else you know the physics to turn into electric flow.

Click on Input to find the example projects complete with example code. http://playground.arduino.cc/Main/GeneralCodeLibrary