<div dir="ltr"><div><div><div><div><div>Hey all,<br><br></div>It seems, and please correct me if I'm wrong on this, that it's currently impossible to use[gpio] and i2c as [gpio] can only set the gpio pins to 'in' or 'out' (high/low).<br>
<br></div>You can check this using wiringpi's 'gpio readall' 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 'out' (low) or 'in' (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>"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"</p><p><br></p>Best wishes to all,<br><br>Julian<br>
</div><br>
</div>