<div dir="ltr"><div><div><div><div><div>Hey all,<br><br></div>It seems, and please correct me if I&#39;m wrong on this, that it&#39;s currently impossible to use[gpio] and i2c as [gpio] can only set the gpio pins to &#39;in&#39; or &#39;out&#39; (high/low).<br>
<br></div>You can check this using wiringpi&#39;s &#39;gpio readall&#39; command which gives the current mode of each pin.<br><br></div>Via [gpio] we can currently set the gpio pin 0 (SDA) to either &#39;out&#39; (low) or &#39;in&#39; (high) but not to ALT0 (high) which is what we need for i2c as the i2c line is bi-directional.<br>
<br></div>My understanding is that [gpio] is based on wiringpi so is it possible/trivial to add i2c support into [gpio] with the magic ALT mode?<br><br></div>I wrote to the author of wiringpi to ask what the ALT0 mode meant (I actually thought it was ALTO) and got this response:<br>
<br><div class=""><p>&quot;Each pin has a number of modes it 
can be in – Input or output are generic digital modes – then there are 
ALTernative modes – up to 6 alternative modes for each pin – ALT0 
through ALT5. For I2C mode the internal plumbing connects the pins to 
the I2C drivers – this is ALT0 mode for that particular pin.</p>
<p>If you want to know more, seatch for the Broadcom ARM Peripherals manual.</p>
<p>-Gordon&quot;</p><p><br></p>Best wishes to all,<br><br>Julian<br>
</div><br>
</div>