Step 3: XBee Discussion and Configuration

Before we continue, I should mention that there is a crucial difference between the XBee Series 1 and Series 2.  Aside from the fact that Series 2 uses the ZigBee protocol and Series 1 does not, Series 1 processes the power of the packet and encodes the value into the RX packet that the XBee API has access to.  Series 2 also processes the power of the packet; however, it does not encode the value into the RX packet.  Digi changed the structure of the RX packets for Series 2 and you have two choices to get the RSSI value.  You can either stop receiving packets and query the XBee to tell you what the RSSI value is (ATDB and this takes quite a bit of time) or you can use a trick discussed on the Arduino Message Board, where the RSSI value is represented through a PWM timer.

With that said, I chose XBee Series 1 to easily get access to the RSSI data.  We will need to use the API mode for the XBee to be able to fully process the RX packet.  My XBee settings were:

Channel: F
PAN ID: 3141
DH: 0
DL: 0 (I used the XBee Arduino API to set the value for broadcast mode 0xFFFF)

I have also attached the XCTU profile I used for those wanting to use my exact settings.  And if you need help configuring your XBee for API mode please see my other Instructable on this topic.

<p>i dont understand what this does can somebody please explain to me?</p>
<p>Sure, a light is illuminated when it detects a neighbor within some proximity. For each neighbor, an additional light is illuminated up to 4</p>
<p>thanks, so 1 light is how many people? how many people does it take to illuminate 1 light? and how many to illuminate 4?</p>
I tried to build a similar project on the basis of jewellery but when I tried to put your code into the Arduino IDE there were lots of errors.<br> Can you help me?<br> #include &lt;XBee.h&gt;<br> #include &lt;NewSoftSerial.h&gt;<br> #include &quot;FilteringScheme.h&quot;<br> It doesn't find either of the above.<br> I know there is now the Softwareserial instead of the newsoftserial, but that didn't help.<br> Do I have to paste the other files (except the .pde) also in somewhere?
This is awesome.<br> <br> My first thought: high-tech <a href="http://en.wikipedia.org/wiki/Handkerchief_code">hanky code</a>!
I've seen it before. Didn't have a CLUE that it meant anything. Thanks for the edu-ma-cation! :-)
Hmm..possibly this can be used to attach to my keys &amp; set of a buzzer when I get to far from them. I am always searching for my keys.
Triple-Like. This is genius! Maybe if I could use a Nano, cuz I hate big keyrings.
These would be great for a Con or some other crowded event! Depending on the range it would be helpful to find your friends.
The 1mW version of the XBee has a range of 300ft outdoors. The Pro line (60mW) can go up to a mile! I wanted the pocket square to only light when neighbors were close. If I didn't do this the lights would always be on.
Wow, I wouldn't need something with that kind of range unless I was going somewhere like DragonCon that ranges over several hotels in Atlanta.
Remember, that's 300ft <em>outdoors</em> where nothing blocks your signal. In doors, the range will be reduced; especially, with thick cos play costumes and humans inside of them
That's a great idea! You could have an LED array tied to distance for each of your friends!
Oooo, that would be great. It would be very helpful for someone like me, I am in a wheelchair and can't see over the crowds. Now I just wish I was savvy enough to actually make some lol
Wow that was a lot more complicated than it looks, impressive! What's the total price for each set and the individual prices for each part? Thanks
LilyPad Simple Board: $20 Lilypad LED x4: $4 XBee: $19 Custom XBee Board: $12 Pocket Square: $5-65 (depending on material) Total: $65 per Pocket Square (Assuming a $10 pocket square)
So it would be cheaper if you sew your own pocket squares. Actually, you don't even have to sew them, my dad made some using an iron on binder stuff (like StitchWitch) and some fabric that was on sale. In that case you could make many of them for less than $1 a piece. (Just the squares, not all the other stuff)
Yeah. You could possibly save on expense if you used a different wireless module, but that might introduce a whole new set of problems :)
That rocks!!!
I really need to do a tech project. I love these ideas..Thanks.
good ...may be useful for security purposes!
whats the proximity on these bad boys? 5 metres? can you increase that?
Totally out of my intellectual league. You must be so much fun as a guest at parties. Way to go!

About This Instructable




More by quasiben:EL Driver Board Image Capturing Bird Feeder Proximity-Sensing Pocket Squares 
Add instructable to: