Boe Bot wireless control using XBee radios
HackWar
Posts: 17
Hi
Let me first explain what my current setup is and what I've got working so far.
I have the Boe Bot with the basic stamp 2 module. I've mounted a XBee radio on the breadboard. On my laptop I've connected an addional XBee to function as a coordinator. By sending simple ASCII characters to the Boe Bot using a JAVA GUI on my laptop, I am able to control my Boe Bot wireless.
When I hit the 'forward' button on my GUI it sends the 'F' character to my Boe Bot and it starts moving for as long as the loop around the servo pin sends pulses. After that the bot stops and comes back to the SERIN command to wait for the next command to arrive.
This is not what I want to achieve. The bot should keep moving forward until a 'stop' command is received. I've tried to workaround this problem by using the timeout function for the SERIN command but this creates a new issue. There is no buffering and the Basic stamp 2 isn't capable of using threads, therefore it is sometimes unable to receive incoming commands because the BS2 is busy powering the servo's.
Is there a workaround without using a multicore module?
Let me first explain what my current setup is and what I've got working so far.
I have the Boe Bot with the basic stamp 2 module. I've mounted a XBee radio on the breadboard. On my laptop I've connected an addional XBee to function as a coordinator. By sending simple ASCII characters to the Boe Bot using a JAVA GUI on my laptop, I am able to control my Boe Bot wireless.
When I hit the 'forward' button on my GUI it sends the 'F' character to my Boe Bot and it starts moving for as long as the loop around the servo pin sends pulses. After that the bot stops and comes back to the SERIN command to wait for the next command to arrive.
This is not what I want to achieve. The bot should keep moving forward until a 'stop' command is received. I've tried to workaround this problem by using the timeout function for the SERIN command but this creates a new issue. There is no buffering and the Basic stamp 2 isn't capable of using threads, therefore it is sometimes unable to receive incoming commands because the BS2 is busy powering the servo's.
Is there a workaround without using a multicore module?
Comments
I attached the PDF for the ServoPal so you can see it will help you out and hope it take care of you problem
Thanks for the info William, I appreciate it! Unfortunately this would require additional hardware. Is this issue really impossible to resolve just by using a Boe and BS2?
No, but it will take care of the big problem that you have. Using the ServoPal frees up the Basic Stamp to handle the XBee radio code. But, thing you can do is post your code so I and others can see were you need to improve it. There maybe a way, to code it without the ServoPal.
PE -- If you were using a motor, instead, then you could turn the motor onto Forward and then go and wait indefinitely for that next SERIN.