Show Posts
Pages: 1 ... 53 54 [55] 56 57 ... 62
811  Using Arduino / Networking, Protocols, and Devices / Re: XBee Coordinator (re)-receiving its own messages on: May 22, 2011, 04:40:06 pm
I set mine up for XB24-ZB and the ZIGBEE COORDINATOR API version 2170 and haven't gotten an echo like you're describing.  I'll try to figure out how to get the library you're talking about to try.  There's a slim possibility of it being a library thing.
812  Using Arduino / Networking, Protocols, and Devices / Re: XBee Coordinator (re)-receiving its own messages on: May 22, 2011, 09:48:23 am
With the lastest version of xbee-arduino libraries (available as the latest svn update),
Sorry, I don't understand, what's a 'svn'?

which currently is broadcast (DL=0xFFFF, DH=0x0000) as it was forced this way by X-CTU.
Forced?  You can't change it?  Which brings up my next question:

That would be the behavior I would expect too! Anyway I am still receiving a frame with Type-ID 0x90!
Which modem and software are you choosing from the menus in XCTU?
813  Using Arduino / Networking, Protocols, and Devices / Re: Arduino + XBee Heartbeat on: May 21, 2011, 11:31:16 pm
Every answer you ever wanted can be found here  This is the actual guide to using and configuring them.  In direct answer to your question, no, you cannot program the XBee, you configure it.  There are a ton of options and possibilities.  The easiest one is the one suggested by Jack, have it transmit a voltage periodically.  However, this requires you go to API mode and that requires you program for receipt of packets to get to the data.  Or, you can just notice that you got a packet and move on.  Depends on what you really want to do with it.

Read through the document and you'll see why you get differing answers from different people.  The possibilities with these little radios goes on forever.
814  Using Arduino / Networking, Protocols, and Devices / creatrope's x10 library on: May 20, 2011, 04:30:59 pm
Did anyone grab creatrope's combined X10 library?  We have a nice send library and a nice receive example, but the combined library seems to have disappeared.  Here's hoping someone has a copy of that hidden away somewhere.
815  Using Arduino / Programming Questions / Re: Regarding the TimeAlarm Library on: May 19, 2011, 01:33:35 pm
I followed up on my threat to try the library out.  After reading the various threads on it and incorporating some of the changes that are described in a couple of the threads, it works really, really great.

No, you can't turn off a timer; no you can't reset a timer so it doesn't fire.  Those changes are certainly possible, but you'd have to add your own code to it to accomplish these things. 

But darn, it can make programs much easier.  I no longer have to count milliseconds between data requests I send, I just set an alarm, write the callback function and forget it.  You can turn on an LED in the code, set a timer to expire when you want the LED to go off and forget it.   You can turn a motor on, set a timer to turn it off in 10 minutes, tomorrow, next week and just forget it.  You can turn off the swimming pool motor at dinner time every day to be sure the kids don't leave it on. 

So, I recommend folks that deal with times greater than milliseconds for asynchronous events around the house, take a look at this library.  It could be just what you need to handle turning off the porch light for you when you forget.  I just wish the author was around so I could complement him directly.
816  Using Arduino / Networking, Protocols, and Devices / Re: XBee Coordinator (re)-receiving its own messages on: May 17, 2011, 11:26:16 pm
I use series 2 xbees and I can set the destination address to anything I want using XCTU.  I don't use the libraries since I don't want to hook the xbee to the hardware serial port so I can't help you with a library problem.  However, I don't ever receive back what I send, even if I broadcast it.  Are you sure you're not receiving the transmit status frame?  That comes back to tell you that the message got sent.
817  Using Arduino / Networking, Protocols, and Devices / Re: Arduino on: May 17, 2011, 11:15:37 pm
I'm guessing about your purpose here, but you can have the xbee go to sleep for a programmable period of time, wake up, and send something.  This is how temperature sensors and such work.  It's part of their normal operation; look at the datasheet under the sleep topic.
818  Using Arduino / Networking, Protocols, and Devices / Re: Just getting started with XBee on: May 17, 2011, 11:08:10 pm
I exclusively use the wire antenna.  It is a short piece of stiff braided wire coated with plastic and a little cap on the end.  The cap will pull off but is easily put back with a little silicon glue.  It is not very flexible and will work fine if it is folded back.  You could put it under a piece of plastic, fold it back and glue it down.  Or, put the xbee at the front of the gun and use the wire for the front sight.  I haven't had any problems with them breaking or even trying to.  I imagine you could rip them off but I'm not too willing to experiment with that.

I would be reluctant to put the xbee inside a metal enclosure, my skills at mounting things leaves a little bit to be desired.  However, you may well be able to do it just fine.
819  Using Arduino / Networking, Protocols, and Devices / Re: Just getting started with XBee on: May 17, 2011, 08:47:19 pm
Regarding range:  My experience with the low power series 2 modules is 50 feet with walls in the way.  Yes, that's a heck of a lot less than the literature says, but that's been my experience.  However, low power series 2 is the way to go in my opinion.  Series 2 means you get the mesh capabilities and you can put intermediaries in strategic places to make sure the signal can travel wherever it needs to go.  Last time I looked you could get three of the low power devices for the price of a high power one; that's a lot of extra coverage for the price.

