I thought I would post a check point of some of this stuff. I have played around a lot with the VB app, which looks a bit different now. I don’t use the registry to save anything any more, but instead use the VB Project Settings facility. It now does the ATDL command like the receiver does and saves away the list, with My/Text/Serial number information. You can right click and remove items from the list or clear it. Note: must do this on top edit box as I did not find easy way to do pop-ups on the list. There is also a context menu on the outputs window that allows you to copy to clipboard and clear… It will also display text messages from other DIY XBee robots. If the text is not from the current DL it will show the DL: text for that item. I hacked up the Arc32 phoenix code to output a message at the start… Will do more on this.
The zip file only has VB, Arc32 phoenix, and the other XBee projects. I have only done testing so far with Arc32 and Phoenix. I have not included the updated C code yet (although working better) as not sure if anyone else is looking at this anyway…
Next up: Maybe play more with VB to add edit box plus combo to choose which Dl to send to. Then I can send debug input to different apps, will tie this in to Arc32 input monitor… Could tie this in later with non-arc32. Will then also update other VB app to use the new XBee packet stuff to download sequences…
It all depends on what you would like to do. Obviously if you have a DIY remote control that was modified to use XBees, than there are lots of things you can try out. But you can still do a reasonable amount with the VB talking to robots. I would like to maybe integrate in a PC version of the PS2 to use with VB. I just need to figure out how… But that is another story.
You can use an Atom Pro28 or an Arc32. I have a simple project in the XBEE projects called TestXBee, which I am trying to fix right now. That displays some xbee information and then sits in a loop trying to receive packets from the remote (Either VB or DIY remote) If the packet changes it displays the updated values.
On my local machine I have made changes to make it compile again and am in the process of debugging it. I have run into a few problems already, which I am working on now. Fixed a problem that I was not handling the return value from the API version of ATMY command. I assumed that it would return 4 bytes of data like the others did, but it only returned 2…
Now trying to figure out why ATVR does not return a proper response and that screws up ATNI command…
I will try to localize this down, but I have code that looks like:
I have this running under my logic analyzer and I get a timeout and I can see that it should have received the first character and the others are coming.
I also measured the delta time between the two P4 toggles and the timeout is: 1.580ms. So I should not have a timeout here? Need to come up with a simple test case and see if there is a timeout issue…
Also I find that I need to work on some better recover code. That is should read 1 byte and if not ~ try again…
So I will probably have an updated zip file in the next couple of days.
Hi,
What i meant was, do i just connect my xbee to the PC and run the DIY remote VB app. to communicate with my ARC-32 or do I need another board to run other software to be able to communicate? what i have now is just a PC a pair of xbees and a ARC-32
I would really like to build one of those DIY remotes.
Yep you can hook up one XBee to the PC using something like: sparkfun.com/commerce/produc … ts_id=9819 (I have not tried this one yet, just looks like a different connector…)
That is probably all the hardware you need. There is a program in the archive that I use to configure new XBees to use with my stuff. It is currently configured to run on a BB2 with Bap28, but it would not take much to convert to Arc32 (Change Hserial to Hserial2). This program allows me to set the baud rate, the command time out, the MY value and a node identifier. Can set most/all of this without this program using X-CTU program on PC.
The test program I am currently playing with is for Bap28. Sometime soon would like to merge the Arc32 stuff back in. But again once this is working not that much work to switch. Again Hserial to Hserial2, plus Bap28 uses TimerA which on the Bap40/Arc32 need to convert to TimerB1… Can work with you to get that up and running…
Yep the DIY remotes are great. Wish we could setup some form of kits for them with most of the parts!
Sound very interesting Kurt!
I’ve not had time for testing out your latest work. Just a quick Q though: Does the new API mode involve changes to all the files in the project (ex. the Phoenix ARC code)? I’m just asking since I’ve already done several changes to the code for controlling Archer. It would be easier and more universal if all changes in communication code only affected one file that could be replaced in a project. I guess its not that easy though…
Thanks for sharing your work Kurt, awesome!
Hopefully I’ll get time for it after my vacation (and visiting Xan in Netherland…).
Hi Zenta, I believe the majority of the changes on the Arc32 are contained in one file. phoenix_control_diy-xbee.bas. I may also play with changing some code in the …extras.bas file (like add xbee packet support for setting/viewing debug info). Also may play with some alert/reporting code that will use some of the newer stuff to report information to the VB side.
I hope you have a great vacation! Also I hope you and Xan have fun together.
A real quick update. It turned out that on the Bap28, I was trying to use the new stuff that allowed me to call HSERIN2 instead of HSERIN on the bap28, to make it easier to merge code bases, but the timeouts are not working properly with the HSERIN2. Changed these calls back to HSERIN and it is happy. I posted this up on BM forum.
I also have the testxbee program working better and I updated a couple versions of the code to better resync on getting the proper packet delimiter…
I was reading through your software. I tried the settings you mentioned. the xbee’s seemed to work. I forgot that you can’t change the xbee’s after setting them to 62500. So i was locked out for a bit.
Finally found how to reset them back to defaults (set a wire from GND to D18 on the module) Look forward to trying out more.
Thanks
FYI - My configure program is setup to be able to change the settings include baud rate and assuming it can talk to it, it can reset the baud rate and timeouts back to defaults of 9600 and timeout of?
BUT: I have not tried/changed this program for the Arc32. Should not be difficult… Change Hserial to hserial2…
Could you point me to any references that would help me understand what some of the XBEE commands you use do?
I see XBEEONHSERIAL con 1 but no reference to Hserial. I just ordered another pair of XBEE’s to use with this code.
Also the boards so i can add the RTS wire.
I’ve not had time to try out your new stuff yet, sorry. I’m just home for a couple of days (still on vacation). I’ve been playing with the ARC-32 biped code and added the same LiPo warning function I’ve been using for the other robots. What I’ve noticed is that it seems like the program halt for about 0,5 sec when the
GOSUB XBeeOutputVal[bLiPoV1]
line is executed. Do you have any idea whats causing that? Or have you tried sending values back to the DIY from an ARC-32?
Sorry, I have not tried that in awhile… I normally only send text messages. For the new stuff in changed to two different messages. I hope you had fun and I hope you will have fun!
Well I ordered all the main parts. I’m having trouble with the LCD all the links were dead. can anyone help with with a link to the correct LCD. that would be helpful. I have a bunch of of LCD’s but I’ve never used a serial one. Now off to find housing of some sort. That’s for the help