<div dir="ltr"><div><div><div><div><div><div><div>Aargh - you&#39;re right, I am confused (so very)...<br><br></div>So, to be clear<br>#define SENSOR_SELECT_PIN 11<br></div>should be<br>#define SENSOR_SELECT_PIN 17<br></div>
After all?<br><br></div>It is then going to pin 11 on the 4051.<br><br></div><div>Running as root so need for sudo (yes I know)<br></div><div><br></div>As Max Romeo said:<br></div>&quot;One step forwards, two steps backwards&quot; :)<br>
<br></div><div>J<br></div><div><br></div>Will try the led test and the updated code when I can get back to it in a couple of days or so.<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On 17 May 2013 16:20, Martin Peach <span dir="ltr">&lt;<a href="mailto:martin.peach@sympatico.ca" target="_blank">martin.peach@sympatico.ca</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">It looks like you&#39;re confused about the GPIO pin.<br>
SENSOR_SELECT_PIN should be 17 because that&#39;s what the ARM chip calls it. The fact that it is on pin 11 of the header is irrelevant to the program.<br>
The next confusing thing is that GPIO17 on pin 11 of the header connects to pin 11 of the 4051.<br>
If you want to see if the pin is working you can put an LED from pin 11 of the header to ground and see if it flashes when you run the program.<br>
I had to run it as sudo because regular users don&#39;t have permission to access the GPIO pins.<span class="HOEnZb"><font color="#888888"><br>
<br>
Martin</font></span><div class="im"><br>
<br>
On 2013-05-17 10:50, Julian Brooks wrote:<br>
</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">
Sorry meant to attach the code (doh!).<br>
<br>
My compadre has all the photo&#39;s on his phone so will give him a nudge<br>
now and get back to you when I hear from him...<br>
<br>
(hey George:)<br>
<br>
Thanks for the testing tip - of course, seems so obvious now that you&#39;ve<br>
said it.<br>
<br>
And I guess we can&#39;t definitely confirm that the pin switches although<br>
the last big problem we had was that I&#39;d set the switch to pin 17 rather<br>
than pin 11 (gpio 17).  What would happen then is that we would get one<br>
reading from the 1st sensor and then it would stall/quit-out.<br>
<br>
More soon hopefully,<br>
<br>
Julian<br>
<br>
<br>
On 17 May 2013 15:14, Martin Peach &lt;<a href="mailto:martin.peach@sympatico.ca" target="_blank">martin.peach@sympatico.ca</a><br></div><div><div class="h5">
&lt;mailto:<a href="mailto:martin.peach@sympatico.ca" target="_blank">martin.peach@<u></u>sympatico.ca</a>&gt;&gt; wrote:<br>
<br>
    On 2013-05-17 09:39, Julian Brooks wrote:<br>
<br>
        Hey Martin,<br>
<br>
        Can I please peck your head hopefully one last time?<br>
<br>
<br>
    Sure.<br>
<br>
<br>
        We&#39;re so close, got the hardware for the installation up and<br>
        running,<br>
        box made etc etc.<br>
<br>
        Could you have a once-over of our code:<br>
        Still only seeing one sensor though all of our multimeter<br>
        testing says<br>
        sensor 2 is fine and ready to go.  I think it has to be a code<br>
        problem<br>
        in the C file but I just_can&#39;t\-see\-it!!<br>
<br>
<br>
    You need to show me your code... The file I sent was to read two<br>
    sensors. The second was the 1X8 sensor so it reads a different<br>
    number of bytes. You have to change that, everything else should be<br>
    the same..<br>
<br>
<br>
<br>
        Keep wondering if there&#39;s a way of being able to test the 2nd<br>
        sensor in<br>
        a similar vein to sensor 1 with &#39;i2cdetect&#39;, like if we could<br>
        shift the<br>
        IC switcher so it would allow us to run the test on the 2nd one.<br>
<br>
<br>
    Yes, just connect the A select line of the 4051 (pin 11) directly to<br>
    3.3V or ground to select one or the other. But disconnect the GPIO<br>
    pin when you do that.<br>
<br>
<br>
<br>
        Pd is receiving on both sends (44l &amp; 44l2) but all we have is one<br>
        sensors readings - same in the prints from the C file.<br>
<br>
<br>
    Sounds like the multiplexer isn&#39;t working right. Do you have a photo<br>
    of your setup? Can you confirm that the GPIO pin switches?<br>
<br>
    Martin<br>
<br>
<br>
<br>
<br></div></div><div class="im">
______________________________<u></u>_________________<br>
<a href="mailto:Pd-list@iem.at" target="_blank">Pd-list@iem.at</a> mailing list<br>
UNSUBSCRIBE and account-management -&gt; <a href="http://lists.puredata.info/listinfo/pd-list" target="_blank">http://lists.puredata.info/<u></u>listinfo/pd-list</a><br>
<br>
</div></blockquote>
<br>
</blockquote></div><br></div>