Sonar

Dependencies:   mbed SDHC_FileSystem DS18B20_1wire HC_SR04_Ultrasonic_Library

Files at this revision

API Documentation at this revision

Comitter:
igorsilvati
Date:
Thu Sep 22 16:18:36 2016 +0000
Commit message:
Pega ai

Changed in this revision

ModuloSD/SDHC_FileSystem.lib Show annotated file Show diff for this revision Revisions of this file
ModuloSD/cartaoSD.cpp Show annotated file Show diff for this revision Revisions of this file
ModuloSD/cartaoSD.h Show annotated file Show diff for this revision Revisions of this file
SensorTemperatura/DS18B20_1wire.lib Show annotated file Show diff for this revision Revisions of this file
SensorTemperatura/Temperatura.cpp Show annotated file Show diff for this revision Revisions of this file
SensorTemperatura/Temperatura.h Show annotated file Show diff for this revision Revisions of this file
Sonar/HC_SR04_Ultrasonic_Library.lib Show annotated file Show diff for this revision Revisions of this file
Sonar/sonar.cpp Show annotated file Show diff for this revision Revisions of this file
Sonar/sonar.h 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 a449396d32de ModuloSD/SDHC_FileSystem.lib
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/ModuloSD/SDHC_FileSystem.lib	Thu Sep 22 16:18:36 2016 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/tylerjw/code/SDHC_FileSystem/#b553aa902f90
diff -r 000000000000 -r a449396d32de ModuloSD/cartaoSD.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/ModuloSD/cartaoSD.cpp	Thu Sep 22 16:18:36 2016 +0000
@@ -0,0 +1,2 @@
+#include "cartaoSD.h"
+#include "mbed.h"
\ No newline at end of file
diff -r 000000000000 -r a449396d32de ModuloSD/cartaoSD.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/ModuloSD/cartaoSD.h	Thu Sep 22 16:18:36 2016 +0000
@@ -0,0 +1,27 @@
+#ifndef cartaoSD_H
+#define cartaoSD_H
+
+#include "mbed.h"
+#include "SDHCFileSystem"
+
+class cartaoSD{
+    
+    const 
+    
+    
+    
+    
+    SDFileSystem(PinName mosi, PinName miso, PinName sclk, PinName cs, const char* name);
+    public:
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    };
+    
+#endif
\ No newline at end of file
diff -r 000000000000 -r a449396d32de SensorTemperatura/DS18B20_1wire.lib
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/SensorTemperatura/DS18B20_1wire.lib	Thu Sep 22 16:18:36 2016 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/richardlane/code/DS18B20_1wire/#00972ed59ba3
diff -r 000000000000 -r a449396d32de SensorTemperatura/Temperatura.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/SensorTemperatura/Temperatura.cpp	Thu Sep 22 16:18:36 2016 +0000
@@ -0,0 +1,2 @@
+#include "Temperatura.h"
+#include "mbed.h"
\ No newline at end of file
diff -r 000000000000 -r a449396d32de SensorTemperatura/Temperatura.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/SensorTemperatura/Temperatura.h	Thu Sep 22 16:18:36 2016 +0000
@@ -0,0 +1,23 @@
+#ifndef Temperatura_H
+#define Temperatura_H
+
+#include "mbed.h"
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+#endif
\ No newline at end of file
diff -r 000000000000 -r a449396d32de Sonar/HC_SR04_Ultrasonic_Library.lib
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Sonar/HC_SR04_Ultrasonic_Library.lib	Thu Sep 22 16:18:36 2016 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/ejteb/code/HC_SR04_Ultrasonic_Library/#e0f9c9fb4cf3
diff -r 000000000000 -r a449396d32de Sonar/sonar.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Sonar/sonar.cpp	Thu Sep 22 16:18:36 2016 +0000
@@ -0,0 +1,17 @@
+#include "sonar.h"
+#include "mbed.h"
+#include "ultrasonic.h"
+
+Sonar::Sonar():
+_ultrasonic(Sonar::trigger, Sonar::echo, Sonar::updateTime, Sonar::timeout)
+{
+    
+    
+}
+
+float Sonar::lerDistancia(ultrasonic _ultrasonic){
+    
+    float distancia = _ultrasonic.getCurrentDistance();
+    return distancia;
+      
+}
\ No newline at end of file
diff -r 000000000000 -r a449396d32de Sonar/sonar.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Sonar/sonar.h	Thu Sep 22 16:18:36 2016 +0000
@@ -0,0 +1,26 @@
+#ifndef Sonar_H
+#define Sonar_H
+
+#include "mbed.h"
+#include "ultrasonic.h"
+
+class Sonar
+{
+    static const PinName trigger = D1; //Define o pino para o trigger 
+    static const PinName echo = D0; //Define o pino para o echo
+    static const float updateTime = .1;
+    static const float timeout = 1;
+   
+    //Inicializa o sensor nos pinos definidos acima
+    ultrasonic _ultrasonic;
+    
+public:
+    Sonar();
+    ~Sonar();
+    float lerDistancia(ultrasonic _ultrasonic);
+    
+protected:
+        
+};
+
+#endif
\ No newline at end of file
diff -r 000000000000 -r a449396d32de main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Thu Sep 22 16:18:36 2016 +0000
@@ -0,0 +1,14 @@
+#include "mbed.h"
+
+DigitalOut gpo(D0);
+DigitalOut led(LED_RED);
+ 
+
+int main()
+{
+    while (true) {
+        gpo = !gpo; // toggle pin
+        led = !led; // toggle led
+        wait(0.2f);
+    }
+}
\ No newline at end of file
diff -r 000000000000 -r a449396d32de mbed.bld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Thu Sep 22 16:18:36 2016 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/abea610beb85
\ No newline at end of file