<div dir="ltr"><div><div><div><div><div><div><div>Morning Jaime,<br><br></div>Nice digging - well done.<br><br></div>As I don&#39;t read C I admit to being somewhat at sea with the possibilities of the object so really good to hear someone else is rooting around in this.<br>
<br></div><div>I did manage to get access to the GPIO pins making use of the messages that Charles mentioned:<br></div><div>sudo bash<br>


        
        
        
        <style type="text/css">
        <!--
                @page { size: 21cm 29.7cm; margin: 2cm }
                P { margin-bottom: 0.21cm; direction: ltr; color: #000000; widows: 2; orphans: 2 }
                P.western { font-family: "Times New Roman", serif; font-size: 12pt; so-language: en-GB }
                P.cjk { font-family: "Times New Roman", serif; font-size: 12pt; so-language: zh-CN }
                P.ctl { font-family: "Times New Roman", serif; font-size: 12pt; so-language: ar-SA }
        --></style>echo &quot;1&quot; &gt;
/sys/class/gpio/export<br>echo out &gt;
/sys/class/gpio/gpio1/direction<br>chown pi
/sys/class/gpio/gpio1/value<br><br></div><div>But really good to just do it from within Pd - how&#39;d you get round the sudo-thing?<br>

</div><div><br></div>Not sure what it is you&#39;re doing project-wise with the GPIO pins but I&#39;ve spent a couple of weeks digging through the somewhat endless bits and pieces of documentation on the web so perhaps I could be of assistance with some pointers on that front?<br>
<br>Most of the info/code is Python-based and there&#39;s plenty of it (I&#39;m also a complete noob re Python as well!)<br></div>Miller and Charles were certainly on the right track with WiringPi as I would say it&#39;s easily the most referenced library.<br>
.<br>My own interest is with getting a fairly recent i2c thermal imaging sensor going (see other thread) and Martin Peach is giving us some invaluable help with that but it would be my ideal scenario to be able to control, manage and filter the sensors data from within Pd (once we get the thing going!).<br>
</div><br></div><div>My understanding from reading Miller&#39;s initial message re [gpio] is that it&#39;s based on WiringPi so I can&#39;t help wondering if there&#39;s also a method to include the i2c library that&#39;s a subset of WiringPi as well?  Would be super-useful.<br>
</div><div><br></div>Obviously early days yet but I&#39;m sure we can get there eventually.<br><br></div>All the best,<br><br>Julian<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On 12 April 2013 06:21, J Oliver <span dir="ltr">&lt;<a href="mailto:jaime.oliver2@gmail.com" target="_blank">jaime.oliver2@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div><span style="text-indent:0px;letter-spacing:normal;font-variant:normal;text-align:-webkit-auto;font-style:normal;font-weight:normal;line-height:normal;border-collapse:separate;text-transform:none;font-size:medium;white-space:normal;font-family:Helvetica;word-spacing:0px">Hi Julian, All,</span></div>
<div><span style="text-indent:0px;letter-spacing:normal;font-variant:normal;text-align:-webkit-auto;font-style:normal;font-weight:normal;line-height:normal;border-collapse:separate;text-transform:none;font-size:medium;white-space:normal;font-family:Helvetica;word-spacing:0px"><br>
</span></div><div>I think I&#39;ve figured out the [gpio] external. It works fine, but there there is no documentation, however, the .c file is not very complicated.</div><div><br></div><div>The test-gpio.pd file is not very good as documentation, so I am attaching a draft help file. </div>
<div><br></div><div>The argument of [gpio] is the pin number. The first thing to do is [enable 1( and not [open 1(, which is equivalent to the:</div><div>sudo echo &quot;17&quot; &gt; /sys/class/gpio/export</div><div>command.</div>
<div><br></div><div>Then [open 1(, then [output 1/0( to choose direction and then write (float) to or read (bang) from the pin...</div><div><br></div><div>There are still a few more things I need to discover, but more tomorrow when I have some jumper cables and feel more awake.</div>
<div><br></div><div>best,</div><div><br></div><div>J</div><div><br></div><div></div></div><br><div style="word-wrap:break-word"><div></div></div><br></blockquote></div><br></div>