温度センサ XBee送信
Fork of temp_LCD by
Revision 1:8cbb7db0ff4b, committed 2013-05-23
- Comitter:
- MasudaToshio
- Date:
- Thu May 23 10:59:53 2013 +0000
- Parent:
- 0:0d5de68f4483
- Commit message:
- ??????XBee??
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Thu May 23 09:40:59 2013 +0000
+++ b/main.cpp Thu May 23 10:59:53 2013 +0000
@@ -1,8 +1,9 @@
#include "mbed.h"
#include "TextLCD.h"
-AnalogIn LM60(p15);
-TextLCD lcd(p24, p26, p27, p28, p29, p30);
+AnalogIn LM60(p15);
+TextLCD lcd(p24, p26, p27, p28, p29, p30);
+Serial xbee(p13, p14); // tx, rx
/////////////////////////////////////////////////////
// main
@@ -16,7 +17,11 @@
tempC = ( ( a_in * 3.3 ) - 0.424 ) * 160.0 ;
lcd.locate(0,0);
lcd.printf("%5.2F C %5.3F V ", tempC, a_in);
- wait(.5);
+
+ xbee.printf( "c" ) ;
+ wait(.2);
+ xbee.printf("%5.2F C %5.3F V ", tempC, a_in);
+ wait(2);
}
return 0;
