SCP1000 over I2C

I have tried to use the SCP1000 code to my sensor but I get strange readings.

I modifed main a bit to get continous readings

SCP1000 scp1000(p5,p6,p7,p8); //4wire (PinName mosi, PinName miso, PinName sclk, PinName cs)
//SCP1000 scp1000(p10,p9,p11,p12); // I2C (mosi=SDA, miso=SDL)(rebuild SCP1000 to accept 2 pins)

int main() {
printf("Test with SCP1000\r\n");
while(1){
pc.printf("The pressure is %d Pa and the temperature is %f C \r\n", scp1000.readPressure(), scp1000.readTemperature());
wait(2);
}
}

 

Right now I only use MOSI and MISO but I think I have to modify scp1000.h to accept 2 pins instead of 4

 

On my Ardiono chip the sensor works great...


0 comments

You need to log in to post a comment