Libreria PIR

Dependencies:   mbed

Dependents:   TotalSmartLights

Files at this revision

API Documentation at this revision

Comitter:
junmorenodi
Date:
Thu Jul 11 13:08:11 2019 +0000
Commit message:
PIR;

Changed in this revision

PIR.cpp Show annotated file Show diff for this revision Revisions of this file
PIR.h 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 f3032ddb50fb PIR.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/PIR.cpp	Thu Jul 11 13:08:11 2019 +0000
@@ -0,0 +1,12 @@
+#include "mbed.h"
+#include "PIR.h"
+
+PIR::PIR(PinName input) : digit(input)
+{ 
+}
+    
+bool PIR::getData(){
+    return digit.read() ;
+}
+
+
diff -r 000000000000 -r f3032ddb50fb PIR.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/PIR.h	Thu Jul 11 13:08:11 2019 +0000
@@ -0,0 +1,17 @@
+#include "mbed.h"
+#ifndef PIR_h
+#define PIR_h
+class PIR   
+{
+public:
+
+PIR(PinName input);
+
+bool getData( void);
+
+
+private:
+
+DigitalIn digit; 
+};
+#endif
\ No newline at end of file
diff -r 000000000000 -r f3032ddb50fb mbed.bld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Thu Jul 11 13:08:11 2019 +0000
@@ -0,0 +1,1 @@
+https://os.mbed.com/users/mbed_official/code/mbed/builds/65be27845400
\ No newline at end of file