Coder Social home page Coder Social logo

Comments (5)

Schm1tz1 avatar Schm1tz1 commented on June 25, 2024

Hi Gerald,

Looks like the I2C-Connection is not working. I don't know all the details of your setup, but some ideas that might help:

  • Please check hardware first:
    • are the cables you are using ok?
    • are you using the correct I2C pins for your chip? Please double-check the pinout.
  • Start with the most simple example (i.e. Test)

If that still doesn't work, try to scan you I2C-Bus. There is a default I2C-Example from Arduino that performs a scan of all I2C-Addresses or use something like this.
It should find a device and give you the I2C-Address. If that still doesn't find a device, there is something not ok with the chip.

If it finds a device, perfect!
Next step: You have to check that the I2C-Address you are using is correct. I am using default addresses from devices from 2012/2013 in my examples. Sometimes manufacturers change these addresses depending on the version of the chip/board. If you find a different I2C-Address, you can simply set it in you code with the public method setI2Caddr(char aAddr) before using running the connect method.

Example:

MS5xxx sensor(&Wire);
sensor.setI2Caddr(0x42); // change the 0x42 to the I2C address that was found by your scan.

void setup() {
  Serial.begin(9600);
  if(sensor.connect()>0) {
    Serial.println("Error connecting...");
    delay(500);
    setup();
  }
}

Hope that helps - please let me know if that works. I really think the manufacturer changed the address as I could find some forks for the same chip with different address.

Cheers,
Roman

from arduino-ms5xxx.

Schm1tz1 avatar Schm1tz1 commented on June 25, 2024

Hi @kreativnix - is there any update on this issue? From my point of view it can be only the I2C-Address and this is not a bug but something that needs to be configured. I have added information on how to change it.

from arduino-ms5xxx.

kreativnix avatar kreativnix commented on June 25, 2024

from arduino-ms5xxx.

Schm1tz1 avatar Schm1tz1 commented on June 25, 2024

Concerning the I2C-Address:
Thanks for the update. From the fork at ImperialSpaceSociety I can also see that obviously the default I2C address was changed by the manufacturer.

Interesting problem, seems a bit strange that is issue is rather new and was not observed before (or at least not reported). I am not aware of any differences using the ESP8266 Wire libraries that might cause this issue. I've been using it with ESP8266 and ESP32 for months without any problems. There must be some small difference in code or a different version of one of the libraries... I have to double-check what changes in code might cause this issue.

Questions @kreativnix: Is the MS5607-master the old version of this library or from a different project? Are you using a MS5607 or some different sensor?

from arduino-ms5xxx.

kreativnix avatar kreativnix commented on June 25, 2024

from arduino-ms5xxx.

Related Issues (6)

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.