Shop OBEX P1 Docs P2 Docs Learn Events
Flip simple code Xbee packet transmit — Parallax Forums

Flip simple code Xbee packet transmit

Luis_PLuis_P Posts: 246
edited 2023-09-01 07:16 in Propeller 2

I'm been searching for days a simple code to send API message form FLIP to XBEE. Can't find any code using BlocklyProp or SimpleIDE. Nothing, Nada!
I'm new to to the FLIP. I see a lot of codes for Arduino out there but nothing simple or tutorial for the FLIP and BlocklyProp / SimpleIDE. Any links or codes will help me to get started. Thanks!

/////////////////SimpleIDE////////////////////////////
//#include "simpletools.h"
//#include "fdserial.h"
E 00 00 31 31 31 31 31 31 31 31 31 31 31 31 31 B4
// ------ Global Variables and Objects ------
fdserial *fdser14_15;

// ------ Main Program ------
int main() {
  fdser14_15 = fdserial_open(14, 15, 0b0000, 9600);
  pause(1000);

  // I need to send packet and size of packet
 ////////// In Arduino is simple:////////////////////////////////////////////////////////////////////
 //   byte packet[] = {0x7E, 0x00, 0x1B, 0x10, 0x01, 0x00, 0x13, 0xA2 ,0x00 ,0x42 ,0x2B , 0x0F, 0x8F, 0xFF, 
 //   0xFE, 0x00, 0x00, 0x31, 0x31, 0x31, 0x31, 0x31, 0x31, 0x31, 0x31, 0x31, 0x31, 0x31, 0x31, 0x31,  0xB4}
 //Send packet and size of packet
 //sserial.write(packet, sizeof(packet)); 
////////////////////////////////HOW WE DO THIS FOR THE FLIP???///////////////////////////////
   while(1) { 
       dprint(fdser14_15, ?????????????);  
      while(!fdserial_txEmpty(fdser14_15));
      pause(5000);
   } 

}

Comments

Sign In or Register to comment.