From 4ab22f4df3259f5bc7410ce3ce441eb63de3f7cf Mon Sep 17 00:00:00 2001 From: Victor Le Roch Date: Mon, 18 May 2020 14:23:56 +0200 Subject: [PATCH] main avec radiator et manometre, test sans la boucle for --- OtherDevices/DigitalDevices/.DS_Store | Bin 6148 -> 6148 bytes .../ExternalDigitalSensorButton.cpp | 7 +++--- board.cpp | 3 ++- core_simulation.h | 2 ++ include/.DS_Store | Bin 10244 -> 10244 bytes include/DigitalDevices/.DS_Store | Bin 0 -> 6148 bytes sketch_ino.cpp | 20 ++++++++++-------- 7 files changed, 19 insertions(+), 13 deletions(-) create mode 100644 include/DigitalDevices/.DS_Store diff --git a/OtherDevices/DigitalDevices/.DS_Store b/OtherDevices/DigitalDevices/.DS_Store index f459e15b060b4d7fca5a6cb9cb18dbaf569842a3..2b11151ab9aeaff472eede5268e81ef5e3cf6e80 100644 GIT binary patch delta 79 zcmZoMXfc=|&e%S&P;8=}A|unp0PD#HA}ka8b;bD@To^JL(t)^yA(0`6A($bRA&;SW i<0=#O&FmZk9E|N74}NE!%rBzL$gtT_getState(); sleep(temps); } -} \ No newline at end of file +} diff --git a/board.cpp b/board.cpp index d228dcf..6f6ee08 100644 --- a/board.cpp +++ b/board.cpp @@ -18,7 +18,7 @@ int main(){ AnalogSensorLuminosity luminosite(DELAY); ExternalDigitalSensorButton button(DELAY); AnalogSensorManometre manometre(4,DELAY); - //DigitalActuatorRadiator radiator( + DigitalActuatorRadiator radiator(DELAY, THRESHOLDHIGH, THRESHOLDLOW); // branchement des capteurs actionneurs @@ -28,6 +28,7 @@ int main(){ esp8266.i2c(1,screen); esp8266.pin(4, button); esp8266.pin(5, manometre); + esp8266.pin(6, radiator); // allumage de la carte esp8266.run(); diff --git a/core_simulation.h b/core_simulation.h index 58cc60b..4be9011 100644 --- a/core_simulation.h +++ b/core_simulation.h @@ -13,6 +13,8 @@ #define MAX_I2C_DEVICES 4 #define I2C_BUFFER_SIZE 1024 #define MAX_IO_PIN 6 +#define THRESHOLDHIGH 25 +#define THRESHOLDLOW 15 using namespace std; diff --git a/include/.DS_Store b/include/.DS_Store index a18ff607f6a17cbb216229a857d76fd8baf550a5..3ceb2d97ffe7f97ed712b1f51612b95b5c486987 100644 GIT binary patch delta 69 zcmZn(XbG6$&nUDpU^hRb(BuGdxy@Pv>WoY#;b8U~iTzBQ4MciaCd&x&Ouix~J9&=; X9~0+;$rt4mHouYh#I~7T;V(M?|GgJS delta 74 zcmZn(XbG6$&nUPtU^hRb;N$>txy@Pv>WoardSJGwk diff --git a/include/DigitalDevices/.DS_Store b/include/DigitalDevices/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..f459e15b060b4d7fca5a6cb9cb18dbaf569842a3 GIT binary patch literal 6148 zcmeHK%Sr=55Ukc50$%p$ael!+Si|}S{(zc*2n!1)x$i08<)>NwI2aZ|2wp-p^wdmG z*9=pK?QHXrObSQ=DIf);fE2h$fhwo#yNgZ{SqeyjYgE9$4~_2F7tV?C>EIA8 z0CB}|80XPT5Ss^xec_zQ2+fj8OsZ9jVM%AaRbF2>CngCB zC