Forum

Welcome Guest 

Show/Hide Header

Welcome Guest, posting in this forum requires registration.





Pages: [1]
Author Topic: live drawing
Metroid
Newbie
Posts: 14
Permalink
Post live drawing
on: May 12, 2016, 13:49
Quote

hi guys, i would like to develop a software on max/msp connected to polargraph for live drawing.

I would like to control the machine sending coordinates from max/msp for an installation.

Do you have some advice? Someone of you have yet made some experiment like this? Which is the best way for making a communication between the two softwares (Serial)?

thank you

matteo

Metroid
Newbie
Posts: 14
Permalink
Post Re: live drawing
on: July 5, 2016, 17:22
Quote

HI guys, i'm still trying to do this.

Now i can receive "ready" messages and "motor released" and other information messages from arduino via serial, the problem is that when i send messages to the arduino, arduino receives them but the commands don't work properly.

Maybe the server doesn't recognize them in this way or am i missing something?

Thank you very much!

I'll copy here my basic max patch :

<pre><code>
----------begin_max5_patcher----------
2407.3oc0ckzbiiaE9r8uBT5raWXGf4Vl4TNjpRkaoxLUWzRv1bFJRERJ2cO
SM+2CVH0has.HC.o1sKRAJZo22Cu8G.6+796l8T6WU8y.+Mv+Eb2c+482cm8
RlKb2336lsr7qyqK6s21r4sKWpZFl8f68FTecvd8dUyBP6apNPeUyK0Jvak0
q0ezi2W+v2pU1ab5JqJGl+p9V+bmZ9fiBPXN6Q3C5yD6IFzbBqOB90w+pl0K
qZpUCVhAMdwpE1O41m9sOgfy1dmsqGltUn4h+082aN7vGDpqTMfEseoADF3f
LjANDJ+RAmL8X6E0.XYog1Uf9Up4gMAJYrGYO.3vG45eD3KClrzCy4uV17hB
TqZdY30KAhHH2hQo3xvHMOho0UOO.ljWuHbxEOB0+vQWFNwwCmKU88kun9Nb
9e.eF7Kyv+xL8Q3zwo6pVKHOucci8VwGkA3HsgusR4P+rYaP3gTkEVUXF1xO
3XqZM6XbE72yUJJNLaAcArkF0WzejeGW4Ope7kt10q.rYAf5G7C4ToV5W.gH
hF9Va0XbHvWbX3iinTAW.nE5oH.kZdAUZ+kB3E.gDvkyhjrvndBFI2pmTfBm
kPRtDQupF.C.1OoMQddABBzJ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qVxjQ5wqVxjQ5wqVxjQ5wqVxjQ5wqVxjI5wmP3
w4qEQXVBWAGH2xrwkc56FkkD3vdUfSRJB7x7vWx9PL1s90b6n12OpvMxETFL
MqhEL5FHnro.rca41wYc6nDfXTwM.hmB0lSrmFQrYTJPbTB7NhzC+pkXGg53
zP2S3CjaS0bnQSxjvzjzGxupxmuPoPIo7xi15QP6Ioi0t+n7XqGQ8IxCdHxb
HHWJQFwMr1jsoSqi5+GurBbpEiL2yva2FAX+QnB2S1bg3.ibqcdlaeSu+H2+
mFvJrOjdMCREO7rQKwxnHqW9uyWEqPdUZ+BwMFAgx3hxBkjNCLYlgumYF9Uv
LC4VH3hwPFIrcCtvLJEHFeMPbDoeeB.l.CrSUNd939c1ULYN+5Q+nKsKKt8j
P4pUuo55G+Lsjxrkk+laFS7fcXUianceoLqS8V0z8a2jeyJ6l+Z0fZ9v5N2t
h3qR29iblYSj20rtZbS1n+l+q6++.gbSYbA
-----------end_max5_patcher-----------
</code></pre>

sandy
Administrator
Posts: 1317
Permalink
sandy
Post Re: live drawing
on: July 5, 2016, 18:00
Quote

Without knowing in what way the "commands don't work properly", you should know that it's impossible to help.

What error messages are you receiving back?

sn

Metroid
Newbie
Posts: 14
Permalink
Post Re: live drawing
on: July 5, 2016, 22:20
Quote

I'm getting no response at all on the serial monitor...the fact is that Arduino receives the data because the led blinks... maybe i'm missing something.

Maybe i have to add something to the data like spaces or other carachters?

I tried to send the data in differet ways like in a single message or with multiple single messages.
The only thing that i receive back is ready-200...

Thank you

Metroid
Newbie
Posts: 14
Permalink
Post Re: live drawing
on: July 5, 2016, 22:21
Quote

The serial connection looks working because when i restart the Arduino i get all the informations back and also when i use the touch screen on the polarshield i get messages back...

sandy
Administrator
Posts: 1317
Permalink
sandy
Post Re: live drawing
on: July 6, 2016, 08:16
Quote

Well that's a good sign. Have you read https://github.com/euphy/polargraph/wiki/Polargraph-machine-commands-and-responses? There is a termination character (10, or \n) that needs to be on the end of each command - I bet that is the issue.

There is a DEBUG_COMMS flag that you can set in the firmware that shows exactly what characters are being received, how the command is being built up etc. It adds a bit to the sketch size, so might not work on an UNO.

https://github.com/euphy/polargraph_server_a1/blob/master/polargraph_server_a1.ino#L82

Have you tried sending the message manually, through the serial monitor? You know you can't connect the serial monitor _and_ anything else at the same time? Serial monitor will block other connections.

sn

Metroid
Newbie
Posts: 14
Permalink
Post Re: live drawing
on: July 8, 2016, 09:05
Quote

Thank you! the 10 was the problem!

The page on github includes all the possible messages that can be sent to the machine?

Thank you

Matteo

sandy
Administrator
Posts: 1317
Permalink
sandy
Post Re: live drawing
on: July 9, 2016, 20:15
Quote

Aha that's good. No the page isn't comprehensive - the code itself is really the only documentation for the full range, you've got to dig in!

sn

Metroid
Newbie
Posts: 14
Permalink
Post Re: live drawing
on: July 22, 2016, 09:40
Quote

thank you!

I'll post a video of the finished project when it'll be ready! 😉

Pages: [1]
Mingle Forum by cartpauj
Version: 1.0.34 ; Page loaded in: 0.018 seconds.