PURE DATA forum~

...that deal with pure data

You are not logged in.

#1 2011-02-02 17:24:48

Arduino | Pure Data serial tutorial

basic tutorial how to communicatie between Arduino and Puredata with serial port

http://nf-interactive.blogspot.com/2011 … -data.html

Last edited by nf-interactive (2011-02-21 16:36:48)

Offline

 

#2 2011-02-02 18:33:58

sonsofsol
Member

Re: Arduino | Pure Data serial tutorial

i like. always was wondering how to use the comport obj.

Offline

 

#3 2011-02-02 18:42:58

Re: Arduino | Pure Data serial tutorial

Thanks! i will be uploading a improved version soon. this will be able to send multiple serial data to PureData

Offline

 

#4 2011-02-02 21:07:43

danijel
Member

Re: Arduino | Pure Data serial tutorial

Great, I'm in the process of deciding whether to use Pd or Processing for a small Arduino project - this tutorial will come in handy, thanks ;)

Offline

 

#5 2011-02-03 00:43:53

Re: Arduino | Pure Data serial tutorial

danijel wrote:

Great, I'm in the process of deciding whether to use Pd or Processing for a small Arduino project - this tutorial will come in handy, thanks ;)

I used processing also, it's as easy as PD to connect but the features are very difficult. the graphical interface from PD is very nice!

Offline

 

#6 2011-02-03 13:03:16

danijel
Member

Re: Arduino | Pure Data serial tutorial

nf-interactive wrote:

I used processing also, it's as easy as PD to connect but the features are very difficult. the graphical interface from PD is very nice!

Thanks for the heads-up - I'm already familiar with PD, and I hate Java, so I'm probably following the same route ;)

Offline

 

#7 2011-02-22 15:11:07

Re: Arduino | Pure Data serial tutorial

Anonymous commenting is enabled on the blog :) i would very much care about your reactions. thanks!

Offline

 

#8 2013-02-26 05:13:40

pblanchette
Member

Re: Arduino | Pure Data serial tutorial

Noob question here, does the data flows both way ? like can I send data to arduino via the comport object to control a led ?

Offline

 

#9 2013-04-07 18:16:46

killkrt
Member

Re: Arduino | Pure Data serial tutorial

I wrote a little patch that reads from serial port values sent by Arduino (the value of a photoresistor) and send back to Arduino a text to be shown on an LCD connected to it, but it seems that [comport] outlet reads also what I'm writing.

Do you know if it is possible to read only what is received by the serial port?

Thank you.

Offline

 

#10 2013-04-08 13:01:15

sumidero
Member

Re: Arduino | Pure Data serial tutorial

Hi killkrt:

   Maybe you can tell arduino "not to listen" while you send the data. I don't know if that data would stay in a buffer waiting to be read, anyway. I do that to avoid loops when I refresh two-way controls (the ones that you may operate on both on screen and on midi controllers).

         Sumidero


Debian Wheezy on E7400 4GB Core2Duo, Gina 24/96 // Debian Wheezy on Lenovo T410i, Lexicon Omega.

Offline

 

#11 2013-04-08 20:50:07

killkrt
Member

Re: Arduino | Pure Data serial tutorial

It seems strange to me, since normally Arduino doesn't listen what it is writing from the serial port, did it?

Is it possible that [comport] by default put on the outlet the argument of the print message?

Thank you.

Offline

 

#12 2013-04-09 10:24:54

alexandros
Member

Re: Arduino | Pure Data serial tutorial

killkrt, want to post you patch and sketch? Maybe you should call a while function like this: while (Serial.available > 0) {} and you put what ever you want to be done with data sent from Pd inside the curly braces...
Maybe you've already done it, just a thought I got.

pblanchette, I've attached a Pd patch that turns an LED on and off. There's a [pddplink] with the URL of the Arduino sketch and circuit needed for this.
Cheers


Attachments:
Attachment Icon arduino_blink1.pd, Size: 625 bytes, Downloads: 111

Offline

 

#13 2013-04-09 19:01:50

killkrt
Member

Re: Arduino | Pure Data serial tutorial

Oh my... I was cleaning my code in order to make more readable and sent to you when I noticed that I put a "Serial.println("Data received")" for debugging!!! :-/

Ehm... Sorry!!!

Offline

 

Board footer

Powered by PunBB
Copyright 20022005 Rickard Andersson


pd.webring info