Giter VIP home page Giter VIP logo

Comments (4)

ppescher avatar ppescher commented on May 26, 2024

We verified I2C works as intended with an external EEPROM device. There are no known software or hardware problems.
Please check your connections and post the relevant code if you still have problems, along with details on your setup.

from opentracker.

adrfrank avatar adrfrank commented on May 26, 2024

I'm using the pins 3 and 4 from the j2 connector. The sensor is a MCP9808 and I tried to read using the arduino due library for this sensor.

What did you use to read the I2C bus? (I used wire.h) Can you please post the setup for your i2c test?

from opentracker.

ppescher avatar ppescher commented on May 26, 2024
#include <Wire.h>

#define Console SerialUSB
#define EEPROM_ADDR  0x50 // 24LC128 EEPROM I2C Device Address

void setup()
{
  delay(3000);

  Wire.begin();
  uint8_t data = 0x69; // Test data
  uint16_t addr = 0x1234; // Test address

  Wire.beginTransmission(EEPROM_ADDR); // Chosen base address
  Wire.write(addr >> 8);  // send MSB of the address
  Wire.write(addr & 0xFF); // send LSB of the address
  Wire.write(data); // send data
  Wire.endTransmission();

  delay(100);

  Wire.beginTransmission(EEPROM_ADDR); // Chosen base address
  Wire.write(addr >> 8);  // send MSB of the address
  Wire.write(addr & 0xFF); // send LSB of the address
  Wire.endTransmission(false); // don't generate a stop
  Wire.requestFrom(EEPROM_ADDR, 1, true); // Start read and stop at the end
  if (Wire.available() == 1) { // if one bytes was received
    Console.println(Wire.read());   // print the reading
  }
}

opentracker_i2c

Please check your connections, make sure the sensor is powered at 3.3V and that you use the device 7-bit I2C address for communication with the Wire library.

from opentracker.

adrfrank avatar adrfrank commented on May 26, 2024

Thank you, the problem was present when I connect more than two I2C devices. And I resolved it to change the connector type.

from opentracker.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.