SCP1000 Pressure Sensor

Table of Contents

  1. Hello World
  2. Library

The SCP1000 is a MEMs barometric pressure sensor in a surface mount package. It outputs absolute pressure at 17 bit resolution. The small package also includes a temperature sensor. The data is internally compensated and the range of the sensor is 30kPa...120kPa and -20C...70C.

SCP1000

The sensor is avaliable for either SPI (SPC1000-D01) or I2C (SCP1000-D11) communication. However, the library on this page is for the SPI version.

Avaliable as a

Hello World

» Import this program

00001 #include "mbed.h"
00002 #include "SCP1000.h"
00003 
00004 Serial pc(USBTX, USBRX);
00005 SCP1000 scp1000(p5,p6,p7,p8);
00006 
00007 int main() {
00008     pc.printf("The pressure is %d Pa and the temperature is %f C", scp1000.readPressure(), scp1000.readTemperature());
00009     return(0);
00010 }
SCP1000-D01mbed
CSBp8
MISOp6
MOSIp5
SCKp7

Library

This library for the SCP1000-D01 uses the high resolution mode with a 4 wire connection.

» Import this library into a program

Public Member Functions

  SCP1000 (PinName mosi, PinName miso, PinName sclk, PinName cs)
  Constructor.
unsigned long  readPressure ()
  Read the pressure.
float  readTemperature ()
  Read the temperature.




2 comments:

02 Nov 2010

I have the I2C version - is your code compatible?

Niclas

09 Mar 2011

Hi Guys,

I get pressure values that are backward: the higher I move the sensor, the higher the pressure values get. It should be the opposite. Is there something wrong with this library?

Thanks, mitch