ClosedCube SHT30A-EASY breakout module code example for SHT30-ARP-B Analog Humidity & Temperature Sensor

Dependencies:   SHT3XA mbed

Files at this revision

API Documentation at this revision

Comitter:
ClosedCube
Date:
Sun Sep 13 20:44:27 2015 +0000
Commit message:
ClosedCube SHT30A-EASY breakout module code example for SHT31-ARP-B Analog Humidity & Temperature Sensor;

Changed in this revision

SHT3XA.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 fe3d85ba2df8 SHT3XA.lib
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/SHT3XA.lib	Sun Sep 13 20:44:27 2015 +0000
@@ -0,0 +1,1 @@
+https://developer.mbed.org/users/ClosedCube/code/SHT3XA/#f0757a25e239
diff -r 000000000000 -r fe3d85ba2df8 main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Sun Sep 13 20:44:27 2015 +0000
@@ -0,0 +1,39 @@
+/*
+ SHT30-ARP-B Analog Humidity & Temperature Sensor Example Code 
+ ClosedCube SHT30A-EASY breakout module
+ 
+ License: This example code is in the public domain.
+ Date: 14-Sep-2015
+  
+ 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
+ */
+
+#include "mbed.h"
+#include "SHT3XA.h"
+
+/*
+    Hardware connections:
+        VDD to 3.3V
+        RH to A0
+        T to A1
+        GND to GND   
+*/
+SHT3XA sht30a(A0,A1);
+
+Serial pc(USBTX, USBRX);
+ 
+int main() {  
+    pc.baud(115200);
+    pc.printf("ClosedCube SHT30A-EASY example"); 
+
+    while( true ) {
+        pc.printf("T: %3.2fC RH: %3.2f%%\n", sht30a.readTempC(), sht30a.readRH());        
+        wait(0.3f);
+    }
+    
+}
\ No newline at end of file
diff -r 000000000000 -r fe3d85ba2df8 mbed.bld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Sun Sep 13 20:44:27 2015 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/ba1f97679dad
\ No newline at end of file