KNX_envoie

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
pathae
Date:
Wed Dec 06 13:38:52 2017 +0000
Commit message:
knx

Changed in this revision

mbed.bld Show annotated file Show diff for this revision Revisions of this file
recept_xbee.cpp Show annotated file Show diff for this revision Revisions of this file
diff -r 000000000000 -r 31e48fd9d8da mbed.bld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Wed Dec 06 13:38:52 2017 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/8ed44a420e5c
\ No newline at end of file
diff -r 000000000000 -r 31e48fd9d8da recept_xbee.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/recept_xbee.cpp	Wed Dec 06 13:38:52 2017 +0000
@@ -0,0 +1,39 @@
+#include <stdlib.h>
+#include "mbed.h"
+
+DigitalOut myled(LED2);
+Serial knx(PA_9,PA_10); //Initalise xbee_lib
+Serial pc(USBTX, USBRX); //Initalise PC serial comms
+
+DigitalIn mybutton(USER_BUTTON);
+int hexa =0xBC;
+int TABHEXA[18]={0x80,0xBC,0x81,0x11,0x82,0x01,0x83,0x00,0x84,0x01,0x85,0xE1,0x86,0x00,0x87,0x81,0x48,0x32};
+int i;
+
+
+int main()
+{
+knx.format(9,SerialBase::Even,1);
+//pc.format(8,SerialBase::Odd,1);
+knx.baud(19200);
+pc.baud(19200);
+    
+    while(1) {
+
+
+        if (mybutton == 0)//Button is pressed
+            {
+             for(i=0;i<19;i++){   
+            knx.putc(TABHEXA[i]);
+            //pc.putc(TABHEXA[i]);
+            myled = !myled;
+            wait(0.001);
+             }
+         i =0;
+         wait(1);
+
+}
+}
+
+}
+