The goal of today was to use the xbee-api to send remote commands to an xbee through max.
Xbee-Api download site:
I used this page to get going with the xbee-api in eclipse:
Then I set up the xbees in the exact way that the xbee-api website instructed.
At first I was getting strange errors and I then found out that my txrx jar and dll were meant for a 32 bit os. So I downloaded the necessary 64 bit libraries here:
I was then able to turn on an led wired to the remote xbee by running the RemoteAtExample.java included in the api.
I then put this code into a max mxj object and was able to flash the light remotely from.
To get this to work in max I did the following:
- In the root max directory I placed the 32 bit rxtxSerial.dll
- In \Max 5.0\Cycling '74\java\lib I placed log4j.jar, xbee-api-0.9.jar, and the 32 bit RXTXcomm.jar
Maxbee.java - Source
Maxbee.class - Put this in your Max class path
RemoteBlink.maxpat - Remote blinking example patch