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

Thread: I2C and LCD on wire1 or wire2 pins instead of wire

  1. #1
    Junior Member
    Join Date
    Mar 2021
    Posts
    19

    I2C and LCD on wire1 or wire2 pins instead of wire

    I have printed the circuit and I can not change the HW ports to another in a teensy 4.1.

    What of these options are possible?:

    1. Write at the beginning:

    Code:
    #define Wire  Wire1


    2. Rewrite the library: LCD_I2C_lib in the file:lcd_I2C.cpp all "Wire" by "Wire1" (or 2)

  2. #2
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    24,080
    Yes, #2. Well, unless the library has a constructor or other way to specify which port. Some newer libraries have this. But most older libraries have "Wire" hard coded. In that case, you will need to edit every "Wire" inside the library to Wire1 or Wire2.

Posting Permissions

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