Go Down

Topic: Arduiono2Max No data recive in Max (Read 1 time) previous topic - next topic

betty

Hey
We use Arduino2Max (for analog sensor input) but we don't get the data in Max
Arduino reacts (RX blink)if we start the Max patch, but there is no reaction in the reading analog numberboxes(Max)....
We selected the right usb port(there was no reaction on the arduino before) but it didnt help....
:'(
Help us please................................

Greez from Switerland

Daniel

#1
Feb 01, 2007, 05:58 pm Last Edit: Feb 01, 2007, 05:58 pm by Daniel Reason: 1
check your port in MAX ( a, b, c ?). It is a bit finicky, but it works.

Also, did you install TOF's Simple Message System Library before burning the Arduino with code ?

betty

I changed the port to b(ubs....) and installed the SimpleMessage.. in the targets library, but it still doesn't work
The reaction of arduino shows me that Max is reading the data but it doesn't show it.....
I really don't know what else to do...... :-[

Maybe one of the max messages doesn't work
but i don't know which one is responsable to read the message.....

.......

Daniel

#3
Feb 02, 2007, 06:58 am Last Edit: Feb 02, 2007, 07:05 am by Daniel Reason: 1
What kind of computer are you using?

Anyway Arduino2Max is due for a little update, so I will fix it up in the next few days.

D

betty

Maybe i need to send the string without commas or add a 13(to let Max know, that the string is over).... i'll check it out....
greez

DDubs

I am having the same problem with serial analog data from sensors into Simple Message System or Arduino2Max, except I discovered it's because the new Arduinos I ordered from SparkFun came with ATMega168 chips intead of the regular ATMega8 chip.  I changed the Microcontroller setting to 168 before uploading but I still can't get these Arduinos working with the Msx.MSP patch.  My older (2-month old) ATMega8 Arduino works fine.  Please help!  Deadline looming and no Max data to be found!  I don't want a faster chip, just for my code to work seamlessly.

Thanks,

darcie.watson@gmail.com

Daniel

hi

Sorry to hear you are having trouble... a month or so ago, TOF released a new version of SMS and I haven't had the time to check what effect this has had on Arduino2Max. It will be a few weeks before I can... In the meantime, let us know what you figure out.

It sounds to me like you must have done something different the second time around, with the 168's. What's the difference? If it works with the Atmega8's, then why not with the 168's?

PS: You only need to post a topic once in the forum-- posting in two sections is considered spamming.

DDubs

Really, I did nothing differently because I've only been working with one SMS Arduino code, one SMS Max patch and one SMS Processing.org file.  To test last night  I reloaded the old arduino and it worked fine, but when I loaded the same code on the new Arduinos I get no serial data in either Processing.org or Max.Msp.  Also tried with and without the correct Microcontroller setting (168 or 8).   I tried it with the old TOF SMS, then downloaded the new SMS with the same results.  LED Blink code works tho.
SparkFun Support said:
"We've been notified that the rev 'C' board acts a bit differently. I'm not sure about the specifics but the Arduino Support forum should be able to help. Sorry I couldn't be more help!"
I'll keep trying to find the reason, I'll let you know.
Thanks!
sorry about the double post!

Daniel

#8
Feb 09, 2007, 08:58 pm Last Edit: Feb 09, 2007, 09:13 pm by Daniel Reason: 1
hi

sounds like you are in the best position to solve it... I can't think of anything else that might have gone wrong.

So you are back to the age-old, tried-and-true method of troubleshooting: persistence.

You might want to figure out where the communication stops. Here are two simple ways to locate the point where that point is.

On the Max side: put some print statements ( after the serial object) in the Max patch to see if you are really not geting anything back.  

On the Arduino side: to test if data is being received by the Arduino, add this to the  Ardunio2max code:
// an LED connected to pin 13 and this code tells us if Arduino is receiving control codes from MAX.
digitalWrite(13,HIGH);        
delay(500);
digitalWrite(13,HIGH);
delay(200);


so that it looks like this:

Code: [Select]

  if (messageBuild()) { // Checks to see if the message is complete
     firstChar = messageGetChar(); { // Gets the first word as a character

    if (firstChar = 'r') { // Checking for the character 'r'
         secondChar = messageGetChar(); // Gets the next word as a character
         if (firstChar = 'd') // The next character has to be 'd' to continue
              messageSendChar('d');  // Echo what is being read

// an LED connected to pin 13 and this code tells us if Arduino is receiving control codes from MAX.
digitalWrite(13,HIGH);        
delay(500);
digitalWrite(13,HIGH);
delay(200);

      for (int i=0;i<=5;i++) {
      messageSendInt(analogRead(i)); // Read analog pins 0 to 5
         }

      for (int m=2;m<=13;m++) {
      messageSendInt(digitalRead(m)); // Read digital pins 2 to 13
         }
           

      messageEnd(); // Terminate the message being sent
      delay(100);



d

Go Up