Vous êtes sur la page 1sur 11

Ministère de l’enseignement supérieur et de la recherche scientifique

Faculté des sciences mathématiques physiques et naturelles de Tunis


Mastère professionnel en système de télécommunication et réseaux

Etude et Mise en Place d ’une maison intelligente à


commande vocale

2021/2022
Plan

I- Introduction

II- Les éléments nécessaires pour ce projet

III- L’application RemoteXY

VI- Montage

V- Schéma de câblage

VI- Interface sur Smartphone android

VII- CODE
2
I-Introduction

Pour faciliter la vie des personnes, nous allons


réaliser un projet qui permet de contrôler
- une lampe
- un ventilateur
- un aspirateur de hot cuisine
- un four électrique
 II- Les éléments nécessaires pour ce projet

4
III- L’application RemoteXY
L’application RemoteXY est un moyen facile de
créer et d'utiliser une interface utilisateur
graphique mobile pour les cartes
contrôleurs à contrôler via un smartphone
ou une tablette.

5
 VI- Montage
V- Schéma de câblage

7
 VI- Interface sur Smartphone android
 VI- CODE
 #define REMOTEXY_MODE__ESP8266_SOFTSERIAL_POINT
 #include <SoftwareSerial.h>

 #include <RemoteXY.h>

 // RemoteXY connection settings


 #define REMOTEXY_SERIAL_RX 2
 #define REMOTEXY_SERIAL_TX 3
 #define REMOTEXY_SERIAL_SPEED 9600
 #define REMOTEXY_WIFI_SSID "RemoteXY"
 #define REMOTEXY_WIFI_PASSWORD "12345678"
 #define REMOTEXY_SERVER_PORT 6377
 // RemoteXY configurate
 #pragma pack(push, 1)
 uint8_t RemoteXY_CONF[] =
 { 255,4,0,0,0,71,0,13,13,0,
 2,0,7,14,22,11,2,26,31,31,
 79,78,0,79,70,70,0,2,0,7,
 43,22,11,2,26,31,31,79,78,0,
 79,70,70,0,2,0,70,15,22,11,
 2,26,31,31,79,78,0,79,70,70,
 0,2,0,70,45,22,11,2,26,31,
 31,79,78,0,79,70,70,0 };
 // this structure defines all the variables and events of your control interface
 struct {

 // input variables
 uint8_t switch_1; // =1 if switch ON and =0 if OFF
 uint8_t switch_2; // =1 if switch ON and =0 if OFF
 uint8_t switch_3; // =1 if switch ON and =0 if OFF
 uint8_t switch_4; // =1 if switch ON and =0 if OFF

 // other variable
 uint8_t connect_flag; // =1 if wire connected, else =0

 } RemoteXY;
 #pragma pack(pop)

 /////////////////////////////////////////////
 // END RemoteXY include //
 /////////////////////////////////////////////

 #define PIN_SWITCH_1 2
 #define PIN_SWITCH_2 3
 #define PIN_SWITCH_3 4
 #define PIN_SWITCH_4 5
 void setup()
 {
 RemoteXY_Init ();

 pinMode (PIN_SWITCH_1, OUTPUT);
 pinMode (PIN_SWITCH_2, OUTPUT);
 pinMode (PIN_SWITCH_3, OUTPUT);
 pinMode (PIN_SWITCH_4, OUTPUT);

 // TODO you setup code

 }
 void loop()
 {
 RemoteXY_Handler ();
 digitalWrite(PIN_SWITCH_1, (RemoteXY.switch_1==0)?LOW:HIGH);
 digitalWrite(PIN_SWITCH_2, (RemoteXY.switch_2==0)?LOW:HIGH);
 digitalWrite(PIN_SWITCH_3, (RemoteXY.switch_3==0)?LOW:HIGH);
 digitalWrite(PIN_SWITCH_4, (RemoteXY.switch_4==0)?LOW:HIGH);

 // TODO you loop code
 // use the RemoteXY structure for data transfer
 // do not call delay()

 }

Vous aimerez peut-être aussi