DS3231 and pressure sensor problem

Hello,

I am working with an arduino promini with ds 3231, microsd card breakkout board and HSC PRESSURE SENSOR.(HSCDRRN400MD2A3)

However, the pressure sensor gives values like 374.98 CONTINOUSLY.And the time is being printed as 2165/165/165 165:165:165

Can anyone tell me where the problem is?

Thank you

I have checked the timer and pressure sensor separately, it prints out the correct time and date and the correct pressure also. When I use it with the microcontroller, sd card and all together, the time and pressure are being printed like this.

dpoornima:
I have checked the timer and pressure sensor separately, it prints out the correct time and date and the correct pressure also. When I use it with the microcontroller, sd card and all together, the time and pressure are being printed like this.

can you post that code of just the pressure that was working ?

And the time is being printed as 2165/165/165 165:165:165

This is a classic symptom of the rtc not being seen on the ic bus. Does either module, or both, have pullups on the sda/scl lines?

Can you run the i2c scanner program on the assembled package and see if the addresses are recognized when all the components are assembled together?

If you run the current code on the complete system with either the RTC or the pressure sensor commented out, does either one work alone?

// I2C Scanner
// Written by Nick Gammon
// Date: 20th April 2011

#include <Wire.h>

void setup() {
 Serial.begin (115200);

 // Leonardo: wait for serial port to connect
 while (!Serial) 
   {
   }

 Serial.println ();
 Serial.println ("I2C scanner. Scanning ...");
 byte count = 0;
 
 Wire.begin();
 for (byte i = 8; i < 120; i++)
 {
   Wire.beginTransmission (i);
   if (Wire.endTransmission () == 0)
     {
     Serial.print ("Found address: ");
     Serial.print (i, DEC);
     Serial.print (" (0x");
     Serial.print (i, HEX);
     Serial.println (")");
     count++;
     delay (1);  // maybe unneeded?
     } // end of good response
 } // end of for loop
 Serial.println ("Done.");
 Serial.print ("Found ");
 Serial.print (count, DEC);
 Serial.println (" device(s).");
}  // end of setup

void loop() {}

Nicks code may be needed as part of a reset with DS parts
to ensure reset.
Put his code as part of the init and see if it gets the Dallas part
working. If it does, you can just comment out the printing part.
Dwight

Hello,

I followed your instructions and it now works. Thank you!!!

I have followed your instructions, but it does not work and an error occurred while processing suspension. Tell me how to handle? thank you

connect only the microcontroller and the I2C device you are using and run the I2C scanner code.

What does “processing suspension” mean?
Dwight