Display Pressure and Temperature readings from the SCP1000 on uLCD

Dependencies:   4DGL-uLCD-SE SCP1000 mbed

Files at this revision

API Documentation at this revision

Comitter:
sdhingra
Date:
Mon Oct 20 00:26:24 2014 +0000
Commit message:
SCP1000 uLCD Display

Changed in this revision

4DGL-uLCD-SE.lib Show annotated file Show diff for this revision Revisions of this file
SCP1000.lib Show annotated file Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
mbed.bld Show annotated file Show diff for this revision Revisions of this file
diff -r 000000000000 -r 24462f386127 4DGL-uLCD-SE.lib
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/4DGL-uLCD-SE.lib	Mon Oct 20 00:26:24 2014 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/4180_1/code/4DGL-uLCD-SE/#e39a44de229a
diff -r 000000000000 -r 24462f386127 SCP1000.lib
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/SCP1000.lib	Mon Oct 20 00:26:24 2014 +0000
@@ -0,0 +1,1 @@
+http://developer.mbed.org/users/kadams6/code/SCP1000/#47d6f205890b
diff -r 000000000000 -r 24462f386127 main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Mon Oct 20 00:26:24 2014 +0000
@@ -0,0 +1,26 @@
+// 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);
+        }
+}
+
diff -r 000000000000 -r 24462f386127 mbed.bld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Mon Oct 20 00:26:24 2014 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/552587b429a1
\ No newline at end of file