DIY Remote Control XBee controller for Robotics

Hi,
I have all the parts connected and nothing is buzzing or even smoking :smiley:

Ive been able to run some of the test programs, but was unable to compile the DIY Transmitter project.
Iā€™m using basic micro studio 1.0.0.35 this is what i get

i was able to use the xbee config project, iā€™m just stumped now

Thanks
Phil

Sorry about that. There were N different programs that I tried to change at the same timeā€¦

I think the line:

		gosub APIProcessGetXBeeVal@_bAPIPacket,32,3000000], _cbRet

Sould be replaced with a line:

		gosub APIRecvPacket[3000000], _cbRet

ā€¦

Kurt

Kurt,
I thought it was something I sausage fingered. Thank you.
I have a question about the RTS pin. Does it need to be connected to run the project?
( I have another board on the way to add the wire to)

Thanks
Phil

On my Transmitter, I am not currently using the RTS line as I wanted to test it without it as Zenta added two more switches to his remote and no longer had any IO lines availableā€¦

However using the RTS does make the display of the LCD display more robustā€¦ Why? because when you receive characters through HSERIAL, it generates interrupts and the processing of the interrupts can cause bit bang serial to generate the wrong pulsesā€¦ We are using a version of serial IO that I wrote that uses a timer to minimize the issues, but it can still be an issueā€¦ When enabled I use the RTS of the XBEE to tell it not to send me any more characters. (Actually it may still send 1 or 2 moreā€¦). The good news is it will not cause us to lose any characters as the XBEE buffers the data it receives.

Kurt

I was able to complie and program the ABB2 - I get a clean ~0-128-255 on the display moving both gimals and sliders. The 4X4 keypad also display the correct button that was selected. Iā€™m going to load my arc32 with your Phoniex code to test the DIY. I think I read that you were not using the RTS wire in this code ? I havenā€™t added the last row of buttons. will that have any issues with me running this code as is to test?

Thanks

The only problem is that these keys are used to get to some pages of display/input. One allows you to choose who you are going to talk to. You can probably find another method to get to this configuration pageā€¦

Kurt

Thatā€™s what I thought. Iā€™ll add those first, then try again. Thanks.

UPDATE: added the other 4 buttons. I can now toggle through the other screens. I try to see if it can find my ARC32 tomorrow

Well, had make a face place to hold everything. I was only able to find some white plastic locally. but all in all it dosent look to bad for a first time and using a drill and a Xacto knife(still have all my digits too :open_mouth: )


Iā€™m not sure if Iā€™m reading anything. I was just trying to see if it would find the xbee connected to the PC. when I select to scan for Xbeeā€™s it returns NONE*. :confused:

Hi,

It is looking good :smiley:

The finding of other XBees is not always an exact scienceā€¦ That is when it issues an ATND command sometimes other xbees respond, sometimes they donā€™t. They need to be configured to be on the same networks and the like. Did you try running my configure program on the XBee attached to the Arc32, to give it a destination number, name, etc? So sometimes you may have to try hitting the discover button a few times before it is found. If that fails, there is the other config page where you can enter the actual HEX value of the destination you wish to talk toā€¦

Kurt

Sniff sniffā€¦ The birth of another DIY radio! This makes me very happy! lol 8)

Kurt

Iā€™ll try the program when I get home. What would be the prefered baudrate since I do not have the RTS wire connected ? I was able to see the DIY using the ATND command from the Xbee connected to the PC.

Jim,1816cigar[1].jpg :wink:
Know of any place i can purchase some black lexan to make another face plate? I seem to only find very large sheets or just clear

Thanks all

Phil

Kurt,
I was able to load the configure program on the ARC32 but wasnā€™t able to communicate with the xbee.
Will it only run on the ABB2

Phil

Hi, I have not run this program on an Arc32ā€¦ This program does not use either HSERIAL or HSERIAL2 to communicate, but instead uses serout/serinā€¦

Assumption you are putting the XBEE on the HSERIAL2 pins (P36 and P38) on the arc32 as I did with my Arc32 version of the phoenix code. On a BAP28 we are using HSerial pins (P14 and P15) Note: Basic Atom Pro 40 uses pins 14 and 15 for HSERIAL2. The current configure program is currently setup for P14 and P15.

