Arduino2Max frustration


    Jun 24 2007 | 9:41 pm
    So for a couple of weeks now I have been trying to make Max talk to my Arduino. The frustration is that Max is obviously seeing the board as the red upload light flashes when i start the Arduino2Max patch. But nothing else will work. I cant receive any digital input or send any digital out.
    I'm working on a Mackbook Pro with Max 4.6. As far as I know I have installed all the drivers.
    I have run out of ideas about what to try next - any suggestions would be great.
    Thanks

    • Jun 27 2007 | 7:17 pm
      Are you able to get the arduino board to talk to the arduino enviroment and successfully upload code to it - this would confirm that you have all the drivers installed etc..
      If you have then make sure you are not running the arduino enviroment and the max patch at the same time as the board can only talk to one at a time.
      You need to configure the max patch to ttalk to the correct serial port, and at the correct speed.
      Are these a ll things that you have already done?
      HTH
      Nick
    • Jun 28 2007 | 7:00 am
      Thanks for the response.
      Yeah Ive got Arduino working fine from the Arduino environment - load code etc all works.
      I figured that I needed to quit Arduino for MAx to communicate but still no joy.
      Im pretty sure I have MAX configured to the correct port as I can see the red light flick on and of whe I hit Start in the arduino2MAx patch. But nothing else happens.
      But speed? I presume here you mean the baud speed rather than the metro speed controls in the setting of Arduino2MAx.Should I be changing that in the DSP Sample rate or is there something else I am missing?
      Thanks for your advice.
    • Jun 28 2007 | 7:24 am
      If you click on the serial port settings in the max patch then you get a subpatch opening where you need to configure the patch for the serial port on your machine, the serial port object should be a the correct speed if you are using the arduino file that came with it, but it is set to port e, which maynot be where it is on your machine.
      In the blue section of the patch you click on the print serial ports to max window bang, and this will give you a list of devices with letters.
      You then nedd to replace the letter e with the correct letter for your machien.
      You also need to set the sample rate in the slider at the top of the patch to more than zero.
      HTH
      Nick
    • Jun 28 2007 | 9:21 am
      We yeah thats what my feeble brain had deduced. But no joy.
      I figure that I have done all that right as I can make the red Arduino light switch on but the inputs/outputs dont do anything which makes the whole thing pretty pointless unless your into making red leds blink!
      Any other thoughts would be fantastic as I am just about to give up and get a MAKE control.
      Thanks
    • Jun 28 2007 | 9:33 am
      Did you try pressing the little reset button on the Arduino before initiating Max communication?
      jb
      Am 28.06.2007 um 11:21 schrieb James Charlton:
      > > We yeah thats what my feeble brain had deduced. But no joy. > > I figure that I have done all that right as I can make the red > Arduino light switch on but the inputs/outputs dont do anything > which makes the whole thing pretty pointless unless your into > making red leds blink! > > Any other thoughts would be fantastic as I am just about to give up > and get a MAKE control. > > Thanks
    • Jun 28 2007 | 9:47 am
      James,
      i have an arduino board and got it to work with max, the thing is that it wasn't that easy to get it going. I eventually did everything in processing because I had some real timing issues with the serial communication.
      If you have some time I would be more then happy to try to get it to work again, but I have no time whatsoever this month (just two more days) Although I'm pretty sure the makecontroller is a nice kit I can easily say the same of the arduino board.
      Could you (maybe off list) explain me what you exactly wanne do, so I can mimic the setting here and see if we can crack the code together?
      Best Regards
      Pieter
      On 28 Jun 2007, at 11:21, James Charlton wrote:
      > > We yeah thats what my feeble brain had deduced. But no joy. > > I figure that I have done all that right as I can make the red > Arduino light switch on but the inputs/outputs dont do anything > which makes the whole thing pretty pointless unless your into > making red leds blink! > > Any other thoughts would be fantastic as I am just about to give up > and get a MAKE control. > > Thanks >
    • Jun 28 2007 | 9:52 am
      Well if I hadnt I have now and it hasnt made any difference.
      Maybe im expecting too much. Im thinking that a push button in say digital in 7 should flash on the corresponding led on the MAX patch from r d7. or that if i switch that to be s 13 i should be able to make the led in pin 13 come on. Is that asking too much?
      For now I will just sit here and switch the TX light on and off!
    • Jun 28 2007 | 12:30 pm
      yes thats pretty much how it should work.
      I would write an arduino file that flashes the leds connected to the board if you press the switch on the board, to check that all your wiring up is correct, as the messages maybe being sent, but if the wiring is wrong you won't see a response.
      Once I had confirmed that the lights and switches physically worked, move on to looking at the possible issues with the boards communication with max.
      I don't have it hooked up at present to double check, but I would expect the rx led on the arduino to be flashing at the speed that you set the sample rate (it asks the arduino board to send info each time) and the tx led to flash straight after as it replies (if the sample rate is high it will look pretty much like both leds are just on).
      HTH
      Nick
    • Jul 04 2007 | 9:44 pm
      Interested to see how you're coming as I've just gotten my own Arduino. I was able to get things up and running pretty well, though with a couple caveats. Hope these answer some of your troubles, though I'm not really sure what your status is at the moment.
      I'm on Windows, I don't know if that makes a difference with all this.
      First: If Windows -- make sure you have the updated serial object, there was a "read timeout" problem with the old one. I think it's included in 4.6.3.
      Second: You can't have Max connected to the same COM port when you try to upload the Arduino code (you'll see an error in the Arduino environment). Just change the port of the serial object in Max to something else before you upload, then change it back to test. This also goes for Hyperterminal or other serial-using programs you might be using. (BTW using one of these may be handy as a first step towards getting info into Max... at least you can see if your machine is getting the data, then tackle the Max-specific issues.)
      Third: I had some issues formatting the outcoming data from the board---i.e., I wanted value 10, but serial would spit out "49 48" (ASCII equivalents). The easy fix was to specify the values coming out of the board (in the Arduino code) as BYTE, so,
      Serial.print(i,BYTE); // where i is the variable value you want
      ...then serial spits out the integer as desired.
      Finally: I haven't delved into too much in the way of potentiometers, photoresistors, switches, etc. I'm sure there'll be more issues as I try them out. I'd be curious what you're using the board for and what elements you've gotten to work. I will say that for the price this board and environment is pretty slick, particularly being USB-powered.
      Here's a mini-patch that might make setting the COM ports and reading the serial output easier:
    • Sep 17 2007 | 10:37 pm
      hi
      I recently updated the Arduino2Max code... see this link: http://www.arduino.cc/playground/Interfacing/MaxMSP
      It works great with the latest Max, a Diecimila Arduino and OSX 10.4.10.
      Quote: "Im thinking that a push button in say digital in 7 should flash on the corresponding led on the MAX patch from r d7. or that if i switch that to be s 13 i should be able to make the led in pin 13 come on. Is that asking too much?"
      Yes. It doesn't, and never did, control the ouputs. It's only written to read the inputs.
      A few more notes:
      - Arduino2Max is not a commercial package, but rather it's a free hack for using Arduino with Max. It works, but you know, there is no suppport, user beware etc. Also, you're not allowed to be 'frustrated' if the product is free. It bums out those who made it free in the first place. :)
      - Arduino is an experimental hardware package for artistic, education and hobby applications. As such the software and hardware are all works in progress; think of it as 'straight from the lab', rather than off-the-rack, or in 'permanent beta'. It's a hardware hacker's platform.
      - You might find that you can get more support and advice for the hardware side by going to the Arduino forum.
      - There are lots of alternative packages (Pduino, Firmata) for using Arduino with Max; check this page under the heading "MAX" http://www.freeduino.org
      Hope this helps.
      Daniel