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

Thread: Porting arduino mega code to teensy

  1. #1

    Porting arduino mega code to teensy

    Hi guys. I need help please.
    How do I port/use this arduino mega code on teensy 4.0 ?

    http://www.mediafire.com/file/tw77jj....09.28.7z/file

    The code was generated in visual studio but i am more familiar with arduino ide

    How can i load this code into teensy to run it on teensy 4.0 ?

    https://ibb.co/c2nyVYV

    Thanks

  2. #2
    Senior Member+ mjs513's Avatar
    Join Date
    Jul 2014
    Location
    New York
    Posts
    5,893
    I would start by looking at main.cpp file. It looks like you can just copy and paste that into your Arduino IDE and then add all the .h files into the sketch as new tab's - you don't have to worry about coping the adafruit and sparkfun libraries into the sketch folder as you already have them. Then just start fixing any pin connections etc after you do a compile. I guess this is related to your post on the BNO55 issues.

  3. #3
    Senior Member
    Join Date
    Nov 2012
    Posts
    1,488
    I have got the code to compile on a Teensy 4.1 after a bit of pushing and shoving, but I can't test it. It is all in one directory.
    MotionTrackerMega.zip

    Pete

  4. #4
    Quote Originally Posted by el_supremo View Post
    I have got the code to compile on a Teensy 4.1 after a bit of pushing and shoving, but I can't test it. It is all in one directory.
    MotionTrackerMega.zip

    Pete
    Thanks!
    Should i load it in visual studio?

  5. #5
    Quote Originally Posted by mjs513 View Post
    I would start by looking at main.cpp file. It looks like you can just copy and paste that into your Arduino IDE and then add all the .h files into the sketch as new tab's - you don't have to worry about coping the adafruit and sparkfun libraries into the sketch folder as you already have them. Then just start fixing any pin connections etc after you do a compile. I guess this is related to your post on the BNO55 issues.
    Thanks!
    Yes. This is the phase where i would test is all the sensors run on thr teensy and the code works on teensy and all these sensors

  6. #6
    Senior Member+ mjs513's Avatar
    Join Date
    Jul 2014
    Location
    New York
    Posts
    5,893
    Quote Originally Posted by marcob View Post
    Thanks!
    Should i load it in visual studio?
    @el_supremo set it up so you can use the Arduino IDE!

  7. #7
    Quote Originally Posted by mjs513 View Post
    @el_supremo set it up so you can use the Arduino IDE!
    Cool looking forward to test it as soon as i get back home from work

  8. #8
    Quote Originally Posted by el_supremo View Post
    I have got the code to compile on a Teensy 4.1 after a bit of pushing and shoving, but I can't test it. It is all in one directory.
    MotionTrackerMega.zip

    Pete
    Thank you ! Worked!

    I can run the code on the teensy 4.0 .

    Unfortunatly I am having this sort of issue I have mentioned here

    https://forum.pjrc.com/threads/58268...l=1#post254718

    How could the code be changed to be able to use the bno080 on the 2nd bus of the teency while keeoing the 2 bno055 on the 1st bus of the teensy?

    Scanning...

    I2C device found at address 0x28 !

    I2C device found at address 0x29 !

    I2C(SCL1) device found at address 0x4B !

    done
    Last edited by marcob; 10-02-2020 at 05:28 AM.

  9. #9
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    12,691
    It just takes a mod to the code to duplicate WIRE to WIRE1 and WIRE2.

    Here is an elaborate version of that ... tweaked for a the bus i2c test board ... this looks to be the KurtE version from 8 months back - just tested to run on a T_4.0

    Code:
    // --------------------------------------
    // i2c_scanner
    // http://playground.arduino.cc/Main/I2cScanner
    //
    // Version 1
    //    This program (or code that looks like it)
    //    can be found in many places.
    //    For example on the Arduino.cc forum.
    //    The original author is not know.
    // Version 2, Juni 2012, Using Arduino 1.0.1
    //     Adapted to be as simple as possible by Arduino.cc user Krodal
    // Version 3, Feb 26  2013
    //    V3 by louarnold
    // Version 4, March 3, 2013, Using Arduino 1.0.3
    //    by Arduino.cc user Krodal.
    //    Changes by louarnold removed.
    //    Scanning addresses changed from 0...127 to 1...119,
    //    according to the i2c scanner by Nick Gammon
    //    http://www.gammon.com.au/forum/?id=10896
    // Version 5, March 28, 2013
    //    As version 4, but address scans now to 127.
    //    A sensor seems to use address 120.
    // Version 6, November 27, 2015.
    //    Added waiting for the Leonardo serial communication.
    //
    //
    // This sketch tests the standard 7-bit addresses
    // Devices with higher bit address might not be seen properly.
    //
    
    // #define FRANKESTEIN
    #include <Wire.h>
    void printKnownChips(byte address);
    
    // BUGBUG::Should put this in WireIMXRT.h
    #if defined(__IMXRT1062__)
    #define WIRE_IMPLEMENT_WIRE
    #define WIRE_IMPLEMENT_WIRE1
    #define WIRE_IMPLEMENT_WIRE2
    #endif
    typedef struct {
      TwoWire *_wire;
      const char * wire_name;
    #if defined(__IMXRT1062__)
      IMXRT_LPI2C_t * const port;
    #endif
    } wire_list_t;
    
    wire_list_t wireList[] = {
      {
        &Wire,
        "Wire"
    #if defined(__IMXRT1062__)
        , &IMXRT_LPI2C1
    #endif
      }
    #if defined(WIRE_IMPLEMENT_WIRE1)
      , {
        &Wire1,
        "Wire1"
    #if defined(__IMXRT1062__)
        , &IMXRT_LPI2C3
    #endif
      }
    #endif
    #if defined(WIRE_IMPLEMENT_WIRE2)
      , {
        &Wire2,
        "Wire2"
    #if defined(__IMXRT1062__)
        , &IMXRT_LPI2C4
    #endif
      }
    #endif
    #if defined(WIRE_IMPLEMENT_WIRE3)
      , {
        &Wire3,
        "Wire3",
    #if defined(__IMXRT1062__)
        nullptr
    #endif
      }
    #endif
    };
    const uint8_t wirelist_count = sizeof(wireList) / sizeof(wireList[0]);
    
    
    #ifdef FRANKESTEIN
    void Scansetup() {
    #else
    void setup() {
    #endif
      // uncomment these to use alternate pins
      //Wire.setSCL(16);
      //Wire.setSDA(17);
      for (uint8_t windex = 0; windex < wirelist_count; windex++) {
        wireList[windex]._wire->begin();
      }
      Serial.begin(9600);
      while (!Serial);        // Leonardo: wait for serial monitor
      Serial.println(F("\nI2C Scanner"));
    }
    
    #ifdef FRANKESTEIN
    void Scanloop() {
    #else
    void loop() {
    #endif
      byte error, address;
      int nDevices;
    
      for (uint8_t windex = 0; windex < wirelist_count; windex++) {
    #if defined(__IMXRT1062__)
        IMXRT_LPI2C_t * const port = wireList[windex].port;
    #endif
        Serial.print(F("Scanning("));
        Serial.print(wireList[windex].wire_name);
        Serial.println(F(")..."));
        nDevices = 0;
        for (address = 1; address < 127; address++) {
          // The i2c_scanner uses the return value of
          // the Write.endTransmisstion to see if
          // a device did acknowledge to the address.
          wireList[windex]._wire->beginTransmission(address);
          error = wireList[windex]._wire->endTransmission();
    
          if (error == 0) {
            Serial.print(F("Device found at address 0x"));
            if (address < 16) {
              Serial.print("0");
            }
            Serial.print(address, HEX);
            Serial.print("  (");
            printKnownChips(address);
            Serial.println(")");
    
            nDevices++;
          } else if (error == 4) {
            Serial.print(F("Unknown error at address 0x"));
            if (address < 16) {
              Serial.print("0");
            }
            Serial.print(address, HEX);
    #if defined(__IMXRT1062__)
            Serial.printf("\tMCR:%x MSR:%x, MIER:%x MDER:%x MCFGR0:%x MDMR:%x MCCR0:%x\n",
                          port->MCR, port->MSR, port->MIER, port->MDER, port->MCFGR0, port->MDMR, port->MCCR0);
    #else
            Serial.println();
    #endif
          }
        }
        if (nDevices == 0) {
          Serial.println(F("No I2C devices found\n"));
        } else {
          Serial.println(F("done\n"));
        }
      }
    #ifdef FRANKESTEIN
      delay(5);           // short wait for exit
    #else
      delay(5000);           // wait 5 seconds for next scan
    #endif
    }
    
    void printKnownChips(byte address)
    {
      // Is this list missing part numbers for chips you use?
      // Please suggest additions here:
      // https://github.com/PaulStoffregen/Wire/issues/new
      switch (address) {
        case 0x00: Serial.print(F("AS3935")); break;
        case 0x01: Serial.print(F("AS3935")); break;
        case 0x02: Serial.print(F("AS3935")); break;
        case 0x03: Serial.print(F("AS3935")); break;
        case 0x0A: Serial.print(F("SGTL5000")); break; // MCLK required
        case 0x0B: Serial.print(F("SMBusBattery?")); break;
        case 0x0C: Serial.print(F("AK8963")); break;
        case 0x10: Serial.print(F("CS4272")); break;
        case 0x11: Serial.print(F("Si4713")); break;
        case 0x13: Serial.print(F("VCNL4000,AK4558")); break;
        case 0x18: Serial.print(F("LIS331DLH")); break;
        case 0x19: Serial.print(F("LSM303,LIS331DLH")); break;
        case 0x1A: Serial.print(F("WM8731")); break;
        case 0x1C: Serial.print(F("LIS3MDL")); break;
        case 0x1D: Serial.print(F("LSM303D,LSM9DS0,ADXL345,MMA7455L,LSM9DS1,LIS3DSH")); break;
        case 0x1E: Serial.print(F("LSM303D,HMC5883L,FXOS8700,LIS3DSH")); break;
        case 0x20: Serial.print(F("MCP23017,MCP23008,PCF8574,FXAS21002,SoilMoisture")); break;
        case 0x21: Serial.print(F("MCP23017,MCP23008,PCF8574")); break;
        case 0x22: Serial.print(F("MCP23017,MCP23008,PCF8574")); break;
        case 0x23: Serial.print(F("MCP23017,MCP23008,PCF8574")); break;
        case 0x24: Serial.print(F("MCP23017,MCP23008,PCF8574")); break;
        case 0x25: Serial.print(F("MCP23017,MCP23008,PCF8574")); break;
        case 0x26: Serial.print(F("MCP23017,MCP23008,PCF8574")); break;
        case 0x27: Serial.print(F("MCP23017,MCP23008,PCF8574,LCD16x2,DigoleDisplay")); break;
        case 0x28: Serial.print(F("BNO055,EM7180,CAP1188")); break;
        case 0x29: Serial.print(F("TSL2561,VL6180,TSL2561,TSL2591,BNO055,CAP1188")); break;
        case 0x2A: Serial.print(F("SGTL5000,CAP1188")); break;
        case 0x2B: Serial.print(F("CAP1188")); break;
        case 0x2C: Serial.print(F("MCP44XX ePot")); break;
        case 0x2D: Serial.print(F("MCP44XX ePot")); break;
        case 0x2E: Serial.print(F("MCP44XX ePot")); break;
        case 0x2F: Serial.print(F("MCP44XX ePot")); break;
        case 0x33: Serial.print(F("MAX11614,MAX11615")); break;
        case 0x34: Serial.print(F("MAX11612,MAX11613")); break;
        case 0x35: Serial.print(F("MAX11616,MAX11617")); break;
        case 0x38: Serial.print(F("RA8875,FT6206,MAX98390")); break;
        case 0x39: Serial.print(F("TSL2561, APDS9960")); break;
        case 0x3C: Serial.print(F("SSD1306,DigisparkOLED")); break;
        case 0x3D: Serial.print(F("SSD1306")); break;
        case 0x40: Serial.print(F("PCA9685,Si7021")); break;
        case 0x41: Serial.print(F("STMPE610,PCA9685")); break;
        case 0x42: Serial.print(F("PCA9685")); break;
        case 0x43: Serial.print(F("PCA9685")); break;
        case 0x44: Serial.print(F("PCA9685, SHT3X")); break;
        case 0x45: Serial.print(F("PCA9685, SHT3X")); break;
        case 0x46: Serial.print(F("PCA9685")); break;
        case 0x47: Serial.print(F("PCA9685")); break;
        case 0x48: Serial.print(F("ADS1115,PN532,TMP102,LM75,PCF8591")); break;
        case 0x49: Serial.print(F("ADS1115,TSL2561,PCF8591")); break;
        case 0x4A: Serial.print(F("ADS1115,Qwiic Keypad")); break;
        case 0x4B: Serial.print(F("ADS1115,TMP102,BNO080,Qwiic Keypad")); break;
        case 0x50: Serial.print(F("EEPROM,FRAM")); break;
        case 0x51: Serial.print(F("EEPROM")); break;
        case 0x52: Serial.print(F("Nunchuk,EEPROM")); break;
        case 0x53: Serial.print(F("ADXL345,EEPROM")); break;
        case 0x54: Serial.print(F("EEPROM")); break;
        case 0x55: Serial.print(F("EEPROM")); break;
        case 0x56: Serial.print(F("EEPROM")); break;
        case 0x57: Serial.print(F("EEPROM")); break;
        case 0x58: Serial.print(F("TPA2016,MAX21100")); break;
        case 0x5A: Serial.print(F("MPR121")); break;
        case 0x60: Serial.print(F("MPL3115,MCP4725,MCP4728,TEA5767,Si5351")); break;
        case 0x61: Serial.print(F("MCP4725,AtlasEzoDO,Qwiic Button")); break;
        case 0x62: Serial.print(F("LidarLite,MCP4725,AtlasEzoORP,Qwiic Button")); break;
        case 0x63: Serial.print(F("MCP4725,AtlasEzoPH,Qwiic Button")); break;
        case 0x64: Serial.print(F("AtlasEzoEC,Qwiic Button")); break;
        case 0x65: Serial.print(F("Qwiic Button")); break;
        case 0x66: Serial.print(F("AtlasEzoRTD,Qwiic Button")); break;
        case 0x67: Serial.print(F("Qwiic Button,Qwiic Button")); break;
        case 0x68: Serial.print(F("DS1307,DS3231,MPU6050,MPU9050,MPU9250,ITG3200,ITG3701,LSM9DS0,L3G4200D,Qwiic Button")); break;
        case 0x69: Serial.print(F("MPU6050,MPU9050,MPU9250,ITG3701,L3G4200D,Qwiic Button")); break;
        case 0x6A: Serial.print(F("LSM9DS1,Qwiic Button")); break;
        case 0x6B: Serial.print(F("LSM9DS0,Qwiic Button")); break;
        case 0x6C: Serial.print(F("Qwiic Button")); break;
        case 0x6D: Serial.print(F("Qwiic Button")); break;
        case 0x6E: Serial.print(F("Qwiic Button")); break;
        case 0x6F: Serial.print(F("Qwiic Button")); break;
        case 0x70: Serial.print(F("HT16K33")); break;
        case 0x71: Serial.print(F("SFE7SEG,HT16K33")); break;
        case 0x72: Serial.print(F("HT16K33")); break;
        case 0x73: Serial.print(F("HT16K33")); break;
        case 0x76: Serial.print(F("MS5607,MS5611,MS5637,BMP280")); break;
        case 0x77: Serial.print(F("BMP085,BMA180,BMP280,MS5611")); break;
        case 0x7C: Serial.print(F("FRAM_ID")); break;
        default: Serial.print(F("unknown chip"));
      }
    }

  10. #10
    Quote Originally Posted by defragster View Post
    It just takes a mod to the code to duplicate WIRE to WIRE1 and WIRE2.

    Here is an elaborate version of that ... tweaked for a the bus i2c test board ... this looks to be the KurtE version from 8 months back - just tested to run on a T_4.0

    Code:
    // --------------------------------------
    // i2c_scanner
    // http://playground.arduino.cc/Main/I2cScanner
    //
    // Version 1
    //    This program (or code that looks like it)
    //    can be found in many places.
    //    For example on the Arduino.cc forum.
    //    The original author is not know.
    // Version 2, Juni 2012, Using Arduino 1.0.1
    //     Adapted to be as simple as possible by Arduino.cc user Krodal
    // Version 3, Feb 26  2013
    //    V3 by louarnold
    // Version 4, March 3, 2013, Using Arduino 1.0.3
    //    by Arduino.cc user Krodal.
    //    Changes by louarnold removed.
    //    Scanning addresses changed from 0...127 to 1...119,
    //    according to the i2c scanner by Nick Gammon
    //    http://www.gammon.com.au/forum/?id=10896
    // Version 5, March 28, 2013
    //    As version 4, but address scans now to 127.
    //    A sensor seems to use address 120.
    // Version 6, November 27, 2015.
    //    Added waiting for the Leonardo serial communication.
    //
    //
    // This sketch tests the standard 7-bit addresses
    // Devices with higher bit address might not be seen properly.
    //
    
    // #define FRANKESTEIN
    #include <Wire.h>
    void printKnownChips(byte address);
    
    // BUGBUG::Should put this in WireIMXRT.h
    #if defined(__IMXRT1062__)
    #define WIRE_IMPLEMENT_WIRE
    #define WIRE_IMPLEMENT_WIRE1
    #define WIRE_IMPLEMENT_WIRE2
    #endif
    typedef struct {
      TwoWire *_wire;
      const char * wire_name;
    #if defined(__IMXRT1062__)
      IMXRT_LPI2C_t * const port;
    #endif
    } wire_list_t;
    
    wire_list_t wireList[] = {
      {
        &Wire,
        "Wire"
    #if defined(__IMXRT1062__)
        , &IMXRT_LPI2C1
    #endif
      }
    #if defined(WIRE_IMPLEMENT_WIRE1)
      , {
        &Wire1,
        "Wire1"
    #if defined(__IMXRT1062__)
        , &IMXRT_LPI2C3
    #endif
      }
    #endif
    #if defined(WIRE_IMPLEMENT_WIRE2)
      , {
        &Wire2,
        "Wire2"
    #if defined(__IMXRT1062__)
        , &IMXRT_LPI2C4
    #endif
      }
    #endif
    #if defined(WIRE_IMPLEMENT_WIRE3)
      , {
        &Wire3,
        "Wire3",
    #if defined(__IMXRT1062__)
        nullptr
    #endif
      }
    #endif
    };
    const uint8_t wirelist_count = sizeof(wireList) / sizeof(wireList[0]);
    
    
    #ifdef FRANKESTEIN
    void Scansetup() {
    #else
    void setup() {
    #endif
      // uncomment these to use alternate pins
      //Wire.setSCL(16);
      //Wire.setSDA(17);
      for (uint8_t windex = 0; windex < wirelist_count; windex++) {
        wireList[windex]._wire->begin();
      }
      Serial.begin(9600);
      while (!Serial);        // Leonardo: wait for serial monitor
      Serial.println(F("\nI2C Scanner"));
    }
    
    #ifdef FRANKESTEIN
    void Scanloop() {
    #else
    void loop() {
    #endif
      byte error, address;
      int nDevices;
    
      for (uint8_t windex = 0; windex < wirelist_count; windex++) {
    #if defined(__IMXRT1062__)
        IMXRT_LPI2C_t * const port = wireList[windex].port;
    #endif
        Serial.print(F("Scanning("));
        Serial.print(wireList[windex].wire_name);
        Serial.println(F(")..."));
        nDevices = 0;
        for (address = 1; address < 127; address++) {
          // The i2c_scanner uses the return value of
          // the Write.endTransmisstion to see if
          // a device did acknowledge to the address.
          wireList[windex]._wire->beginTransmission(address);
          error = wireList[windex]._wire->endTransmission();
    
          if (error == 0) {
            Serial.print(F("Device found at address 0x"));
            if (address < 16) {
              Serial.print("0");
            }
            Serial.print(address, HEX);
            Serial.print("  (");
            printKnownChips(address);
            Serial.println(")");
    
            nDevices++;
          } else if (error == 4) {
            Serial.print(F("Unknown error at address 0x"));
            if (address < 16) {
              Serial.print("0");
            }
            Serial.print(address, HEX);
    #if defined(__IMXRT1062__)
            Serial.printf("\tMCR:%x MSR:%x, MIER:%x MDER:%x MCFGR0:%x MDMR:%x MCCR0:%x\n",
                          port->MCR, port->MSR, port->MIER, port->MDER, port->MCFGR0, port->MDMR, port->MCCR0);
    #else
            Serial.println();
    #endif
          }
        }
        if (nDevices == 0) {
          Serial.println(F("No I2C devices found\n"));
        } else {
          Serial.println(F("done\n"));
        }
      }
    #ifdef FRANKESTEIN
      delay(5);           // short wait for exit
    #else
      delay(5000);           // wait 5 seconds for next scan
    #endif
    }
    
    void printKnownChips(byte address)
    {
      // Is this list missing part numbers for chips you use?
      // Please suggest additions here:
      // https://github.com/PaulStoffregen/Wire/issues/new
      switch (address) {
        case 0x00: Serial.print(F("AS3935")); break;
        case 0x01: Serial.print(F("AS3935")); break;
        case 0x02: Serial.print(F("AS3935")); break;
        case 0x03: Serial.print(F("AS3935")); break;
        case 0x0A: Serial.print(F("SGTL5000")); break; // MCLK required
        case 0x0B: Serial.print(F("SMBusBattery?")); break;
        case 0x0C: Serial.print(F("AK8963")); break;
        case 0x10: Serial.print(F("CS4272")); break;
        case 0x11: Serial.print(F("Si4713")); break;
        case 0x13: Serial.print(F("VCNL4000,AK4558")); break;
        case 0x18: Serial.print(F("LIS331DLH")); break;
        case 0x19: Serial.print(F("LSM303,LIS331DLH")); break;
        case 0x1A: Serial.print(F("WM8731")); break;
        case 0x1C: Serial.print(F("LIS3MDL")); break;
        case 0x1D: Serial.print(F("LSM303D,LSM9DS0,ADXL345,MMA7455L,LSM9DS1,LIS3DSH")); break;
        case 0x1E: Serial.print(F("LSM303D,HMC5883L,FXOS8700,LIS3DSH")); break;
        case 0x20: Serial.print(F("MCP23017,MCP23008,PCF8574,FXAS21002,SoilMoisture")); break;
        case 0x21: Serial.print(F("MCP23017,MCP23008,PCF8574")); break;
        case 0x22: Serial.print(F("MCP23017,MCP23008,PCF8574")); break;
        case 0x23: Serial.print(F("MCP23017,MCP23008,PCF8574")); break;
        case 0x24: Serial.print(F("MCP23017,MCP23008,PCF8574")); break;
        case 0x25: Serial.print(F("MCP23017,MCP23008,PCF8574")); break;
        case 0x26: Serial.print(F("MCP23017,MCP23008,PCF8574")); break;
        case 0x27: Serial.print(F("MCP23017,MCP23008,PCF8574,LCD16x2,DigoleDisplay")); break;
        case 0x28: Serial.print(F("BNO055,EM7180,CAP1188")); break;
        case 0x29: Serial.print(F("TSL2561,VL6180,TSL2561,TSL2591,BNO055,CAP1188")); break;
        case 0x2A: Serial.print(F("SGTL5000,CAP1188")); break;
        case 0x2B: Serial.print(F("CAP1188")); break;
        case 0x2C: Serial.print(F("MCP44XX ePot")); break;
        case 0x2D: Serial.print(F("MCP44XX ePot")); break;
        case 0x2E: Serial.print(F("MCP44XX ePot")); break;
        case 0x2F: Serial.print(F("MCP44XX ePot")); break;
        case 0x33: Serial.print(F("MAX11614,MAX11615")); break;
        case 0x34: Serial.print(F("MAX11612,MAX11613")); break;
        case 0x35: Serial.print(F("MAX11616,MAX11617")); break;
        case 0x38: Serial.print(F("RA8875,FT6206,MAX98390")); break;
        case 0x39: Serial.print(F("TSL2561, APDS9960")); break;
        case 0x3C: Serial.print(F("SSD1306,DigisparkOLED")); break;
        case 0x3D: Serial.print(F("SSD1306")); break;
        case 0x40: Serial.print(F("PCA9685,Si7021")); break;
        case 0x41: Serial.print(F("STMPE610,PCA9685")); break;
        case 0x42: Serial.print(F("PCA9685")); break;
        case 0x43: Serial.print(F("PCA9685")); break;
        case 0x44: Serial.print(F("PCA9685, SHT3X")); break;
        case 0x45: Serial.print(F("PCA9685, SHT3X")); break;
        case 0x46: Serial.print(F("PCA9685")); break;
        case 0x47: Serial.print(F("PCA9685")); break;
        case 0x48: Serial.print(F("ADS1115,PN532,TMP102,LM75,PCF8591")); break;
        case 0x49: Serial.print(F("ADS1115,TSL2561,PCF8591")); break;
        case 0x4A: Serial.print(F("ADS1115,Qwiic Keypad")); break;
        case 0x4B: Serial.print(F("ADS1115,TMP102,BNO080,Qwiic Keypad")); break;
        case 0x50: Serial.print(F("EEPROM,FRAM")); break;
        case 0x51: Serial.print(F("EEPROM")); break;
        case 0x52: Serial.print(F("Nunchuk,EEPROM")); break;
        case 0x53: Serial.print(F("ADXL345,EEPROM")); break;
        case 0x54: Serial.print(F("EEPROM")); break;
        case 0x55: Serial.print(F("EEPROM")); break;
        case 0x56: Serial.print(F("EEPROM")); break;
        case 0x57: Serial.print(F("EEPROM")); break;
        case 0x58: Serial.print(F("TPA2016,MAX21100")); break;
        case 0x5A: Serial.print(F("MPR121")); break;
        case 0x60: Serial.print(F("MPL3115,MCP4725,MCP4728,TEA5767,Si5351")); break;
        case 0x61: Serial.print(F("MCP4725,AtlasEzoDO,Qwiic Button")); break;
        case 0x62: Serial.print(F("LidarLite,MCP4725,AtlasEzoORP,Qwiic Button")); break;
        case 0x63: Serial.print(F("MCP4725,AtlasEzoPH,Qwiic Button")); break;
        case 0x64: Serial.print(F("AtlasEzoEC,Qwiic Button")); break;
        case 0x65: Serial.print(F("Qwiic Button")); break;
        case 0x66: Serial.print(F("AtlasEzoRTD,Qwiic Button")); break;
        case 0x67: Serial.print(F("Qwiic Button,Qwiic Button")); break;
        case 0x68: Serial.print(F("DS1307,DS3231,MPU6050,MPU9050,MPU9250,ITG3200,ITG3701,LSM9DS0,L3G4200D,Qwiic Button")); break;
        case 0x69: Serial.print(F("MPU6050,MPU9050,MPU9250,ITG3701,L3G4200D,Qwiic Button")); break;
        case 0x6A: Serial.print(F("LSM9DS1,Qwiic Button")); break;
        case 0x6B: Serial.print(F("LSM9DS0,Qwiic Button")); break;
        case 0x6C: Serial.print(F("Qwiic Button")); break;
        case 0x6D: Serial.print(F("Qwiic Button")); break;
        case 0x6E: Serial.print(F("Qwiic Button")); break;
        case 0x6F: Serial.print(F("Qwiic Button")); break;
        case 0x70: Serial.print(F("HT16K33")); break;
        case 0x71: Serial.print(F("SFE7SEG,HT16K33")); break;
        case 0x72: Serial.print(F("HT16K33")); break;
        case 0x73: Serial.print(F("HT16K33")); break;
        case 0x76: Serial.print(F("MS5607,MS5611,MS5637,BMP280")); break;
        case 0x77: Serial.print(F("BMP085,BMA180,BMP280,MS5611")); break;
        case 0x7C: Serial.print(F("FRAM_ID")); break;
        default: Serial.print(F("unknown chip"));
      }
    }
    Thank you so much! Seems the accelerometers I am using , are all detected on the teensy.

    Seems though that the bno080 does not output data somehow.

Posting Permissions

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