You are viewing an older revision! See the latest version
SCP1000 Pressure Sensor
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.
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 Cool Components SCP1000-D01 break out board
- Avaliable as a Sparkfun SCP1000-D01 breakout board
Hello World¶
SCP1000-D01 | mbed |
---|---|
CSB | p8 |
MISO | p6 |
MOSI | p5 |
SCK | p7 |
Import program
00001 #include "mbed.h" 00002 #include "scp1000.h" 00003 00004 00005 Serial pc(USBTX, USBRX); 00006 SCP1000 Pressure(p5,p6,p7,p8); 00007 00008 00009 int main() { 00010 pc.printf("The pressure is %f Pa and the temperature is %f C", Pressure.read(), Pressure.readTemperature()); 00011 return(0); 00012 }
Library¶
This library for the SCP1000-D01 uses the high resolution mode with a 4 wire connection.
Import library
Public Member Functions |
|
SCP1000 (PinName mosi, PinName miso, PinName sck, PinName CSB) | |
Constructor.
|
|
float | read () |
Read the current Pressure.
|
|
float | readTemperature () |
Reads the temperature as measured by the
SCP1000
.
|