CJMCU-06 Pressure Sensor Help

Hi Everyone,

I am working on building a vehicle gauge cluster, and one of the measurement parameters I wanted to include was altitude. I purchased CJMCU-06 pressure and temp sensor (which packages the SPL06-001), naively thinking it would would have a readily available Arduino library. Well, I was almost right.

As it appears, there is no library specifically for CJMCU-06 / SPL06-001, but there is a library for SPL06-007. The library appears to work to the extent that I can get coefficient and temperature readings from the sensor.

What I cannot get is reasonable pressure and altitude values, with the sensor/library returning negative values

  Serial.print("praw: ");
  Serial.println(get_praw());
  
  Serial.print("praw_sc: ");
  Serial.println(get_praw_sc(),3);

  Serial.print("pcomp: ");
  Serial.println(get_pcomp(),2);

  Serial.print("Measured Air Pressure: ");
  Serial.print(get_pressure(),2);
  Serial.println(" mb");
 praw: -4571852
 praw_sc: -0.581
 pcomp: -507417.53
 Measured Air Pressure: -5074.18 mb

I am guessing that the registers the library is reading are not quite the same between SPL06-001 and SPL06-007, and that's why I am getting wonky data.

Does anyone have any experience with this before I go digging through the library, or just chuck this board and buy something with better support?

The cause of the error may be in the another part of the code.
Please show your code in full

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.