• Slightly off topic but when should I use the "input_pullup" option of pinMode? This is used in the keypad tutorial and seems to replace the need for using a physical pullup resistor. Could someone explain please.

  • You use them for the same purpose: not have open, floating inputs, (too) sensible to noise (on inputs driven by open-collector(-like) outputs of driving ICs - which all I2C senders are, or on inputs driven by (diode-)matrix-encoders (like in keypad) on scanning). I used pull-downs to clear lingering capacities before reading from resistive touch screen - see http://forum.espruino.com/conversations/256122/, in particular post http://forum.espruino.com/comments/11892295/

    For use with I2C: first of all, these pull-up (or pull-down) resistors are 30..40k. If you write you own I2C you can control the pins to use them (when reading). With low speed and short bus and limited noise it may work (see @DrAzzy 's explanations in 3rd and 2nd last paragraph).

About

Avatar for DaveNI @DaveNI started