Home automation using Xbee radios

Dependencies:   EthernetNetIf HTTPServer RPCInterface mbed C12832_lcd

Link to Notebook Page

XbeeCommLib.h

Committer:
chrisisthefish
Date:
2013-12-04
Revision:
9:4b1e3531dd00
Parent:
8:e32fcca16102
Child:
10:de0be690b3c0

File content as of revision 9:4b1e3531dd00:

#include "mbed.h"

#define DEBUG 0

extern unsigned char data[500];
extern int dataCounter;
extern bool clear;

//extern DigitalOut led1;
//extern DigitalOut led2;
//extern DigitalOut led3;
//extern DigitalOut led4;

extern Serial xbeeSerial;
//extern C12832_LCD lcd;
//extern LM75B sensor;
//extern PwmOut green;
//extern PwmOut blue;
//extern PwmOut red;

//extern unsigned int  router0_addrHigh;
//extern unsigned int  router0_addrLow;
//
//extern unsigned int  router1_addrHigh;
//extern unsigned int  router1_addrLow;

extern struct xbee *root;


float getAnalogVoltage(int analogInputIndex, int totalPacketBytes, int digitalSampleBytes);

void digitalWriteXbee(unsigned int addrHigh, unsigned int addrLow, int outputIndex, bool value);

void monitorXbee();

struct xbee* addnode(struct xbee*,unsigned int,unsigned int );
int getDigitalValue(int , short );
void digitalInputHandle(struct xbee* ,unsigned int , unsigned int , unsigned short );
void analogInputHandle(struct xbee* ,unsigned int , unsigned int , int , float );

void compareDigitalReadWrite();
void monitorTimers();

//void up( void );
//void down( void );
//void left( void );
//void right( void );