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

Thread: I am having problem loading i2c_t3 library

Threaded View

  1. #1

    I am having problem loading i2c_t3 library

    Hi everyone.

    I have some code using the i2c_t3 library. I tried running the code and got some error messages including "I2C_MASTER was not declared in this scope". Then, in Arduino software, I went to examples and tried a few of the i2c_t3 examples and none of them worked.

    I am on a Mac, OS 10.13.6. I searched for i2c_t3 and I didn't find anything. So I googled it, found a github link, downloaded it and put the folder in the folder where I keep all my Arduino libraries. I tried running the example code and my code and still it didn't work.

    Then I deleted Arduino software and Teensyduino and reinstalled them both. Still nothing worked. When I do a search for i2c_t3 on my computer all I see is the version I downloaded. I can't find the version that comes with Teensyduino.

    So how can I get this code to work? and Where is i2c_t3 library for Teensy stored on a Mac when you install Teensyduino? If you have any ideas of what I can try please let me know.

    Thanks.

    Nick

    EDIT: I found the i2c_t3 library in the Arduino software folder, along with the examples. I am still getting error messages when I try and verify the code.

    When verifying the "advanced loopback" example I get thiese errors:
    Code:
    Arduino: 1.8.13 (Mac OS X), TD: 1.53, Board: "Teensy 4.1, Serial + MIDI, 600 MHz, Faster, US English"
    
    
    
    
    
    
    
    
    
    
    
    advanced_loopback:43: error: variable or field 'printStatus' declared void
     void printStatus(i2c_status status);
                      ^
    advanced_loopback:43: error: 'i2c_status' was not declared in this scope
    advanced_loopback: In function 'void setup()':
    advanced_loopback:78: error: 'Wire' was not declared in this scope
         Wire.begin(I2C_MASTER, 0x00, WIRE_PINS, I2C_PULLUP_EXT, 400000);
         ^
    advanced_loopback:78: error: 'I2C_MASTER' was not declared in this scope
         Wire.begin(I2C_MASTER, 0x00, WIRE_PINS, I2C_PULLUP_EXT, 400000);
                    ^
    advanced_loopback:23: error: 'I2C_PINS_18_19' was not declared in this scope
     #define WIRE_PINS   I2C_PINS_18_19
                         ^
    /Applications/Arduino.app/Contents/Java/hardware/teensy/avr/libraries/i2c_t3/examples/advanced_loopback/advanced_loopback.ino:78:34: note: in expansion of macro 'WIRE_PINS'
         Wire.begin(I2C_MASTER, 0x00, WIRE_PINS, I2C_PULLUP_EXT, 400000);
                                      ^
    advanced_loopback:78: error: 'I2C_PULLUP_EXT' was not declared in this scope
         Wire.begin(I2C_MASTER, 0x00, WIRE_PINS, I2C_PULLUP_EXT, 400000);
                                                 ^
    advanced_loopback: In function 'void rwSlave(uint8_t)':
    advanced_loopback:147: error: 'Wire' was not declared in this scope
         Wire.beginTransmission(target);         // slave addr
         ^
    advanced_loopback: In function 'void printWireStatus()':
    advanced_loopback:221: error: 'Wire' was not declared in this scope
     void printWireStatus(void) { printStatus(Wire.status()); }
                                              ^
    advanced_loopback:221: error: 'printStatus' was not declared in this scope
     void printWireStatus(void) { printStatus(Wire.status()); }
                                                           ^
    /Applications/Arduino.app/Contents/Java/hardware/teensy/avr/libraries/i2c_t3/examples/advanced_loopback/advanced_loopback.ino: At global scope:
    advanced_loopback:231: error: variable or field 'printStatus' declared void
     void printStatus(i2c_status status)
                      ^
    advanced_loopback:231: error: 'i2c_status' was not declared in this scope
    Multiple libraries were found for "i2c_t3.h"
     Used: /Applications/Arduino.app/Contents/Java/hardware/teensy/avr/libraries/i2c_t3
     Not used: /sequences/Arduino/libraries/i2c_t3-master
    variable or field 'printStatus' declared void
    /Applications/Arduino.app/Contents/Java/hardware/teensy/avr/libraries/i2c_t3/examples/advanced_loopback/advanced_loopback.ino
    
    
    This report would have more information with
    "Show verbose output during compilation"
    option enabled in File -> Preferences.
    Last edited by Frank B; 01-11-2021 at 09:55 PM.

Posting Permissions

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