Arduino Mega 2560をmax mspに接続する作業をしています.Arduino2max arduinoコードとmaxパッチを適合させました。Arduino2max Arduinoメガを最大限使用するデジタルピン通信2560
私はmaxパッチを採用し、arduinoからの16個のアナログ入力のすべてをmaxに成功させましたが、最大mspに番号13以上のデジタルピンを追加することはできません。私は誰もがこれでsucsessを持っていたかどうか疑問に思っていた?
ご意見やご感想をいただければ幸いです。ここ
感謝
ジョー
は再びここにhttp://www.arduino.cc/playground/Interfacing/MaxMSP
int x = 0;
int ledpin = 13;
void setup()
{
// 115200 is the default Arduino Bluetooth speed
Serial.begin(115200);
///startup blink
digitalWrite(13,HIGH);
delay(600);
digitalWrite(13,LOW);
pinMode(13,INPUT);
}
void loop()
{
// Check serial buffer for characters
if (Serial.available() > 0){
if (1){ //Serial.read() == 'r') { // If an 'r' is received then read the pins
// Read and send analog pins 0-15
for (int pin= 0; pin<=15; pin++)
{
x = analogRead(pin);
sendValue (x);
}
// Read and send digital pins 2-53
for (int pin= 2; pin<=53; pin++)
{
x = digitalRead(pin);
sendValue (x);
}
// Send a carriage return to mark end of pin data.
Serial.println();
// add a delay to prevent crashing/overloading of the serial port
delay (5);
}
}
}
// function to send the pin value followed by a "space".
void sendValue (int x){
Serial.print(x);
Serial.print(32, BYTE);
}
感謝を見つけることができますArduino2maxのV.5から適応Arduinoのコードです!
を依頼することを躊躇しませんMax/MSP "これはArduino全体に相当するので、なぜそれ以上のことができると思いますか? – gbulmer
Arduino2MaxホストのPC側をハックして値を増やす必要があるかもしれません。あなたはそれを試みるのに十分自信がありますか? – gbulmer
ありがとうございます!私は16のアナログ入力と54デジタルのメガ2560ボードを使用しています。これまで私は16個のアナログ入力をすべて受信できましたが、最大12個のデジタル入力しか受け付けられませんでした。 – JoeMel