Forums > MaxMSP

read from usb-port (connected with arduino-board)

January 10, 2007 | 9:47 pm

hi there.

my 2nd entry.
i try to read data from my usb-port, which is connected with an arduino board.
to get into this "reading from arduino" i programmed the board like this:

void setup()
{
Serial.begin(9600);
}
void loop()
{
Serial.println( char(65) );
delay(1000);
Serial.println( char(77) );
delay(1000);
}

so every second i receive an issue either "M" or "A" (just to have 2 different values), which i can read on the serial monitor in arduino. but how can i receive those values in max? which object do i have to use?

i have read about (in this forum as well) the simple message system and i have installed it. but doesnt it work without this?
can’t i handle the arduino board, like something that sends values via usbport, which i can read in max?
i use a powerbook g4, Mac os X 10.4.3

thank you for patience. i am relatively new to both programs


January 10, 2007 | 10:22 pm

hi there,

its quiet simple with the serial object – just look for the help – and
for reading the ascii code
there is an object called itao which translate the ascii code into A-B
1-9 and so on – if you only
have two values its no problem – otherwise google for arduino meets
processing – there are
some samples which use processing to translate the ascii data – and with
udp library you can
send the data from processing to max – this is the way i did it when i
used more than one
sensor

greets georg

ivo schrieb:
> hi there.
>
> my 2nd entry.
> i try to read data from my usb-port, which is connected with an arduino board.
> to get into this "reading from arduino" i programmed the board like this:
>
>
> void setup()
> {
> Serial.begin(9600);
> }
> void loop()
> {
> Serial.println( char(65) );
> delay(1000);
> Serial.println( char(77) );
> delay(1000);
> }
>
>
> so every second i receive an issue either "M" or "A" (just to have 2 different values), which i can read on the serial monitor in arduino. but how can i receive those values in max? which object do i have to use?
>
> i have read about (in this forum as well) the simple message system and i have installed it. but doesnt it work without this?
> can’t i handle the arduino board, like something that sends values via usbport, which i can read in max?
> i use a powerbook g4, Mac os X 10.4.3
>
>
> thank you for patience. i am relatively new to both programs
>
>
>


January 10, 2007 | 11:43 pm

hi again.

i was looking at the help file of the serial object.

the arduino-board still runs the programm i described in my 1st entry. when i press the "print" message in the help file of the serial-object i receive a list of all ports in my max-window.
there it recognise port b as the one wich is connected to the arduio-board.
when i put the b into my serial-object (serial b 9600) occurs following error (in max-win): error: serial: secified port not available
what am i doing wrong?
thanks a lot for every hint and help


January 10, 2007 | 11:58 pm

or, when i switch the usb-port, occurs following error in the max-window:
error: serial: error opening serial port (/dev/cu.usbserial/-A1015k55).
in arduino i’ve choosen the port /dev/tty.usbserial/-A1050k5
?
hmpf
thanks


January 11, 2007 | 12:10 am

make sure you only have one application at a time talking to the serial port.

like.. only the arduino ide, or only max. serial ports can’t be shared.

On 1/10/07, ivo wrote:
>
> or, when i switch the usb-port, occurs following error in the max-window:
> error: serial: error opening serial port (/dev/cu.usbserial/-A1015k55).
> in arduino i’ve choosen the port /dev/tty.usbserial/-A1050k5
> ?
> hmpf
> thanks
>


January 11, 2007 | 12:27 am

awesome.
thanks a lot scott.
now i receive a lot of datas.
now i have to look how i interpretate them correctly…


January 11, 2007 | 1:57 pm

hi,

you need to send invisible ascii objects like "10" or so – and then you
can seperate values
like send all objects into a list end put out the list when a 10 is
received and this list you can
translate with the itao objects

as i said i am using processing for translating the send data – but
right now i try to write a object
which can read several sensors and puts them out in floats or int – i
will inform you when its done.

greets georg


January 11, 2007 | 2:19 pm

Hello everyone,

I have a little question about poly~. I am currently working with the
fftease externals using them to build pluggo plugins for protools.
They are however all mono and I need two instances of each object to
create stereo patches. Would it be more efficiant to use poly~ for
this or just have two copies of the same object? That is if there is
any difference at all as far as cpu is concerned.

Thanks in advance for any suggestions.

Peiman



f.e
January 11, 2007 | 3:03 pm

No use of poly~ for this. Just copy the objects, as you’ll always have
to do for stereo signals (& more…).

f.e

f.e chanfrault | aka | personal computer music
> >>>>>> http://www.personal-computer-music.com
> >>>>>> |sublime music for a desperate people|

peiman khosravi wrote:
> Hello everyone,
>
> I have a little question about poly~. I am currently working with the
> fftease externals using them to build pluggo plugins for protools.
> They are however all mono and I need two instances of each object to
> create stereo patches. Would it be more efficiant to use poly~ for
> this or just have two copies of the same object? That is if there is
> any difference at all as far as cpu is concerned.
>
> Thanks in advance for any suggestions.
>
>


January 11, 2007 | 4:20 pm

thanks for that.

Peiman
On 11 Jan 2007, at 15:03, f.e wrote:

> No use of poly~ for this. Just copy the objects, as you’ll always
> have to do for stereo signals (& more…).
>
> f.e
>
> f.e chanfrault | aka | personal computer music
>> >>>>>> http://www.personal-computer-music.com
>> >>>>>> |sublime music for a desperate people|
>
>
> peiman khosravi wrote:
>> Hello everyone,
>>
>> I have a little question about poly~. I am currently working with
>> the fftease externals using them to build pluggo plugins for
>> protools. They are however all mono and I need two instances of
>> each object to create stereo patches. Would it be more efficiant
>> to use poly~ for this or just have two copies of the same object?
>> That is if there is any difference at all as far as cpu is concerned.
>>
>> Thanks in advance for any suggestions.
>>
>>


Viewing 10 posts - 1 through 10 (of 10 total)