ECE 4180 Spring 15
/
4180_Zigbee
The whole project
Revision 0:7474f708bc0c, committed 2015-04-21
- Comitter:
- Samer
- Date:
- Tue Apr 21 19:23:16 2015 +0000
- Commit message:
- xxwefrf
Changed in this revision
diff -r 000000000000 -r 7474f708bc0c main.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Tue Apr 21 19:23:16 2015 +0000 @@ -0,0 +1,57 @@ +#include "mbed.h" +#include "Zigbee_control.h" + + + +float numb = 3.211; + + +char *float2str( float float_num); + +char c; +char *z; +int main() { + + // reset the xbees (at least 200ns) + //Zigbee_setup(); + + + char* x = float2str(numb); + //char x[21]; + int i=1; + while(1) { + /* + send_Zigbee_string(x); + wait_ms(1000); + numb = numb*1.1; + x = float2str(numb); + if(numb>100.0) + numb =1.0; + + if(pc.readable()) + { + c = pc.getc(); + send_Zigbee_char(c); + pc.putc(c); + } + */ + if(Zigbee_status()) + { + + z = read_Zigbee_string(); + // send_Zigbee_string(z); + // pc.putc(c); + send_Zigbee_string(z); + } + + +} +} + +char *float2str( float float_num) +{ + static char retnum[21]; // Enough for 20 digits plus NUL from a 64-bit uint. + sprintf( retnum, "%f", float_num ); + return retnum; +} +
diff -r 000000000000 -r 7474f708bc0c mbed.bld --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Tue Apr 21 19:23:16 2015 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/487b796308b0 \ No newline at end of file
diff -r 000000000000 -r 7474f708bc0c xbee_4180.lib --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/xbee_4180.lib Tue Apr 21 19:23:16 2015 +0000 @@ -0,0 +1,1 @@ +http://developer.mbed.org/teams/ECE-4180-Spring-15/code/xbee_4180/#0b5c5f57157c