Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 2 of 2

Thread: pinMode()

  1. #1

    pinMode()

    Hey guys,

    which possibilities do I have in the pinMode() void?
    I know INPUT, OUTPUT, INPUT_PULL(UP/DOWN)

    Are there more possibilities / do I have to set a pinmode when i want to use it as an i2c pin (SDA/SCL)?

    The compiler didnīt print a mistake, when i coded pinMode(19,SCL) but I donīt think thatīs necessary / right ...


    Thanks,
    Ben

  2. #2
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    10,983
    Teensy at hand not specified?

    Not sure if it makes a diff but for Teensy 3.x:
    Code:
    #define INPUT		0
    #define OUTPUT		1
    #define INPUT_PULLUP	2
    #define INPUT_PULLDOWN   3
    #define OUTPUT_OPENDRAIN 4
    #define INPUT_DISABLE   5
    Typically pins used for a 'bus', i2c or SPI or Serial#, are set in the .begin() call. Any calls to pinMode() can only mess up the needed configuration.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •