November 2010 Archives
I also worked some with the accelerometer today. I am working on a max patch that takes the accelerometer readings from the xbee and makes a nice little visual display tilt sensing.
Remote API commands are working perfectly!
and now for range testing...
Today was the first time that I successfully sent a command to an xbee using the xbee API protocol.
The xbee is hard wired to my computer using a sparkfun xbee explorer. It is running the XBP24-B ZNET 2.5 ROUTER/END DEVICE API version 1247 firmware.
Using a max patch I sent the following converted the following hex message into decimal values and sent it through serial.
0x7E 0x00 0x05 0x08 0x4D 0x44 0x30 0x05 0x31
0x7E = start delimiter
0x0005 = length
0x08 = AT Command API frame type
0x4D = Frame ID (set to non-zero value) (any value)
0x4430 = AT Command ('D0')
0x05 = value to set command to (pin HIGH output)
0x31 = Checksum
To calculate the checksum: Not including frame delimiters and length, add all bytes keeping only the lowest 8 bits of the result and subtract the result from 0xFF.
This command turns the digital output of pin D0 to HIGH.
This command turns output of pin D0 to LOW:
0x7E 0x00 0x05 0x08 0x4D 0x44 0x30 0x04 0x32
Robert Faludi of ITP/SVA in NYC has done some good work with the xbees. Notable links:
Regarding changing remote module's parameters with AT commands [from the XBee Pro Znet 2.5 manual, pp. 60]:
"Remote AT Command Request
API Identifier Value: 0x17 Allows for module parameter registers on a remote device to be queried or set"
Today we had the xbee transmitting the output from 4 analog signals.
The following picture shows the I/O settings for the xbee that we are using to transmit the analog data to our computer. It is loaded with XBP24-B ZNET 2.5 ROUTER/END DEVICE AT version 1247 firmware.
The receiving Xbee is loaded with XBP24-B ZNET 2.5 ROUTER/END DEVICE API version 1247 firmware.