Anderson Cunha / Mbed OS example_smart-grid

Dependencies:   sgam-lib

Files at this revision

API Documentation at this revision

Comitter:
AndersonIctus
Date:
Mon May 20 23:28:24 2019 +0000
Parent:
2:b6bb08a9723d
Child:
4:60f2a8b3727c
Commit message:
Incluind lib para temperatura

Changed in this revision

Grove_temperature.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
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Grove_temperature.lib	Mon May 20 23:28:24 2019 +0000
@@ -0,0 +1,1 @@
+https://os.mbed.com/users/MACRUM/code/Grove_temperature/#aee37a51ccbb
--- a/main.cpp	Mon May 20 20:23:27 2019 -0300
+++ b/main.cpp	Mon May 20 23:28:24 2019 +0000
@@ -14,3 +14,28 @@
     led1 = 0;
     return 1;
 }
+
+/** 
+#include "mbed.h"
+#include "Grove_temperature.h"
+
+DigitalOut led(D6);
+Grove_temperature temp(A1);
+Serial pc(USBTX, USBRX);
+
+// main() runs in its own thread in the OS
+int main() {
+    printf("!!!INICIO!!!\r\n");
+    pc.baud(9600);
+    while (true) {
+        printf("temperature = %2.2f\r\n", temp.getTemperature());
+        
+        led = 1;    // Switch ON the LED.
+        wait(0.5);  // Wait for 0.5 Seconds.
+        led = 0;    // Switch OFF the LED.
+        wait(0.5);  // Wait for 0.5 Seconds.
+        
+        wait(1);
+    }
+}
+*/