Library to interface the SCP1000 temperature and pressure sensor.
Dependents: SCP1000_Example ku-make_sensor ku-make_sensor201302 SCP1000_Example ... more
Diff: SCP1000.cpp
- Revision:
- 6:70e36f2da425
- Parent:
- 5:8e06eb237dd2
- Child:
- 7:61d2e698d988
--- a/SCP1000.cpp Tue Oct 05 20:02:42 2010 +0000 +++ b/SCP1000.cpp Tue Oct 05 20:04:30 2010 +0000 @@ -1,3 +1,7 @@ +/** \file + SCP1000 cpp file +*/ + #include "SCP1000.h" SCP1000::SCP1000(PinName mosi, PinName miso, PinName sclk, PinName cs) @@ -17,6 +21,11 @@ wait(0.5); } +///Reads the pressure +/** + Reads the pressure from the sensor + @return Pressure in pascals. +*/ unsigned long SCP1000::readPressure() { unsigned long pressure_msb = read_register(PRESSURE); pressure_msb &= 0x07;