![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
Display Pressure and Temperature readings from the SCP1000 on uLCD
Dependencies: 4DGL-uLCD-SE SCP1000 mbed
main.cpp
- Committer:
- sdhingra
- Date:
- 2014-10-20
- Revision:
- 0:24462f386127
File content as of revision 0:24462f386127:
// Hello World! for the SCP1000 #include "mbed.h" #include "uLCD_4DGL.h" #include "SCP1000.h" uLCD_4DGL uLCD(p28, p27, p11); // create a global lcd object SCP1000 scp1000(p5,p6,p7,p8); float myTemp; float myPressure; int main() { while (true) { uLCD.locate(0,2); uLCD.printf("SCP1000 Demo!"); myTemp = scp1000.readTemperature(); myPressure = scp1000.readPressure(); uLCD.locate(0,5); uLCD.printf("Temp(C):\n %.3f", myTemp); uLCD.locate(0,8); uLCD.printf("Pressure(Pa):\n %.2f", myPressure); wait(0.5); } }