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: Sensor.h
- Revision:
- 0:091e1a699d64
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Sensor.h Mon Jan 07 10:58:16 2019 +0000 @@ -0,0 +1,36 @@ +#define _COLOR_SENSOR_ +#define _GND_SENSOR_ +#define _DHT_SENSOR_ +#include "DS1820.h" +#include "DHT.h" +#include "glibr.h" + + + +extern float airTemperature; +extern float airHumidity; +extern unsigned short ambientLight, redLight, greenLight, blueLight; +extern double gndTemperature; +extern int gndHumidity; +extern DS1820 gndTemperatureSensor; +extern AnalogIn gndHumSensor; +#ifdef _DHT_SENSOR_ +#endif + +#ifdef _COLOR_SENSOR_ +extern glibr rgbSensor; // liaison de type I2C avec le module de mesure de lumière + +void init_rgbSensor(); // initialise le capteur de lumière +void getLightValues(unsigned short *ambientLight, unsigned short *redLight, unsigned short *greenLight, unsigned short *blueLight); // récupère les données du capteur de lumière +#endif + +#ifdef _GND_SENSOR_ + +#define GND_TMP_SENSOR A0 +#define HUM_MAX 24500.0 +#define HUM_MIN 20600.0 + +void init_gndTmp(); //initialise le capteur de température du sol +double getGndTemperature(); // retourne la valeur de la température du sol en °C +int getGndHumidity(); +#endif