Wireless temperature receiver with ER400TRS transceiver.

Dependencies:   mbed

Revision:
0:996e5de63519
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Wed Aug 31 04:09:10 2011 +0000
@@ -0,0 +1,41 @@
+
+/*
+**************************************************************************
+Wireless temperature receiver with ER400TRS transceiver.
+433 MHz transceiver.  180 bytes of data. 19200 Baud.
+
+
+Wiring:
+p1: antenna(17 cm). p2,p7(Host Ready Input), p9: ground.
+p5(Serial Data Out): mBed's p10(rx).p6(Serial Data In), p8: Vcc = +5 V.
+
+Author: Lluis Nadal. August 2011.
+**************************************************************************
+*/
+
+#include "mbed.h"
+
+
+Serial pc(USBTX, USBRX); // tx, rx
+Serial receiver(p9, p10);  // tx, rx
+char s[10];
+
+
+int main() {
+
+
+    wait(2);
+    receiver.baud(19200);
+    wait(0.5);
+
+    while (1) {
+        if (receiver.readable()) {
+            receiver.scanf("%s",s);
+
+            pc.printf( "%s C\r\n",s);
+        }
+
+    }
+}
+
+