Home automation using Xbee radios

Dependencies:   EthernetNetIf HTTPServer RPCInterface mbed C12832_lcd

Link to Notebook Page

Committer:
chrisisthefish
Date:
Wed Dec 04 02:35:47 2013 +0000
Revision:
9:4b1e3531dd00
Parent:
8:e32fcca16102
Child:
10:de0be690b3c0
Changed too much stuff to comment on everything.; Got the xbee structs working; Got the RPC stuff working; Added functions for handling incoming RPC changes; Added timing functions to the motion detectors

Who changed what in which revision?

UserRevisionLine numberNew 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 8:e32fcca16102 9 //extern DigitalOut led1;
chrisisthefish 8:e32fcca16102 10 //extern DigitalOut led2;
chrisisthefish 8:e32fcca16102 11 //extern DigitalOut led3;
chrisisthefish 8:e32fcca16102 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 //extern unsigned int router0_addrHigh;
chrisisthefish 8:e32fcca16102 22 //extern unsigned int router0_addrLow;
chrisisthefish 8:e32fcca16102 23 //
chrisisthefish 8:e32fcca16102 24 //extern unsigned int router1_addrHigh;
chrisisthefish 8:e32fcca16102 25 //extern unsigned int router1_addrLow;
chrisisthefish 8:e32fcca16102 26
chrisisthefish 8:e32fcca16102 27 extern struct xbee *root;
chrisisthefish 8:e32fcca16102 28
chrisisthefish 8:e32fcca16102 29
chrisisthefish 8:e32fcca16102 30 float getAnalogVoltage(int analogInputIndex, int totalPacketBytes, int digitalSampleBytes);
chrisisthefish 8:e32fcca16102 31
chrisisthefish 8:e32fcca16102 32 void digitalWriteXbee(unsigned int addrHigh, unsigned int addrLow, int outputIndex, bool value);
chrisisthefish 8:e32fcca16102 33
chrisisthefish 8:e32fcca16102 34 void monitorXbee();
chrisisthefish 8:e32fcca16102 35
chrisisthefish 8:e32fcca16102 36 struct xbee* addnode(struct xbee*,unsigned int,unsigned int );
chrisisthefish 8:e32fcca16102 37 int getDigitalValue(int , short );
chrisisthefish 8:e32fcca16102 38 void digitalInputHandle(struct xbee* ,unsigned int , unsigned int , unsigned short );
chrisisthefish 8:e32fcca16102 39 void analogInputHandle(struct xbee* ,unsigned int , unsigned int , int , float );
chrisisthefish 8:e32fcca16102 40
chrisisthefish 9:4b1e3531dd00 41 void compareDigitalReadWrite();
chrisisthefish 9:4b1e3531dd00 42 void monitorTimers();
chrisisthefish 9:4b1e3531dd00 43
chrisisthefish 8:e32fcca16102 44 //void up( void );
chrisisthefish 8:e32fcca16102 45 //void down( void );
chrisisthefish 8:e32fcca16102 46 //void left( void );
chrisisthefish 8:e32fcca16102 47 //void right( void );