no description
Fork of Middleware by
Initial.h@1:32a08ca33b00, 2015-12-07 (annotated)
- Committer:
- Jorge_Beltran
- Date:
- Mon Dec 07 01:50:01 2015 +0000
- Revision:
- 1:32a08ca33b00
- Parent:
- 0:d1ff330c5128
SensorsForGusProject
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
RoHe | 0:d1ff330c5128 | 1 | /* |
RoHe | 0:d1ff330c5128 | 2 | |
RoHe | 0:d1ff330c5128 | 3 | Initial.h |
RoHe | 0:d1ff330c5128 | 4 | |
RoHe | 0:d1ff330c5128 | 5 | Only to improve the clarity of main .cpp |
RoHe | 0:d1ff330c5128 | 6 | This don't have any new classes |
RoHe | 0:d1ff330c5128 | 7 | |
RoHe | 0:d1ff330c5128 | 8 | Initial Configuration for |
RoHe | 0:d1ff330c5128 | 9 | Smart Room project is here |
RoHe | 0:d1ff330c5128 | 10 | |
RoHe | 0:d1ff330c5128 | 11 | Last update by RoHe 16/11/2015 |
RoHe | 0:d1ff330c5128 | 12 | */ |
RoHe | 0:d1ff330c5128 | 13 | |
RoHe | 0:d1ff330c5128 | 14 | #ifndef INITIAL_H_ |
RoHe | 0:d1ff330c5128 | 15 | #define INITIAL_H_ |
RoHe | 0:d1ff330c5128 | 16 | |
RoHe | 0:d1ff330c5128 | 17 | #include "mbed.h" |
RoHe | 0:d1ff330c5128 | 18 | #include "EthernetInterface.h" |
RoHe | 0:d1ff330c5128 | 19 | |
RoHe | 0:d1ff330c5128 | 20 | static Serial pc(USBTX, USBRX); |
RoHe | 0:d1ff330c5128 | 21 | static DigitalOut ledRED(LED1); |
Jorge_Beltran | 1:32a08ca33b00 | 22 | static DigitalOut ledGREEN(LED2); |
RoHe | 0:d1ff330c5128 | 23 | static DigitalOut ledBLUE(LED3); |
Jorge_Beltran | 1:32a08ca33b00 | 24 | //START PIR SENSOR INPUT INIT |
Jorge_Beltran | 1:32a08ca33b00 | 25 | static DigitalIn PIR1(D0); |
Jorge_Beltran | 1:32a08ca33b00 | 26 | static DigitalIn PIR2(D1); |
Jorge_Beltran | 1:32a08ca33b00 | 27 | //END PIR SENSOR INPUT INIT |
Jorge_Beltran | 1:32a08ca33b00 | 28 | //START WINDOW SENSOR INPUT |
Jorge_Beltran | 1:32a08ca33b00 | 29 | static DigitalIn W1(D2); |
Jorge_Beltran | 1:32a08ca33b00 | 30 | static DigitalIn W2(D3); |
Jorge_Beltran | 1:32a08ca33b00 | 31 | static DigitalIn W3(D4); |
Jorge_Beltran | 1:32a08ca33b00 | 32 | //END WINDOW SENSOR INPUT INIT |
Jorge_Beltran | 1:32a08ca33b00 | 33 | //START DOOR SENSOR INPUT |
Jorge_Beltran | 1:32a08ca33b00 | 34 | static DigitalIn DOORSensor(D5); |
Jorge_Beltran | 1:32a08ca33b00 | 35 | //END DOOR SENSOR INPUT INIT |
Jorge_Beltran | 1:32a08ca33b00 | 36 | //START LIGHT CONTROL OUTPUT |
Jorge_Beltran | 1:32a08ca33b00 | 37 | static DigitalOut LightControl(D6); |
Jorge_Beltran | 1:32a08ca33b00 | 38 | //END LIGHT CONTROL OUTPUT |
RoHe | 0:d1ff330c5128 | 39 | static InterruptIn sw2(SW2); |
RoHe | 0:d1ff330c5128 | 40 | static TCPSocketConnection socketTCP1; |
RoHe | 0:d1ff330c5128 | 41 | static TCPSocketConnection socketTCP2; |
RoHe | 0:d1ff330c5128 | 42 | static UDPSocket socketUDP; |
Jorge_Beltran | 1:32a08ca33b00 | 43 | static TCPSocketServer serverTCP; |
RoHe | 0:d1ff330c5128 | 44 | //sstatic TCPSocketConnection socket; |
RoHe | 0:d1ff330c5128 | 45 | static char *cad; |
RoHe | 0:d1ff330c5128 | 46 | static char *s_myIP; |
RoHe | 0:d1ff330c5128 | 47 | //static char c_myIP[256]; |
RoHe | 0:d1ff330c5128 | 48 | static char *s_end="\n\r"; |
RoHe | 0:d1ff330c5128 | 49 | static bool bo_somethingWrong=false; |
RoHe | 0:d1ff330c5128 | 50 | |
RoHe | 0:d1ff330c5128 | 51 | |
RoHe | 0:d1ff330c5128 | 52 | #endif |