This gem is forked from the original XBee-Ruby gem. Because major API changes are being made a new name is appropriate.
See the examples/
directory for some working examples with slightly more complexity than the samples below.
The spec/
directory is left over from the forked gem, and will be converted to Minitest in the near future.
xbee = XBee::XBee.new device_path: '/dev/ttyUSB0', rate: 115200
xbee.open
request = XBee::Frames::RemoteATCommandRequest.new
request.address64 = XBee::Address64.from_string '0013A232408BACE4'
request.at_command = 'NI'
request.id = 0x01
xbee.write_frame request
puts xbee.read_frame
xbee.close
xbee = XBee::XBee.new device_path: '/dev/ttyUSB0', rate: 115200
xbee.open
loop do
frame = xbee.read_frame
puts "Frame received: #{frame.inspect}"
end
All development happens via Git using the Git Flow branching model. The canonical source location is XBee Bitbucket. This repository is automatically mirrored to GitHub.
If you find a bug or have a feature request, please create an issue in the XBee issue tracker.
The XBee code is licensed under the the MIT License
You find the license in the attached LICENSE.txt file