Home automation using Xbee radios
Dependencies: EthernetNetIf HTTPServer RPCInterface mbed C12832_lcd
XbeeCommLib.h@10:de0be690b3c0, 2013-12-06 (annotated)
- Committer:
- chrisisthefish
- Date:
- Fri Dec 06 07:05:49 2013 +0000
- Revision:
- 10:de0be690b3c0
- Parent:
- 9:4b1e3531dd00
- Child:
- 11:03ff417d0d5d
Rewrote the function that monitors any changes to the RPC variables.; Also added support for push buttons that toggle the lights.; Lots of other stuff.
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
chrisisthefish | 8:e32fcca16102 | 1 | #include "mbed.h" |
chrisisthefish | 8:e32fcca16102 | 2 | |
chrisisthefish | 9:4b1e3531dd00 | 3 | #define DEBUG 0 |
chrisisthefish | 8:e32fcca16102 | 4 | |
chrisisthefish | 8:e32fcca16102 | 5 | extern unsigned char data[500]; |
chrisisthefish | 8:e32fcca16102 | 6 | extern int dataCounter; |
chrisisthefish | 8:e32fcca16102 | 7 | extern bool clear; |
chrisisthefish | 8:e32fcca16102 | 8 | |
chrisisthefish | 10:de0be690b3c0 | 9 | extern DigitalOut led1; |
chrisisthefish | 10:de0be690b3c0 | 10 | extern DigitalOut led2; |
chrisisthefish | 10:de0be690b3c0 | 11 | extern DigitalOut led3; |
chrisisthefish | 10:de0be690b3c0 | 12 | extern DigitalOut led4; |
chrisisthefish | 8:e32fcca16102 | 13 | |
chrisisthefish | 8:e32fcca16102 | 14 | extern Serial xbeeSerial; |
chrisisthefish | 9:4b1e3531dd00 | 15 | //extern C12832_LCD lcd; |
chrisisthefish | 8:e32fcca16102 | 16 | //extern LM75B sensor; |
chrisisthefish | 8:e32fcca16102 | 17 | //extern PwmOut green; |
chrisisthefish | 8:e32fcca16102 | 18 | //extern PwmOut blue; |
chrisisthefish | 8:e32fcca16102 | 19 | //extern PwmOut red; |
chrisisthefish | 8:e32fcca16102 | 20 | |
chrisisthefish | 8:e32fcca16102 | 21 | float getAnalogVoltage(int analogInputIndex, int totalPacketBytes, int digitalSampleBytes); |
chrisisthefish | 8:e32fcca16102 | 22 | |
chrisisthefish | 8:e32fcca16102 | 23 | void digitalWriteXbee(unsigned int addrHigh, unsigned int addrLow, int outputIndex, bool value); |
chrisisthefish | 8:e32fcca16102 | 24 | |
chrisisthefish | 8:e32fcca16102 | 25 | void monitorXbee(); |
chrisisthefish | 8:e32fcca16102 | 26 | |
chrisisthefish | 8:e32fcca16102 | 27 | int getDigitalValue(int , short ); |
chrisisthefish | 10:de0be690b3c0 | 28 | void digitalInputHandle(unsigned int , unsigned int , unsigned short ); |
chrisisthefish | 10:de0be690b3c0 | 29 | void analogInputHandle(unsigned int , unsigned int , int , float ); |
chrisisthefish | 8:e32fcca16102 | 30 | |
chrisisthefish | 9:4b1e3531dd00 | 31 | void compareDigitalReadWrite(); |
chrisisthefish | 9:4b1e3531dd00 | 32 | void monitorTimers(); |
chrisisthefish | 9:4b1e3531dd00 | 33 | |
chrisisthefish | 8:e32fcca16102 | 34 | //void up( void ); |
chrisisthefish | 8:e32fcca16102 | 35 | //void down( void ); |
chrisisthefish | 8:e32fcca16102 | 36 | //void left( void ); |
chrisisthefish | 10:de0be690b3c0 | 37 | //void right( void ); |