Projet_VictorAvecUnK/board.cpp
2020-05-16 18:51:29 +02:00

33 lines
987 B
C++

#include "core_simulation.h"
#include "mydevices.h"
#include "include/AnalogDevices/AnalogSensors/AnalogSensorTemperature.h"
#include "include/DigitalDevices/DigitalActuators/IntelligentDigitalActuatorLED.h"
#include "include/AnalogDevices/AnalogSensors/AnalogSensorLuminosity.h"
#include "include/DigitalDevices/DigitalSensors/ExternalDigitalSensorButton.h"
int main(){
// creation d'une board
Board esp8266;
// achat des senseurs et actionneurs
AnalogSensorTemperature temperature(TEMP,DELAY);
//DigitalActuatorLED led1(DELAY);
IntelligentDigitalActuatorLED led1(DELAY);
I2CActuatorScreen screen;
AnalogSensorLuminosity luminosite(DELAY);
ExternalDigitalSensorButton button(DELAY);
AnalogSensorManometre manometre(DELAY);
// branchement des capteurs actionneurs
esp8266.pin(1,temperature);
esp8266.pin(0,led1);
esp8266.pin(2, luminosite);
esp8266.i2c(1,screen);
esp8266.pin(4, button);
// allumage de la carte
esp8266.run();
return 0;
}