packxbee-example.pd 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  1. #N canvas 300 169 770 718 10;
  2. #X text 84 159 data packet: 64-bit_destination 16-bit_destination broadcast_radius
  3. options data;
  4. #X obj 80 115 hsl 128 15 0 127 0 0 empty empty empty -2 -8 0 10 -262144
  5. -1 -1 5800 0;
  6. #X obj 77 134 nbx 5 14 -1e+37 1e+37 0 0 empty empty empty 0 -8 0 10
  7. -262144 -1 -1 58 256;
  8. #X obj 77 10 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 1
  9. ;
  10. #X obj 77 247 packxbee 2;
  11. #X msg 49 309 devices;
  12. #X obj 77 354 comport 4 9600;
  13. #X msg 6 266 info;
  14. #X msg 28 288 open 4;
  15. #X obj 77 424 print data;
  16. #X obj 77 396 unpackxbee 2;
  17. #X obj 77 30 metro 500;
  18. #X obj 77 58 random 32;
  19. #X obj 77 88 + 32;
  20. #X floatatom 146 470 5 0 0 0 - - -;
  21. #X floatatom 167 490 5 0 0 0 - - -;
  22. #X symbolatom 188 510 10 0 0 0 - - -;
  23. #X floatatom 209 530 5 0 0 0 - - -;
  24. #X floatatom 230 550 5 0 0 0 - - -;
  25. #X obj 590 470 print other_status;
  26. #X floatatom 251 571 5 0 0 0 - - -;
  27. #X text 109 489 packet_#;
  28. #X text 23 509 destination 16-bit address;
  29. #X text 103 529 transmit_retries;
  30. #X text 131 549 delivery_status;
  31. #X obj 146 448 unpack 0 0 s 0 0 0;
  32. #X text 146 570 discovery_status;
  33. #X floatatom 128 8 10 0 0 0 - - -;
  34. #X floatatom 294 597 5 0 0 0 - - -;
  35. #X floatatom 317 618 5 0 0 0 - - -;
  36. #X symbolatom 340 638 20 0 0 0 - - -;
  37. #X floatatom 387 679 5 0 0 0 - - -;
  38. #X text 259 617 packet_#;
  39. #X symbolatom 363 658 10 0 0 0 - - -;
  40. #X text 195 637 sender's 64-bit address;
  41. #X text 217 657 sender's 16-bit address;
  42. #X obj 294 448 unpack 0 0 s s 0;
  43. #X text 288 678 receive options;
  44. #X text 46 469 frame_type (139);
  45. #X text 194 596 frame_type (144);
  46. #X msg 18 171 AT AI;
  47. #X obj 146 424 route ZigBee_Transmit_Status ZigBee_Receive_Packet;
  48. #X obj 443 448 route AT_Command_Response;
  49. #X floatatom 443 492 5 0 0 0 - - -;
  50. #X floatatom 462 512 5 0 0 0 - - -;
  51. #X text 406 511 packet_#;
  52. #X obj 443 470 unpack 0 0 0 s 0 0 0;
  53. #X floatatom 482 532 5 0 0 0 - - -;
  54. #X symbolatom 501 550 5 0 0 0 - - -;
  55. #X text 434 549 AT command;
  56. #X floatatom 521 572 5 0 0 0 - - -;
  57. #X floatatom 540 592 5 0 0 0 - - -;
  58. #X text 484 591 packet_#;
  59. #X floatatom 560 612 5 0 0 0 - - -;
  60. #X text 494 611 data bytes;
  61. #X text 416 531 data_bytes;
  62. #X text 343 491 frame_type (136);
  63. #X text 476 571 status;
  64. #X msg 304 379 verbosity \$1;
  65. #X obj 304 352 hradio 15 1 0 3 empty empty empty 0 -8 0 10 -4034 -204786
  66. -1 0;
  67. #X text 188 53 This example transmits a single byte of "data" through
  68. an xbee in API mode 2 connected to serial port 4 at 9600 baud.;
  69. #X msg 77 211 TX 0x0013A200406BFD76 0xFA99 0 0 \$1;
  70. #X msg 480 171 TX 0x0013A200406BFEDF 0x1100 0 0 \$1;
  71. #X text 700 172 yellow;
  72. #X text 297 210 green;
  73. #X text 700 148 blue;
  74. #X msg 516 230 verbosity \$1;
  75. #X obj 516 203 hradio 15 1 0 3 empty empty empty 0 -8 0 10 -4034 -204786
  76. -1 0;
  77. #X text 439 679 Martin Peach 2014_10_29;
  78. #X msg 480 147 TX 0x0013A200406BFE6C 0x9ED2 0 0 \$1;
  79. #X text 700 124 blue;
  80. #X msg 480 123 TX 0x0013A200406BFE6C 0xFFFE 0 0 \$1;
  81. #X text 83 184 The destination xbee 64-bit address and the 16-bit address
  82. must be set first (16-bit address can be 0xFFFE if unknown):;
  83. #X obj 157 375 print comport_status;
  84. #X msg 70 330 ports;
  85. #X text 108 329 <-list available serial ports via outlet 2;
  86. #X text 38 267 <-list current serial port state via outlet 2;
  87. #X text 98 309 <-list available serial ports in console window;
  88. #X connect 1 0 2 0;
  89. #X connect 2 0 61 0;
  90. #X connect 3 0 11 0;
  91. #X connect 4 0 6 0;
  92. #X connect 5 0 6 0;
  93. #X connect 6 0 10 0;
  94. #X connect 6 1 73 0;
  95. #X connect 7 0 6 0;
  96. #X connect 8 0 6 0;
  97. #X connect 10 0 9 0;
  98. #X connect 10 2 41 0;
  99. #X connect 11 0 12 0;
  100. #X connect 12 0 13 0;
  101. #X connect 13 0 1 0;
  102. #X connect 25 0 14 0;
  103. #X connect 25 1 15 0;
  104. #X connect 25 2 16 0;
  105. #X connect 25 3 17 0;
  106. #X connect 25 4 18 0;
  107. #X connect 25 5 20 0;
  108. #X connect 27 0 11 1;
  109. #X connect 36 0 28 0;
  110. #X connect 36 1 29 0;
  111. #X connect 36 2 30 0;
  112. #X connect 36 3 33 0;
  113. #X connect 36 4 31 0;
  114. #X connect 40 0 4 0;
  115. #X connect 41 0 25 0;
  116. #X connect 41 1 36 0;
  117. #X connect 41 2 42 0;
  118. #X connect 42 0 46 0;
  119. #X connect 42 1 19 0;
  120. #X connect 46 0 43 0;
  121. #X connect 46 1 44 0;
  122. #X connect 46 2 47 0;
  123. #X connect 46 3 48 0;
  124. #X connect 46 4 50 0;
  125. #X connect 46 5 51 0;
  126. #X connect 46 6 53 0;
  127. #X connect 58 0 10 0;
  128. #X connect 59 0 58 0;
  129. #X connect 61 0 4 0;
  130. #X connect 66 0 4 0;
  131. #X connect 67 0 66 0;
  132. #X connect 74 0 6 0;