Just some random thoughts while waiting for <span></span>your answer: Note I have never connected ChucK to a serial port but I have talked to an arduino in other languages (processing most recently) so I can probably help. I'm using a Macintosh but since it is UNIX based it shouldn't be that different from Linux methodology.<div>
<br></div><div>o- I assume you will be using a USB serial port to talk to the arduino. Have you used this on the arduino already?</div><div><br></div><div>o- If you don't find a working example you'll need to break it down. I would get the arduino going first using terminal software to debug it.</div>
<div><br></div>o- The key to getting two devices to talk without lots of fragile debugging is to create some core software on both sides that you can debug once and seldom change. This core generally implements some simple command/ response protocol. Once that works you build out from it in both directions by adding new commands.<div>
<br><div>o- the ChucK part of the software should probably be in its own thread. The rest of the system interacts with the thread through common variables. Only that thread should know anything about the arduino. You can imagine a thread which continuously polls the arduino for pot data and writes the values into an array. when other parts of the software need to know a pot value it looks in the array. Again this allows you to write the whole arduino interface stuff once and never change it. especially the comm part. It also lets you change your mind and use a raspberry pi with wifi instead. or maybe you'll find a cheap midi controller with sliders somewhere. The rest of the code just uses the array and doesn't care how the data got there.</div>
<div><br></div><div>Fortunately the USB serial port is very reliable. you shouldn't need to bother with error checking and resending data<div><br><div>o- you need to decide which is the master and which the slave. It can be done either way especially with slow devices like pots. It's probably a little easier to debug if the arduino is the slave.</div>
<div><br></div>You probably detect a little paranoia on my suggestions. There is nothing inherently difficult in this but if you don't do it right it can be a killer to debug mostly because you can't easily see what is happening on the wire.</div>
<div><br></div><div>Once you get the communication parameters to match it should be pretty simple. <div><div><br>On Wednesday, January 1, 2014, Steve Morris  wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
A<span></span>re you looking for advice on the arduino side or the ChucK side?<br><br>On Wednesday, January 1, 2014, Alan Brooker  wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div dir="ltr"><div><div>Hi there<br><br></div>I am using ChucK 1.3.2.0 (Chimera) with miniAudicle 1.3.0a on Ubuntu 12.04- I think the latest version can communicate with Arduino directly?  Cant seem to find any examples so any advice  or example code would be much appreciated. I am trying to build a simple step sequencer with <cite><b>x5 potentiometer</b>s </cite>that send values to an arduino board and then into ChucK hopefully. Was hoping I could do this without OSC- <br>


<br>thanks for helping this noob!<br><br></div><br><br>Al<br></div>
</blockquote>
</blockquote></div></div></div></div></div>