Welcome to EnviroDIY, a community for do-it-yourself environmental science and monitoring. EnviroDIY is part of WikiWatershed, a web toolkit designed to help citizens, conservation practitioners, municipal decision-makers, researchers, educators, and students advance knowledge and stewardship of fresh water. New to EnviroDIY? Start here

Reply To: Arduino datalogger

Home Forums Other Data Loggers Arduino datalogger Reply To: Arduino datalogger

Shannon Hicks

If you’re using the Fio board, then your Xbee is forced to use the only hardware serial port on the board (pins 0 and 1). So if you really want to print out data to the serial port at the same time, you’ll need to use 2 other pins for that, using SoftwareSerial. I assume you’re using a FTDI adapter for connecting your Fio to your computer since the Fio doesn’t have built-in USB support. So just use some wire jumpers to connect the RX and TX pins of your FTDI adapter to 2 unused pins on your Fio and designate them as the SoftwareSerial pair in your sketch. So anything you want to send via the Xbee goes to the serial port, and anything you want to print on the computer’s serial monitor goes to the SoftwareSerial port.

But if you haven’t configured your Xbee using X-CTU or through at commands, then your Fio can’t communicate with the Xbee at 57600 baud so don’t use that speed in your sketch. You’ll have to either change the Fio sketch to 9600 or change the Xbee to 57600. Where are you transmitting your Xbee data to? I assume you have a pair of them and will use the other one as a receiver somewhere? Keep in mind that the baud rate that you configure for the Xbee’s UART communication is totally separate from the actual transmit rate of the modules. You’re only changing the speed at which the Xbee communicates with external UART devices. It doesn’t matter what speed you select, as long as the radio and the device are both using the same one.