Home        Store        Docs        Blog

Bar30, Arduino UNO, Blue Robotic I2C - Always Same Data

ardusub

(yves lechasseur) #1

As showed in title, I am using the Bar30 on Arduino UNO with Blue Robotic I2C level Converter.

Connections are like this:

SDA = A4
SDL=A5
Red= Arduino board 5V
Black-= Arduino ground

To get some kind of reading, I put the Bar30 housing in a glass of water (not submerge). I am using the default example code and my result on the serial output is always the same, whatever the water hot or cold in the glass:

Pressure: 0.00 mbar
Temperature: 20.00 deg C
Depth: -10.36 m
Altitude: 44307.69 m above mean sea level

I am wondering what I am doing wrong ?

Thanks


(Jacob) #2

Can you please take a picture of your sensor and arduino and how they are connected? I am wondering if you are using the latest version of our library. Do you see these lines in the example program?

  // Returns true if initialization was successful
  // We can't continue with the rest of the program unless we can initialize the sensor
  while (!sensor.init()) {
    Serial.println("Init failed!");
    Serial.println("Are SDA/SCL connected correctly?");
    Serial.println("Blue Robotics Bar30: White=SDA, Green=SCL");
    Serial.println("\n\n\n");
    delay(5000);
  }

(yves lechasseur) #3

I removed these lines when I was debugging and I forget to put them back in the code… Now my data look a lot better

Reading Bar30
Pressure: 1031.00 mbar
Temperature: 24.73 deg C
Depth: 0.18 m
Altitude: -146.66 m above mean sea level

Thank you , it is very appreciated

Yves