Xbee question
computer guy
Posts: 1,113
When you are using the xbee in AT mode does the rssi (pwm1) pin still work and does the associated light still change to 2x sec
when it sees another xbee or are they only in API mode.
Does anyone know how to set up the xbee for a zigbee network. i.e. one as a coordinator and the other as an End device.
I need to use the rssi function and associated function lights and as I understand these are only available in a zigbee network (API).
Thank you
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Check out my robot using the propeller robot.tmcp.com.au
If you offer cheap PCB fabrication, perl programming or any other helpful services please email me at.
anthonybmyatt@yahoo.com.au
Post Edited (computer guy) : 7/7/2007 3:43:04 AM GMT
when it sees another xbee or are they only in API mode.
Does anyone know how to set up the xbee for a zigbee network. i.e. one as a coordinator and the other as an End device.
I need to use the rssi function and associated function lights and as I understand these are only available in a zigbee network (API).
Thank you
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Check out my robot using the propeller robot.tmcp.com.au
If you offer cheap PCB fabrication, perl programming or any other helpful services please email me at.
anthonybmyatt@yahoo.com.au
Post Edited (computer guy) : 7/7/2007 3:43:04 AM GMT
Comments
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Check out my robot using the propeller robot.tmcp.com.au
If you offer cheap PCB fabrication, perl programming or any other helpful services please email me at.
anthonybmyatt@yahoo.com.au
You don't need to be using the ZigBee firmware for RSSI.· You can either do it by requesting the RSSI level using the ATDB command, or flip it into API mode.· I recently posted an XBee object that allows for both modes to be used.
There's so many ways they can be configured, it's difficult to give a·off the cuff·example.
Tell me what you are trying to accomplish and I'll try to write some code using the object that would accomplish it.· Though I think all my units are at the University until I head back over there Sunday, but I can try to wing it.
-Martin
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
StampPlot - GUI and Plotting, and XBee Wireless Adapters
Southern Illinois University Carbondale, Electronic Systems Technologies
I have an xbee connected to a comparator for the rssi (a led bar).
I am sending a particular number from an adc chip (control) to another xbee that will read the number into a variable (robot).
I also have plans to add an lcd to the first xbee, prop pair (control).
I just need some example code to start the API mode and send data.
Will the associated light work with API, it doesn't with AT mode. Or do you need a zigbee network.
Thank you
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Check out my robot using the propeller robot.tmcp.com.au
If you offer cheap PCB fabrication, perl programming or any other helpful services please email me at.
anthonybmyatt@yahoo.com.au
Post Edited (computer guy) : 7/7/2007 7:20:18 AM GMT
The big difference between AT Command mode and API is the AT mode is transparent, it simply passes the data to you.· In API mode, the data is packaged as a frame with data such as source address, RSSI level, checksum information, etc.· The receiving unit must parse out the various bytes.· This is part of what my object does.· Also, in API mode, it allows the reception of automatically sent ADC/Digital data from the XBee directly.· A new version of the library I am using returns these values also.
The Assoc indicator is used when an XBee has been setup as a coordinator and the others are end points.· I does not require ZigBee firmware.· I've not dealt with using them as coordinators, so can't say what's up there.· If you are just·trying to ensure comms, your base XBee could send a packet out and the acknowledgement status can be read.
As to RSSI, I guess you are using the PWM pin to drive an LED through the comparator?· It may be easier to read the RSSI as data instead and control some LEDs via the Prop.
I know you've been at this a while, so let's take a step back and give me brief once again on what you are trying to accomplish over all and maybe we can look at this fresh before I code some examples that you don't need.· Talk me through it all.
Also, are you able to upgrade the firmware on the XBee currently?
-Martin
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
StampPlot - GUI and Plotting, and XBee Wireless Adapters
Southern Illinois University Carbondale, Electronic Systems Technologies
The motor controllers work off of a servo pulse.
I have attached an xbee pro up to the prop and am going to use it to receive an adc reading to control the motor controllers and 2 servos.
That same xbee pro in the near future will also send out a byte (message id) and then a string (message).
I have a controller I am building with a prop and adc0834 and an xbee pro.
I plan on reading in 4 adc values into separate variables (say rob_x, rob_y, cam_x, cam_y).
Then turning these into numbers that can be used by the servo_32 object.
The values will then be sent via the xbee pro to the robot.
The message id and message will be to tell the receiving prop what type of message it is (i.e. rob_x, rob_y, cam_x, cam_y, message - for lcd on controller).
The message id will be 1, 2, 3, 4, 5.
So I will use
and so on.
Thank you for your help
I hope this is enough information for you.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Check out my robot using the propeller robot.tmcp.com.au
If you offer cheap PCB fabrication, perl programming or any other helpful services please email me at.
anthonybmyatt@yahoo.com.au
And you are going to send the values one at a time preceeded by the ID number to be evaluated? So a data packet would be:
<ID><Value>
Am I on the right track?
-Martin
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
StampPlot - GUI and Plotting, and XBee Wireless Adapters
Southern Illinois University Carbondale, Electronic Systems Technologies
and I will send an id number and then the message.
The id number will be to tell the robot what variable to put the value in.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Check out my robot using the propeller robot.tmcp.com.au
If you offer cheap PCB fabrication, perl programming or any other helpful services please email me at.
anthonybmyatt@yahoo.com.au
Post Edited (computer guy) : 7/8/2007 2:00:50 AM GMT
I could probably code this and cross fingers, but I'd rather wait until tomorrow when I have a complement of hardware.
Have a good night!
-Martin
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
StampPlot - GUI and Plotting, and XBee Wireless Adapters
Southern Illinois University Carbondale, Electronic Systems Technologies
For lcd messages it will go the other way robot will send message and controller will receive it.
I have attached a picture to my other post if it helps.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Check out my robot using the propeller robot.tmcp.com.au
If you offer cheap PCB fabrication, perl programming or any other helpful services please email me at.
anthonybmyatt@yahoo.com.au
Also, you talked about RSSI in an earlier post, would using code to control LED's be OK to indicate signal strength? Though not very linear, it would be interesting to use the RSSI value to PWM an LED so that it dims as strength goes down!
I'm not going to write all this, but enough to get you started with code I know works... though it does sound like fun [noparse]:)[/noparse]
-Martin
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
StampPlot - GUI and Plotting, and XBee Wireless Adapters
Southern Illinois University Carbondale, Electronic Systems Technologies
I could use a single led and dim it for testing though.
Thank you
All I need is some code to get me started and I should be able to pick it up from their with some comments in code.
Once again thank you so much.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Check out my robot using the propeller robot.tmcp.com.au
If you offer cheap PCB fabrication, perl programming or any other helpful services please email me at.
anthonybmyatt@yahoo.com.au
Ok, enough of my 2 cents on your project! [noparse]:)[/noparse]
-Martin
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
StampPlot - GUI and Plotting, and XBee Wireless Adapters
Southern Illinois University Carbondale, Electronic Systems Technologies
What do i need to do in order to filter the pwm output on the xbee?
Thank you
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Check out my robot using the propeller robot.tmcp.com.au
If you offer cheap PCB fabrication, perl programming or any other helpful services please email me at.
anthonybmyatt@yahoo.com.au
····················
One thing that might mess it up is the input impedance of the IC as it may drain the cap too quickly if too low, but if it's simply feeding comparators, it should be OK.
-Martin
·
Picture attached.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Check out my robot using the propeller robot.tmcp.com.au
If you offer cheap PCB fabrication, perl programming or any other helpful services please email me at.
anthonybmyatt@yahoo.com.au
-Martin
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
StampPlot - GUI and Plotting, and XBee Wireless Adapters
Southern Illinois University Carbondale, Electronic Systems Technologies
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Check out my robot using the propeller robot.tmcp.com.au
If you offer cheap PCB fabrication, perl programming or any other helpful services please email me at.
anthonybmyatt@yahoo.com.au
Here ya go. A little discussion on it:
Code assumes your control base is at Address 0 (MY=0) and the Robot is at address 1 (the code configures the XBee', so use default XBee settings).
To ensure the ID and values/message arrive as a whole string so that a missed packet doesn't cause issues with being synchronized, I·concontenated both ID and value/message into a single transmission that takes the byte format of:
<ID - 3 bytes,eg: 01)><null 0 for string end><value or message variable length><rest are null 0's>
or
< 05><0><Hullo Pippin!><0>
On the receiving end, they are parse out again.
The string is limited to 16 bytes, but written to be easily changed.· The RSSI level is also displayed.
I had some odd results getting the recieved value to be correct, but hoping it's due to my manually sending the strings (don't have 2 props ready to go right now). Using Parallax's numbers object, so should be good there.
It's pretty well commented and extensible/modifyable.
Also, MY APOLOGIES!!!! When I posted an update to the XB object I neglected to include the example file in the archive!!· I'll get a new one sent up soon.·
It's also possible to confirm a packet is acknowledged when sent, but I didn't put in this example. Got to get ready for 12 teens to storm my Robotics camp in the morning!!
The attachments are the archived base code with all files, and just the robot's file alone - save to same directory.
Let me know how it goes or if you have any Q's.
-Martin
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
StampPlot - GUI and Plotting, and XBee Wireless Adapters
Southern Illinois University Carbondale, Electronic Systems Technologies
Post Edited (Martin Hebel) : 7/9/2007 4:15:27 AM GMT
I am assuming that the same code could be used on the control as on the robot, I would just need to change the Base_addy to 1.
I did however notice that there was no example for sending data only receiving.
How would I send the Id number and message together. So that the other end can receive it.
Thank you Martin
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Check out my robot using the propeller robot.tmcp.com.au
If you offer cheap PCB fabrication, perl programming or any other helpful services please email me at.
anthonybmyatt@yahoo.com.au
Attached....
You simply need to reverse the code between the 2 for data robot-->base.
Sorry (though I claim IDE bug!)
-Martin
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
StampPlot - GUI and Plotting, and XBee Wireless Adapters
Southern Illinois University Carbondale, Electronic Systems Technologies
Post Edited (Martin Hebel) : 7/9/2007 4:16:32 AM GMT
Thank you and great code.
This will help a great deal with my robot and I will give you credit on my website.
Thank you
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Check out my robot using the propeller robot.tmcp.com.au
If you offer cheap PCB fabrication, perl programming or any other helpful services please email me at.
anthonybmyatt@yahoo.com.au
-Martin
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
StampPlot - GUI and Plotting, and XBee Wireless Adapters
Southern Illinois University Carbondale, Electronic Systems Technologies
I just noticed that my rssi led bar is not so accurate.
In fact I lose the signal when the bar is at about 50%
Could this be because I am using a 10k resistor rather than the 1k you specified earlier, or is it something else.
Thank you
Computer Guy
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Check out my robot using the propeller robot.tmcp.com.au
If you offer cheap PCB fabrication, perl programming or any other helpful services please email me at.
anthonybmyatt@yahoo.com.au
Post Edited (computer guy) : 7/11/2007 7:49:14 AM GMT
This should be the last question... I hope.
If anyone else can answer my question please go ahead, you would make my day.
Thank you
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Check out my robot using the propeller robot.tmcp.com.au
If you offer cheap PCB fabrication, perl programming or any other helpful services please email me at.
anthonybmyatt@yahoo.com.au
To tell the truth, I've tried the output before and it didn't make a lot of sense to me in what I was seeing on the scope. If the numbers above don't help in figuring things outs, I'd recommend putting it on a scope and trying to figure it out. Don't have time for it here right now, sorry!
-Martin
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
StampPlot - GUI and Plotting, and XBee Wireless Adapters
Southern Illinois University Carbondale, Electronic Systems Technologies