Sensos Module Updated
Fork of Middleware by
Initial.h@1:fd355dc296b1, 2015-12-09 (annotated)
- Committer:
- RoHe
- Date:
- Wed Dec 09 04:44:37 2015 +0000
- Revision:
- 1:fd355dc296b1
- Parent:
- 0:d1ff330c5128
- Child:
- 3:1704050210b5
ok
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 | 1:fd355dc296b1 | 19 | #include "StringManager.h" |
RoHe | 0:d1ff330c5128 | 20 | |
RoHe | 0:d1ff330c5128 | 21 | static Serial pc(USBTX, USBRX); |
RoHe | 0:d1ff330c5128 | 22 | static DigitalOut ledRED(LED1); |
RoHe | 1:fd355dc296b1 | 23 | static DigitalOut ledGREEN(LED2); |
RoHe | 0:d1ff330c5128 | 24 | static DigitalOut ledBLUE(LED3); |
RoHe | 0:d1ff330c5128 | 25 | static DigitalIn enable1(D8); |
RoHe | 0:d1ff330c5128 | 26 | static InterruptIn sw2(SW2); |
RoHe | 1:fd355dc296b1 | 27 | static EthernetInterface eth; |
RoHe | 1:fd355dc296b1 | 28 | static TCPSocketServer serverTCP; |
RoHe | 0:d1ff330c5128 | 29 | static TCPSocketConnection socketTCP1; |
RoHe | 0:d1ff330c5128 | 30 | static TCPSocketConnection socketTCP2; |
RoHe | 0:d1ff330c5128 | 31 | static UDPSocket socketUDP; |
RoHe | 1:fd355dc296b1 | 32 | static StringManager stringManager; |
RoHe | 0:d1ff330c5128 | 33 | //sstatic TCPSocketConnection socket; |
RoHe | 0:d1ff330c5128 | 34 | static char *cad; |
RoHe | 0:d1ff330c5128 | 35 | static char *s_myIP; |
RoHe | 0:d1ff330c5128 | 36 | //static char c_myIP[256]; |
RoHe | 0:d1ff330c5128 | 37 | static char *s_end="\n\r"; |
RoHe | 0:d1ff330c5128 | 38 | static bool bo_somethingWrong=false; |
RoHe | 0:d1ff330c5128 | 39 | |
RoHe | 1:fd355dc296b1 | 40 | /*Extern Variables*/ |
RoHe | 1:fd355dc296b1 | 41 | //START PIR SENSOR INPUT INIT |
RoHe | 1:fd355dc296b1 | 42 | static DigitalIn PIR1(D0); |
RoHe | 1:fd355dc296b1 | 43 | static DigitalIn PIR2(D1); |
RoHe | 1:fd355dc296b1 | 44 | //END PIR SENSOR INPUT INIT |
RoHe | 1:fd355dc296b1 | 45 | //START WINDOW SENSOR INPUT |
RoHe | 1:fd355dc296b1 | 46 | static DigitalIn W1(D2); |
RoHe | 1:fd355dc296b1 | 47 | static DigitalIn W2(D3); |
RoHe | 1:fd355dc296b1 | 48 | static DigitalIn W3(D4); |
RoHe | 1:fd355dc296b1 | 49 | //END WINDOW SENSOR INPUT INIT |
RoHe | 1:fd355dc296b1 | 50 | //START DOOR SENSOR INPUT |
RoHe | 1:fd355dc296b1 | 51 | static DigitalIn DOORSensor(D5); |
RoHe | 1:fd355dc296b1 | 52 | //END DOOR SENSOR INPUT INIT |
RoHe | 1:fd355dc296b1 | 53 | //START LIGHT CONTROL OUTPUT |
RoHe | 1:fd355dc296b1 | 54 | static DigitalOut LightControl(D6); |
RoHe | 1:fd355dc296b1 | 55 | //END LIGHT CONTROL OUTPUT |
RoHe | 1:fd355dc296b1 | 56 | |
RoHe | 1:fd355dc296b1 | 57 | |
RoHe | 1:fd355dc296b1 | 58 | |
RoHe | 0:d1ff330c5128 | 59 | |
RoHe | 0:d1ff330c5128 | 60 | #endif |