I made a version of the configure program that depending on platform BASICATOMPRO28 and other set the pins to what I think are the right pins. I also commented out the usage of the Request to Send IO line as configure program does not really use it. Likewise I commented out the setting P4-P6 high, that were previously used for debuggingā€¦

Note: I verified that it compiles but did not run itā€¦ Longer term maybe will convert the code to use hserial to talk to serial port on arc32ā€¦

Kurt
xbeeconfigure.bas (7.71 KB)

Hi,
I now have an extra XBee Explorer Regulated card to add a wire for the RTS pin. I tried using P14 and P15 on the arc32. Iā€™ll try again tonight with the new version.
Thanks

Still wasnā€™t able to communicate with the xbee :cry: :confused: wasnā€™t able to communicate using the BAP28 also

Phil

I checked and tested all my xbeeā€™s. I re-tried the configuration application. unable to communicate with xbee. I also tried it on BBII with BAP-28.
I even tried adding the RTS wire and using an older version. I just set them up manually to use 57.6. I need to reconnect the DIY back to the BBII
Iā€™m willing to try anything else

Thanks
Phil

Hi Phil,

I need to look over what stuff (hardware) you have to have a better idea of what to suggest you try next. Example: do you have one connected to your pc through a USB adapter? If so you can run X-CTU on the PC and check/set the settings.

On your Arc32 and or Bap have you tried swapping the TX and RX lines Sometimes their markings con be confusing. On my Test Bap28, I believe I have the wire going from DIN(marking on the regulated explorer) to P15. Likewise I have Dout going to P14. I have RTS going to P7 as I know that this pin has a lower voltage on the BAP28.

My main Arc32 is in my phoenix and I know it works there. Luckily I Have a second Arc32 which I was about to try testing some of my C library stuff on. So I am hooking up a battery to itā€™s VL and will move the text xbee to it and try to get the config working.

Kurt

Hi again Phil,

As I mentioned before, never tested on Arc32 :blush: Of course when I wrote this code, the arc32 did not exist, I had tested some of it awhile ago on Bap40.

Turns out some conditional stuff for the Bap40 did not get brought in for Arc32. The stuff in my serial code that compensates for the different processor speedsā€¦ So I updated it and now my arc32 can talk to the Xbee.

Kurt
xbee_taserial_support.bas (80.9 KB)

Yes, I do have one XBee connected to the PC through a XBee Explorer USB and have a current version X-CTU installed. I also have several XBee Explorer Regulated cardā€™s, one that has a wire attached to the RTS pin.

Yes I did. I ran a small ā€œHello worldā€ program to see if the XBee could communicate with the ARC32 and ran without any problems. Iā€™ll have to verify this on the BAP28

Iā€™ll give your update a try when I get home

I really appricate your patience and help.
Thank you
Phil

Kurt,
At first it could not comunicate with the XBeeā€™s. They were all set to different baud rates. I went back and used the X-CTU program to restore one of the XBeeā€™s. I retried the program and it worked great with the XBee that was reset to factory defaults. Then I was able to configure the XBee to any of the other baud rates and the program could comunicate with this XBee only. to make a long story short, i found that the guard time has to be set to 3 (default was 3E8) and the program was able to communicate with the XBeeā€™s and any of the selected baud rates. It would only communicate with the guard times set to the default (3E8) at 9600 baud.

What does the guard times do?

This worked on both the ARC32 and BAP28

Thank you

Great!

Yes I should have mentioned at some point, that the the setup program the first number you enter to choose baud rate is the baud rate that the xbee is set for. Also should have mentioned that except for selecting 9600 for the program it assumes that this program had been run on the XBEE before and changed the guard time to 3. With my latest stuff that uses the xbees in API mode the guard time is not as important as I donā€™t enter command mode any more except at startupā€¦

The guard time is used when the XBEE is working in transparent mode to help indicate that you wish to go into command mode and issue commands for things like set the new destination ATDL . To get into command mode you have to:

You send out: +++

If you do this right, then the xbee will return the normal OK response. ā€¦ So with a guard time of 3ms*2 you are not slowing the program down too much, but at 3e8h(1000ms)*2 you are more or less stopping the program for 2 seconds to enter into command mode. This is great for entering command by terminal in X-CTU but not for holding up your programā€¦

Kurt