<div dir="ltr"><div>Funny I was just working on this this morning looking for a simple solution for my students.<br><br></div><div>I found this <a href="http://colinzyskowski.com/?page_id=503">http://colinzyskowski.com/?page_id=503</a> to access analogRead.<br><br></div><div>It kind of works. The third pot interferes with the other two and when I modified to code to add a fourth it interfers or doesn't work at all. Seems to be something to do with the map function Arduino code not workign correctly because when I poll [comport] with [print] each analogRead seems to be on it's own "channel". I can't figure out how to separate them any better than using [split] with there mapped values (not great). I tried [unpack] and [route] but neither of these separate the data streams. <br><br></div><div>On the hardware side I just have each 10k pot wiper connected it's own analog pin on the Uno and each pot is powered and grounded from the Uno via the rails on my breadboard. I'm guessing but adding in some resistors might stabilise the circuit a bit, I don't know if this would help with the interference or not.<br><br></div><div>As mentioned above I also had to add a dialout to access the serial port as outlined by Rinzwind here <a href="http://askubuntu.com/questions/58119/changing-permissions-on-serial-port">http://askubuntu.com/questions/58119/changing-permissions-on-serial-port</a><br></div><div><br><br><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Sep 22, 2015 at 8:45 AM, Martin Peach <span dir="ltr"><<a href="mailto:chakekatzil@gmail.com" target="_blank">chakekatzil@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>...and connect Tx to Rx and Rx to Tx and don't forget to connect the grounds together.<span class="HOEnZb"><font color="#888888"><br><br></font></span></div><span class="HOEnZb"><font color="#888888">Martin<br></font></span></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Sep 21, 2015 at 6:16 PM, Ivica Ico Bukvic <span dir="ltr"><<a href="mailto:ico@vt.edu" target="_blank">ico@vt.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Two more considerations: making sure you have the right firmware on the Arduino (sometimes it gets corrupt for seemingly no apparent reason and you need to reupload it), and finally making sure that it's getting enough power through RPi's USB port to provide stable operation.<div><div><br>
<br>
On 9/21/2015 6:15 PM, Ivica Ico Bukvic wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
If connecting to serial port works when you run pd with sudo privileges, you will need to add your user is to the dialout group. See <a href="http://unix.stackexchange.com/questions/14354/read-write-to-a-serial-port-without-root" rel="noreferrer" target="_blank">http://unix.stackexchange.com/questions/14354/read-write-to-a-serial-port-without-root</a> for more info. HTH<br>
<br>
On 9/21/2015 1:56 PM, Pagano, Patrick wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I have done all of that for use with the ardunio uno, it's when the raspi2 is directly connected to the serial pins that it does not connect.<br>
I tested the device on mac and used the ALLINPUTS firmata and it works with a virtual serial created by FTDI<br>
just can't seem to talk to it with Linux debian running vanilla<br>
<br>
comport works fine with the UNO<br>
<br>
Patrick Pagano B.S, M.F.A<br>
Audio and Projection Design Faculty<br>
Digital Worlds Institute<br>
University of Florida, USA<br>
<a href="tel:%28352%29294-2020" value="+13522942020" target="_blank">(352)294-2020</a><br>
<br>
________________________________________<br>
From: Pd-list <<a href="mailto:pd-list-bounces@mail.iem.at" target="_blank">pd-list-bounces@mail.iem.at</a>> on behalf of IOhannes m zmölnig <<a href="mailto:zmoelnig@iem.at" target="_blank">zmoelnig@iem.at</a>><br>
Sent: Monday, September 21, 2015 1:47 PM<br>
To: <a href="mailto:pd-list@mail.iem.at" target="_blank">pd-list@mail.iem.at</a><br>
Subject: Re: [PD] Pduino and arudino mini pro/raspi debian- Pduino or   Comport?<br>
<br>
On 09/21/2015 05:17 PM, Pagano, Patrick wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
?i sent that message to it ]devicename /dev/ttyS1/S0 and it does not exist so i tried to create it with mknod and it created the names in /dev but they are not accessible.<br>
</blockquote>
mknod? this sounds like you are following advice from the 1990s.<br>
these days mknod is hardly ever needed: instead any devicefiles will be<br>
created on the fly by the resp. drivers.<br>
<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
selecting device in the toggles in the pduino stuff only finds device 0<br>
<br>
I am wondering if it's a linux issue because the only serial port at all is<br>
<br>
serial 0 /dev/ttyAMA0<br>
<br>
</blockquote>
a little bit of googling hints that /dev/ttyAMA0 is indeed the name for<br>
the serial interface on the GPIO ports - which afaiu is what you want.<br>
<br>
so you just use that device.<br>
<br>
<br>
then you need to get the permissions correct.<br>
check whether the device is already setup to allow group-members to<br>
write to it, and which group that is:<br>
$ ls -l /dev/ttyAMA0<br>
crw-rw---- 1 root dialout 4, 67 Sep  3 16:12 /dev/ttyAMA0<br>
<br>
and eventually add the user running Pd to that group:<br>
pd@raspbian $ sudo bash<br>
root@raspbian # adduser pd dialout<br>
<br>
after that you only need to re-login as that user to let the new group<br>
membership have any effect.<br>
<br>
gadsr<br>
IOhannes<br>
<br>
<br>
_______________________________________________<br>
<a href="mailto:Pd-list@lists.iem.at" target="_blank">Pd-list@lists.iem.at</a> mailing list<br>
UNSUBSCRIBE and account-management -> <a href="http://lists.puredata.info/listinfo/pd-list" rel="noreferrer" target="_blank">http://lists.puredata.info/listinfo/pd-list</a><br>
</blockquote>
<br>
</blockquote>
<br>
-- <br>
Ivica Ico Bukvic, D.M.A.<br>
Associate Professor<br>
Computer Music<br>
ICAT Senior Fellow<br>
Director -- DISIS, L2Ork<br>
Virginia Tech<br>
School of Performing Arts – 0141<br>
Blacksburg, VA 24061<br>
<a href="tel:%28540%29%20231-6139" value="+15402316139" target="_blank">(540) 231-6139</a><br>
<a href="mailto:ico@vt.edu" target="_blank">ico@vt.edu</a><br>
<a href="http://www.performingarts.vt.edu" rel="noreferrer" target="_blank">www.performingarts.vt.edu</a><br>
<a href="http://disis.icat.vt.edu" rel="noreferrer" target="_blank">disis.icat.vt.edu</a><br>
<a href="http://l2ork.icat.vt.edu" rel="noreferrer" target="_blank">l2ork.icat.vt.edu</a><br>
<a href="http://ico.bukvic.net" rel="noreferrer" target="_blank">ico.bukvic.net</a><br>
<br>
<br>
_______________________________________________<br>
<a href="mailto:Pd-list@lists.iem.at" target="_blank">Pd-list@lists.iem.at</a> mailing list<br>
UNSUBSCRIBE and account-management -> <a href="http://lists.puredata.info/listinfo/pd-list" rel="noreferrer" target="_blank">http://lists.puredata.info/listinfo/pd-list</a><br>
</div></div></blockquote></div><br></div>
</div></div><br>_______________________________________________<br>
<a href="mailto:Pd-list@lists.iem.at">Pd-list@lists.iem.at</a> mailing list<br>
UNSUBSCRIBE and account-management -> <a href="http://lists.puredata.info/listinfo/pd-list" rel="noreferrer" target="_blank">http://lists.puredata.info/listinfo/pd-list</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature"><div dir="ltr"><br><div><font size="1"><a href="http://www.glitchpop.com" target="_blank">www.glitchpop.com</a></font></div></div></div>
</div>