Class XBeeHello
- java.lang.Object
-
- ptolemy.actor.lib.jjs.modules.xbee.test.XBeeHello
-
public class XBeeHello extends java.lang.Object
Generate "Hello XBee World!" on a XBee radio connected to a serial port.Based on https://docs.digi.com/display/XBJLIB/Building+your+first+XBee+Java+application.
- Since:
- Ptolemy II 11.0
- Version:
- $Id$
- Author:
- Christopher Brooks
- Pt.AcceptedRating:
- Red (cxh)
- Pt.ProposedRating:
- Red (cxh)
-
-
Constructor Summary
Constructors Constructor Description XBeeHello()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
main(java.lang.String[] args)
Generate "Hello XBee World!" on a XBee radio connected to a serial port.
-
-
-
Method Detail
-
main
public static void main(java.lang.String[] args)
Generate "Hello XBee World!" on a XBee radio connected to a serial port.To send data, the two radios need to be in api mode. See https://docs.digi.com/display/XBJLIB/Building+your+first+XBee+Java+application.
To list the ports, use:
java -classpath ${PTII}:${PTII}/lib/nrjavaserial-3.11.0.devel.jar:${PTII}/lib/xbjlib-1.1.0.nrjavaserial.jar:${PTII}/lib/slf4j-api-1.7.13.jar:${PTII}/lib/slf4j-simple-1.7.13.jar ptolemy.actor.lib.jjs.modules.xbee.test.XBeeHello
To send data on a port, append the port name:
java -classpath ${PTII}:${PTII}/lib/nrjavaserial-3.11.0.devel.jar:${PTII}/lib/xbjlib-1.1.0.nrjavaserial.jar:${PTII}/lib/slf4j-api-1.7.13.jar:${PTII}/lib/slf4j-simple-1.7.13.jar ptolemy.actor.lib.jjs.modules.xbee.test.XBeeHello /dev/xxyy
To send data on a port and get debugging:
- Set
-Dorg.slf4j.simpleLogger.defaultLogLevel=trace
. See http://www.slf4j.org/apidocs/org/slf4j/impl/SimpleLogger.html for details. - append the port name
For example:
java -Dorg.slf4j.simpleLogger.defaultLogLevel=trace -classpath ${PTII}:${PTII}/lib/nrjavaserial-3.11.0.devel.jar:${PTII}/lib/xbjlib-1.1.0.nrjavaserial.jar:${PTII}/lib/slf4j-api-1.7.13.jar:${PTII}/lib/slf4j-simple-1.7.13.jar ptolemy.actor.lib.jjs.modules.xbee.test.XBeeHello /dev/tty.usbserial-DA01QZI2
- Set
-
-