SCP1000-D01 MEMS pressure sensor library
SCP1000 Class Reference
Includes. More...
#include <scp1000.h>
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. |
Detailed Description
Includes.
Class to allow reading of the SCP1000-D01 mems pressure sensor (SPI mode). The class currently only supports High resolution mode. This means that the sensor can be read at a maximum rate of 1.8Hz.
Definition at line 39 of file scp1000.h.
Constructor & Destructor Documentation
SCP1000 | ( | PinName | mosi, |
PinName | miso, | ||
PinName | sck, | ||
PinName | CSB | ||
) |
Constructor.
- Parameters:
-
mosi The MOSI pin for the SPI interface miso The MISO pin for the SPI interface CSB The Chip select on the SCP1000
LICENSE
Copyright (c) 2010 ARM Ltd.
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
DESCRIPTION
Library for using the SCP1000-D01 MEMS Pressure sensor, this is the SPI version. This library only supports high resolution mode. Communication with the sensor is via a 4 wire interface
Definition at line 32 of file scp1000.cpp.
Member Function Documentation
float read | ( | ) |
Read the current Pressure.
This blocks until the sensor has completed a reading
- Returns:
- The pressure in pascals (N/m2)
Definition at line 90 of file scp1000.cpp.
float readTemperature | ( | ) |
Reads the temperature as measured by the SCP1000.
This blocks until the sensor has completed a reading
- Returns:
- The temperature in degrees celsius
Definition at line 110 of file scp1000.cpp.
Generated on Wed Jul 13 2022 01:56:31 by 1.7.2