Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Diff: Capteurs/Infra.h
- 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