Pages: [1]   Go Down
Author Topic: arduino uno & max msp connection  (Read 2089 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 16
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

hi
How to connect  analog sensors sharp GP2Y0A21YK+ arduino uno + MaxMSP ?



Logged

Gosport, UK
Offline Offline
Faraday Member
**
Karma: 21
Posts: 3113
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Some wires between the sensor and the Arduino, and a USB cable from the Arduino to the PC.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 16
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

which can I use the example in arduino software ? ( for max test analog freq ) and Is there a sample max msp patch ?
Logged

Gosport, UK
Offline Offline
Faraday Member
**
Karma: 21
Posts: 3113
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I don't know. Where have you looked? Did you try searching this site? Did you try google or bing or whatever search site you use?

Try here http://arduino.cc/playground/Interfacing/MaxMSP for a start.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 16
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

i downloaded arduino 2 max but Error adding cod is pde on arduino software ( serial BYTE )

http://f1203.hizliresim.com/v/y/3y3qb.png


Logged

Gosport, UK
Offline Offline
Faraday Member
**
Karma: 21
Posts: 3113
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The error message is quite descriptive. Find the Serial.print() statement containing the BYTE keyword and replace it with a Serial.write() instead.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 16
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

how can i Find the my Serial.print() ? sorry i beginner user 
Logged

Gosport, UK
Offline Offline
Faraday Member
**
Karma: 21
Posts: 3113
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

You could try Edit>Find... in the IDE, or you could just look for it.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 16
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

my arduino max pde :


 /* 
 *  Arduino2Max
 *  Send pin values from Arduino to MAX/MSP
 * 
 *  Arduino2Max.pde
 *  ------------ 
 *  This version: .5, November 29, 2010
 *  ------------
 *  Copyleft: use as you like
 *  by Daniel Jolliffe
 *  Based on a sketch and patch by Thomas Ouellet Fredericks  tof.danslchamp.org
 * 
 */


int x = 0;                              // a place to hold pin values
int ledpin = 13;

void setup()
{
  Serial.begin(115200);               // 115200 is the default Arduino Bluetooth speed
  digitalWrite(13,HIGH);              ///startup blink
  delay(600);
  digitalWrite(13,LOW);
  pinMode(13,INPUT);
}



void loop()
{

if (Serial.available() > 0){         // Check serial buffer for characters
       
    if (Serial.read() == 'r') {       // If an 'r' is received then read the pins
   
for (int pin= 0; pin<=5; pin++){      // Read and send analog pins 0-5
    x = analogRead(pin);
    sendValue (x);
    }



for (int pin= 2; pin<=13; pin++){     // Read and send digital pins 2-13
    x = digitalRead(pin);
    sendValue (x);
    }
 
    Serial.println();                 // Send a carriage returnt to mark end of pin data.
    delay (5);                        // add a delay to prevent crashing/overloading of the serial port
 
  }

 }
}

void sendValue (int x){              // function to send the pin value followed by a "space".
 Serial.print(x);
 Serial.print(32, BYTE);
}

Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 16
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

please can you put them cod and save give me please cod ? because i don't find I do not know what to do thanks
Logged

Gosport, UK
Offline Offline
Faraday Member
**
Karma: 21
Posts: 3113
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

There is one occurrence of a Serial.print() with the BYTE keyword in it.

Replace it with
Code:
Serial.write(32);
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 16
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

ok done compling thanks, but after clicked I run max msp and (Arduino2MaxNovember2010_V.5) patch. toggle click COM 2 how can i do that now because my sensor is does not eork right now ?

Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 16
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

i changed com 2 to bluethoot pda sync  and analog input ra0 ra1 ra2 ra3 ra4 ra5 its is work very fast number changes. is it connect arduino to max ? ( my sensor put on the ardunio analog signal A1 )

Logged

Gosport, UK
Offline Offline
Faraday Member
**
Karma: 21
Posts: 3113
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Does your Arduino have Bluetooth?

I don't know anything about Max.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 16
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

No, i connect COM 2
Logged

Pages: [1]   Go Up
Jump to: