Welcome to EnviroDIY, a community for do-it-yourself environmental science and monitoring. EnviroDIY is part of WikiWatershed, an initiative of Stroud Water Research Center designed to help people advance knowledge and stewardship of fresh water.
New to EnviroDIY? Start here

Reply To: XBee Networks of Mayfly Loggers – 900Mhz

Home Forums Mayfly Data Logger XBee Networks of Mayfly Loggers – 900Mhz Reply To: XBee Networks of Mayfly Loggers – 900Mhz

Shannon Hicks

    That simple Xbee serial printing example doesn’t require any additional libraries installed in you IDE or called by your sketch. All it is doing is printing text to the 2 separate hardware serial ports on the Mayfly.

    I have never used the programmable versions of the Xbee 900HP. There are infinite combinations of ways to configure an Xbee module and its network, and it gets complicated really fast once you start changing things and adding features. So when I set up my network years ago, I kept it really simple. You first have to program the modules with the X-CTU software before they can be used. I keep them in the same basic configuration that they’re shipped in. Transparent, AT mode, 9600 baud, but I set them as end nodes and not coordinators (my base station is set as the coordinator and never sleeps). The end nodes are set to pin-sleep mode so that the Mayfly wakes them when it’s time to send data. So the Mayfly just drives a pin low (Xbee modules sleep when pin high, and wake when pin low) to wake the module, send it a line of serial text at 9600bd, and the Xbee transmits that line to the coordinator (who’s always awake), and then the Mayfly puts the Xbee back to sleep and then the Mayfly sleeps. I found that sending serial data from the Mayfly to the Xbee module using anything faster than 9600bd will sometimes throw a corrupted character in there occasionally, which messes up the receiving sketch on the coordinator’s UnoEthernet basestation. So it’s best to keep serial communication between the Mayfly and bee modules at the default 9600bd.