| ||
|
Shopping Cart
|
| Home | MP3 Player | 8051 Tools | All Projects | PJRC Store | Site Map |
|
You are here:
Teensy
| Search PJRC |
|
|
XBee LibraryThe XBee library, written by Andrew Rapp, is for communicating with XBee wireless modules in API mode.Download: XBee.zip (Version 0.2.1, modified for Teensy) This library has been confirmed working up to 38400 baud on Teensy 2.0. Hardware RequirementsThe simplest way to use XBee with Teensy is this adaptor board.
![]()
![]()
Configuring XBee with X-CTU SoftwareXBee modules need to be configured with the X-CTU software.Before running X-CTU, upload the USBtoSerial example, found in File > Examples > Teensy > USB_Serial > USBtoSerial. Tools > USB Type must be set to Serial before upload to Teensy.
![]() When you run X-CTU, select the "USB Serial" port which is Teensy (running the USBtoSerial sketch), and then click "Test / Query". If "Test / Query" fails, check your connections and power to XBee.
![]() To access XBee's settings, click the "Modem Configuration" tab, and then click "Read".
![]() From here, you can configure your XBee for API mode. Using the XBee Library ExamplesThe XBee examples use the NewSoftSerial library because the Arduino Serial port is need to talk to XBee. On Arduino, you would need to connect another USB-Serial converter to the NewSoftSerial pins.On Teensy there is no need for NewSoftSerial and an extra USB-Serial converter. You can use the USB port, because XBee uses the completely separate Uart pins. To make the examples work easily, remove the NewSoftSerial object, and add a #define to use Serial in place of "nss". //NewSoftSerial nss(ssRX, ssTX); // not needed for Teensy #define nss Serial // "nss" prints to Arduino Serial Monitor
TODO: help wanted... to write the rest of this page with actual usage examples. Here is the main XBee library page.
TODO: test this adaptor with the new wifi modules (update: Oct 20, 2011: a pair of WiFi modules are on order... plan to test soon and add photos + results here)
| |||||||||||||||||||||||||||