Exemplo 01 para o SGAM 1. Exemplo com o WHILE 2. Exemplo usando MBED EVENTS

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
AndersonIctus
Date:
Sun May 19 15:03:38 2019 +0000
Commit message:
initial commit

Changed in this revision

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
sgam/sensor/temperatura/Temperatura.cpp Show annotated file Show diff for this revision Revisions of this file
sgam/sensor/temperatura/Temperatura.h Show annotated file Show diff for this revision Revisions of this file
diff -r 000000000000 -r b38fbba9d274 main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Sun May 19 15:03:38 2019 +0000
@@ -0,0 +1,14 @@
+#include "mbed.h"
+
+// DigitalOut myled(LED1);
+
+int main() {
+//    while(1) {
+//        myled = 1; // LED is ON
+//        wait(0.2); // 200 ms
+//        myled = 0; // LED is OFF
+//        wait(1.0); // 1 sec
+//    }
+    
+    return 0;
+}
diff -r 000000000000 -r b38fbba9d274 mbed.bld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Sun May 19 15:03:38 2019 +0000
@@ -0,0 +1,1 @@
+https://os.mbed.com/users/mbed_official/code/mbed/builds/65be27845400
\ No newline at end of file
diff -r 000000000000 -r b38fbba9d274 sgam/sensor/temperatura/Temperatura.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sgam/sensor/temperatura/Temperatura.cpp	Sun May 19 15:03:38 2019 +0000
@@ -0,0 +1,5 @@
+#include "Temperatura.h"
+
+float Temperatura::getTemperature() {
+    return 30.5;    
+}
diff -r 000000000000 -r b38fbba9d274 sgam/sensor/temperatura/Temperatura.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sgam/sensor/temperatura/Temperatura.h	Sun May 19 15:03:38 2019 +0000
@@ -0,0 +1,9 @@
+#ifndef SGAM_TEMPERATURA_H
+#define SGAM_TEMPERATURA_H
+
+class Temperatura {
+public:
+    float getTemperature();
+}
+;
+#endif // SGAM_TEMPERATURA_H
\ No newline at end of file