Xavier Jannin / Mbed 2 deprecated PETIT_robot

Dependencies:   mbed

Revision:
0:1cfd66c3a181
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Capteurs/Infra.h	Wed May 22 16:54:27 2019 +0000
@@ -0,0 +1,33 @@
+#ifndef INFRA_H
+#define INFRA_H
+
+#include "mbed.h"
+#include <vector>
+
+class Infra {
+ public:
+  // Constructeur:
+  Infra(PinName);
+
+  // Mesure:
+  bool mesure();
+  
+  // Setters:
+  void setDistDetect(float);
+  void on();
+  void off();
+
+  // Getters:
+  float getDistance();
+  float getDistdetect();
+  float getVoltage();
+
+ private:
+  AnalogIn m_analog;
+  bool m_isOn;
+  float m_voltage;
+  float m_distance;
+  float m_distdetect;
+  bool m_detect;
+};
+#endif
\ No newline at end of file