Flip simple code Xbee packet transmit
Luis_P
Posts: 246
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
I did an online class for Parallax during the pandemic -- you can find it on their YouTube channel. I was using the P2 then, but I have identical objects for the P1 and P2. The attached demo uses my P1 API-1 object for the XBee. Spin only; I don't do C.
This is what the demo looks like on my PAB.
Parallax has a good book on using the XBee. You should study it.
It would be nice to have an Xbee API example on SimpleIDE (C) and BlocklyProp since the Propeller FLIP is Parallax. I'm sure there is somewhere out there that knows how to send a Byte Array to the Xbee and get a response back.