Library to interface the SCP1000 temperature and pressure sensor.

Dependents:   SCP1000_Example ku-make_sensor ku-make_sensor201302 SCP1000_Example ... more

Embed: (wiki syntax)

« Back to documentation index

SCP1000 Class Reference

SCP1000 Class Reference

Class to interface with the SCP1000 pressure and temperature sensor. More...

#include <SCP1000.h>

Public Member Functions

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

Detailed Description

Class to interface with the SCP1000 pressure and temperature sensor.

Definition at line 29 of file SCP1000.h.


Constructor & Destructor Documentation

SCP1000 ( PinName  mosi,
PinName  miso,
PinName  sclk,
PinName  cs 
)

Constructor.

Parameters:
mosiSPI MOSI pin
misoSPI MISO pin
sclkSPI SCLK pin
csChip select pin

LICENSE

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

DESCRIPTION

Library to interface with the SCP1000 pressure and temperature sensor.

Definition at line 23 of file SCP1000.cpp.


Member Function Documentation

unsigned long readPressure (  )

Read the pressure.

Returns:
The pressure in pascals.

Definition at line 40 of file SCP1000.cpp.

float readTemperature (  )

Read the temperature.

Returns:
The temperature in Celsius.

Definition at line 50 of file SCP1000.cpp.