Regarding configuring the XBee, I totally agree with the comments about a USB adapter of some type.  Myself, I have both one of the direct to USB devices like and the FTDI device  I'm a belt and suspenders kind of guy.  I also use the adafruit device to hook up my XBees although, you absolutely can use the 3V supply from the arduino and connect direct to the ports.  I did this for one of my devices that is dedicated purpose and doesn't get messed with much.  The adafruit adapter device is great for putting an XBee in as an intermediary because you can mount it directly to a 5V wall wart and just plug it into the wall somewhere.  The USB adapter is great for monitoring what is going on in the network when you're testing things.  Just plug it in and watch what is going on through the terminal that is part of XCTU.
820  Using Arduino / Networking, Protocols, and Devices / Re: Using XBEE AT Commands Using Arduino on: May 17, 2011, 06:52:34 pm
You're not understanding something.  NSS isn't like a serial port, it actually creates a serial port, it takes two pins of your arduino and makes a serial port out of them.  Just like pins 0 and 1.  It's software not hardware, but you use it almost exactly the same.

So, whatever you can do with the hardware port and the serial library, you can do with the new port and the software serial library.  Does it support AT commands?  Yes and no.  It will certainly send and return AT commands and responses, but there is nothing in the softwareserial library special about AT commands to an XBee.

However, if you compile the code I put above and make one little correction that I noticed when I compiled it to test this, it will take the +++ that you type into the arduino serial window and send it to the XBee.  The XBee will respond with OK and you can continue from there.

Connect the XBee rx to arduino pin 3, XBee tx to arduino pin 2 and the arduino serial window needs to be set to "no line ending" (menubox down on the bottom) and just play away.  From there, once you see the response, play with delays and other things until you get a better understanding.

Oh, the reason the last piece of code you posted didn't work was because the +++ has to be sent alone with a short guard time.  You were using Serial.println which puts a end of line character on there as well.  Try it again using Serial.print("+++");  Notice there no 'ln' at the end.

Good luck
821  Using Arduino / Networking, Protocols, and Devices / Re: Using XBEE AT Commands Using Arduino on: May 17, 2011, 11:25:37 am
Here is the example from the library directory with my comments about what it is doing; I changed the mySerial to xbeeSerial to help it be a little more clear for your particular instance:

Someone correct me if I mess it up

SoftwareSerial xbeeSerial(2, 3);  //This creates the software serial port using pin 2 as receive and 3 as transmit
                                          // just like using the regular serial port  connect these to your device

void setup() 
  Serial.println("Goodnight moon!");

  // set the data rate for the SoftwareSerial port
  xbeeSerial.begin(4800);                   // This sets the baud rate for the new port on pins 2 and 3
  xbeeSerial.println("Hello, world?");     // and puts hello world out the port so you can see it

void loop() // run over and over
  if (xbeeSerial.available())                           //if there is a character on the software serial port
    Serial.print((char);           // put it out the hardware serial port
  if (Serial.available())                                 // if there is a character on the hardware port
    xbeeSerial.print((char);         // put it out the software port

See, you use it just like the hardware port.  This give you a place to put debugging text while leaving the software port open to handle the data traffic.  It's a little bit more complicated because you have two ports to worry about, but you will get used to that pretty quickly. 
822  Using Arduino / Networking, Protocols, and Devices / Re: Mysterious RS485 problem on: May 16, 2011, 08:56:45 pm
You're absolutely correct.  I didn't even know there were chips that handled rx to tx automatically until after I had a converter already in hand.  Oh well, I had extra pins on the arduino and time to play.

The OP is probably checking other forums for advice.
823  Using Arduino / Networking, Protocols, and Devices / Re: Mysterious RS485 problem on: May 16, 2011, 05:17:38 pm
You asked how the receiver knows how many bytes to receive.  The answer is that something has to tell it; constant length, length in the header, timeout, special end character, combination of these or something else are all possible.  Successful receiving code I've seen has something to tell it to give up or it will just wait forever.  If we're talking about the bit level, it tries to form a character and gives whatever it got as you described.  This is done by character timing based on baud rate once it gets the start bit. 

If the concern is that the the character or characters get cut off because you switch the tristate buffer too soon, the simplest way to avoid this is to tack a character on the end that is ignored and look to see if it disappeared or got garbled.  You can also time it based on baud rate to delay when you change the tx line.

Or, just use NewSoftSerial to separate debug data from the data stream you're interested in and don't worry about it.
824  Using Arduino / Networking, Protocols, and Devices / Re: Master, Slave, I2C and TinyGPS issues on: May 16, 2011, 04:26:09 pm
I've used NewSoftSerial extensively at up to 57K and it has worked really well.  tinyGPS is about as quick as you can get for parsing the GPS data coming in.  You're running at 4800 so about 500 characters a second and that means a couple of milliseconds per character.  Just roughly guessing, it may be that your not getting back fast enough to grab a character in time from the nss serial.  Could the math conversions from float to ascii for the various serial prints you have be taking more time than you have available?  NSS version 10C has a new method - bool overflow() - that can let you know if you didn't get back in time and the rx buffer ran over; you could put a test in for that.

Oh, be sure you're using version 10C, to the best of my knowledge that is the fastest version available and it certainly sounds like you are dropping a character somewhere.  You get the version number by - int ver = NewSoftSerial::library_version(); - it returns a 10.

But, I bet you've already checked everything I just suggested already.
825  Using Arduino / Networking, Protocols, and Devices / Re: Using Xbee to implement a wireless network on: May 16, 2011, 03:23:19 pm
In my opinion, the latency could be a problem but, once you're aware of it, you can easily work around the shortcomings.  Regarding Series 2 vs 1.  I've only used series 2 and found it a little difficult at first, but somewhat easier with more experience and very reliable over time.  I don't avoid series 1, just want the latest set of bug fixes and software advances I can get my hands on.

One thing though, you will almost certainly be stuck with using the API mode to get things like checksums and easy addressing of messages.  AT (transparent) mode doesn't have any of that.
Pages: 1 ... 53 54 [55] 56 57 ... 62