Home automation using Xbee radios

Dependencies:   EthernetNetIf HTTPServer RPCInterface mbed C12832_lcd

Link to Notebook Page

Committer:
chrisisthefish
Date:
Mon Dec 02 22:25:29 2013 +0000
Revision:
8:e32fcca16102
Child:
9:4b1e3531dd00
Re-added Chris' Xbee communication code.; ; Integrated Hai's digital and analog handling code with the Xbee packet decoder code so that we handle incoming packets correctly.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
chrisisthefish 8:e32fcca16102 1 #include "mbed.h"
chrisisthefish 8:e32fcca16102 2 #include "C12832_lcd.h"
chrisisthefish 8:e32fcca16102 3
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 8:e32fcca16102 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 8:e32fcca16102 41 //void up( void );
chrisisthefish 8:e32fcca16102 42 //void down( void );
chrisisthefish 8:e32fcca16102 43 //void left( void );
chrisisthefish 8:e32fcca16102 44 //void right( void );