These are chat archives for nebrius/raspi-io

4th
Sep 2015
Bryan Hughes
@nebrius
Sep 04 2015 02:54
raspi-io 4.0.0 is out. The major version bump is due to two breaking changes: I2C pins can longer be used as GPIO, and the default state for pins is output mode, with it’s value set to low
Brian Cooke
@fivdi
Sep 04 2015 21:11
@nebrius does that mean that pins are automatically configured as outputs and set to low when the board is configured?
Bryan Hughes
@nebrius
Sep 04 2015 21:11
@fivdi yes they are, except for I2C pins, which are completely walled off for use as GPIO now
Brian Cooke
@fivdi
Sep 04 2015 21:14
@nebrius what if a pin is actually an input that happens to be high at the time? This will result in a short-circuit.
Bryan Hughes
@nebrius
Sep 04 2015 21:18
@fivdi supposedly that’s the desired default: https://github.com/nebrius/raspi-io/issues/31#issuecomment-135575135. I’ll follow up with @rwaldron
but yeah, that is a concern. It won’t necessarily short circuit, per se, depends on what hardware is on the other end and how CMOS will interact with it
e.g. a pull-up resistor won’t care
Brian Cooke
@fivdi
Sep 04 2015 21:34
Seems very unorthodox to me. In general, when microcontrollers power up GPIOs are inputs by default to avoid such issues. It won't necessarily be a short-circuit but it makes it very easy to have one.
Bryan Hughes
@nebrius
Sep 04 2015 21:34
yeah, I know
I tagged you in the issue in GitHub, we’ll see what Rick says
(I don’t think he’s in this chat)
Brian Cooke
@fivdi
Sep 04 2015 21:35
Ok
Rick Waldron
@rwaldron
Sep 04 2015 23:31
I'm not really sure how to reconcile this. StandardFirmata has been setting everything to output and low since forever. Is it possible for you to set the mode to input but ensure that the pin is low?
Johnny-Five component classes have also always assumed pins are low
The mode probably doesn't matter, because all components explicitly set a mode
Bryan Hughes
@nebrius
Sep 04 2015 23:34
Since this is the default mode for everyone else, and I’ve already made the change, I’m inclined to leave it as is
at least until we start getting complaints with specific instances of damage :)