Hello everybody, any1 could tell me why Max dont recognize the input from arduino?!?!
When I press one of three buttons on the board, if I check the console, it gives me 1023 and the other 0. example, if I type the first and the last button on the board, the console returns me 1023, 0, 1023. so I assume that the Arduino is right, what I do not understand is why the part about "Max" does not work.
If anyone could help, I would only get a bang when I hit one of the three pins, I’m not interested in max tutorial I linked, it is only for reference.
Hardware / software
last released max (demo)
const int redPin = A0; // sensor to control red color
const int greenPin = A1; // sensor to control green color
const int bluePin = A2; // sensor to control blue color
----------begin_max5_patcher---------- 1524.3oc2ZsriaaCEc8LeEW3MoEvwgTTR1p6FjfhNK5llfroSPAsDsG1HQ5R QmLSBx+d4C4DmIxwh1RJOfArrnoIO7vy8Auxu+xKlrTdGqdB7aveCWbw6u7h KbMYa3hl6uXRE8t7RZsqaSDr2JW9uSl5+JM6Nsq4m.w6ZSrsRtUWxzte.to0 URgVPqXtdekhSK20eem02ug4wwDtvLluZueWM+ctuCGMC0zLuvMPFn73nj8l YtX2DG0z3FpN+VtX8+nX4Z+LDmRLCDjfmauPhlkLEhPyPvqr+jOb4k12l9iK gDGLgf+4lPHgRHj9TgjKqpXFD+PF4kbkdKsDxkkRETwuiotQbi3E2xqAGl.M 80rZfB0ZkAeSM8Tnobg4yf9VEiA1gl93Z1FphpYEvUO+oWeMrRppnZ68l06R lpFVojU.BzR.ihHSg2x02ZF2bpxvyqYfho2pD.UT.kbAaEy7aoZyjv.lnXF. WqsS9aXJcsqUOhrCnGHlcD1Z6LYGhs0LWupreeMyONKo4udsRt078tE7L6ZE xULGvifmwxMTLJ0z3x6gmQeC2rblA+IqrjWeinRVvWwM8DGCWsQY6Z1MBSOe dtTqgemqemY9okEND7Byx850R1NN2tnxMysi3w3V0gnipCOtRiD0pRCeXkVB IyJwRScBsrE1K3jE8qsWMqzLgFA.tcSPR3lfKoh0Sl9oqgXORPgxRjENCQbL xQV1Qs+sGyK44uFtkoXVcadorl405LKS.ajJ8jAS4DkFJmDO2SCYXOajNBjh bCSLhbx7SkSRS5CNoh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x9Lir+uyRQ1KDSZD6t6bQa1PfVrGsKVrOZs2ctdOvC.ZIYodXh2C st6NSzR5jutwMlfCS3iwfYe+YESBzaGYWYJa9yt31ic2clncdW1TGWWycwFd byZD2EoeV36nVKyT2olHywe7t9.rQ8LXaf2Bz9fcA5KNp2ke3x+WneXRi -----------end_max5_patcher-----------
try the Arduino patch from the toolbox? you may have missed a setting somewhere, it’s finicky.
also be sure you’re not asking for the serial from another program (close any open connection) when you ask for it from Max. check for error messages.
mhhhh what should i do whit sensorbox? just just attach the usb to my computer launch arduino code launch max code and press start->print->99?
if yes i guess i’ve missed something because nothing is appening
In order to use the SensorBox patch, you’ll need to load the SensorBox firmware on your Arduino board. Note that the digital pins are configured (internal pullups on) so that when connecting switches, you should connect them to ground. When starting up the patch, be sure to click ‘print’ message to get a menu with currently connected serial devices, and select your arduino board from that menu. Once that is done, click the 99 and turn on the toggle to get the whole thing rolling. You will know it’s working because usually the analog sliders will move around when you turn it on.
I thank you for the swift response, but I think I have big problems right now because every time I plug in the Arduino and use your program, the keyboard and trackpad of my macbook crashes and I have to turn off the computer by pressing power (which he asks me "want to turn off the machine" but could not move my mouse, I’m putting in a brute). however, during testing analog pins are moved, a few millimeters, only the last 3. I believe that it should not be to the final result.
Regarding the ‘Virtual Color Mixer’ example, as seejay mentioned, make sure you don’t have another application open using the serial port (like the Arduino IDE). Also, check and see that your board is showing up on port "a" (when we made the examples, they defaulted to that on OSX).
One other thing to bear in mind, the Arduino firmware software needs to wait about 5 seconds after a serial connection is established to start sending/receiving data.
Rereading your initial post, I just want to make sure you’re actually toggling the qmetro at the top of the patch, without that, you’ll get nowhere.
As far as getting a bang when pressing a button, a [sel 1023] would work, but you may want to move your buttons to the digital pins for the most reliable results.
thanks for the reply Scott,
following the step by step what you told me I could run arduino and Max together, the problem is that after several attempts, trials, tests, drivers on my mac crashes when I try to open the doors to up, preventing me to use the trackpad and mac keyboard, seeing forced to use the single button still works, that is the power button to force shutdown. What should I do? I found a guide that says to remove the drivers and put them back but it goes back to 2008, I think the solution is somewhere else. the process that I follow is as follows.
1) active arduino
2) through the software I load the firmware
3) I check the connections and inputs are correct
4) I close my arduino software
5) I open max msp (Virtual Color Mixer)
6) I press print
7) wait for 5 seconds
8) I press "port a"(again, if it has not crashed already)
9) and if it is not crashed, it crashes
I hope you can help myself.