Show Posts
|
|
Pages: 1 2 [3] 4 5
|
|
34
|
Forum 2005-2010 (read only) / Interfacing / Re: understanding xbee and arduino serial
|
on: August 20, 2009, 05:53:09 pm
|
You should be able to use the xbee-arduino library to do this. Although it doesn't implement i/o samples yet, it should parse any valid xbee packet. In your loop: xbee.readPacket(); if (xbee.getResponse().isAvailable()) { if (xbee.getResponse().getApiId() == RX_16_IO_RESPONSE) { // got a i/o sample // now we just need to pick out the relevant parts // we can access the packet with xbee.getResponse().getFrameData() // per the doc http://xbee-arduino.googlecode.com/svn/trunk/docs/api/class_x_bee_response.html#d958f0b5200138545bdd762111299a94 // the frame data starts with the byte that follows the api id // now open your manual to page 62 http://ftp1.digi.com/support/documentation/90000982_A.pdf // we can see the fifth byte takes us to the RF data -- the meat of the packet. // now go to page 12. the first byte is # samples, then the channel indicators. you're looking for dio4 and that's the fifth bit of the fifth byte (not making this up). So really byte # 9. So this should do it:
if ((xbee.getResponse().getFrameData()[9] & (1 << 4)) { // it's on
} } }
Let me know if this works. Hopefully I got the correct byte. I can look into adding this feature to the library if there's enough interest.
|
|
|
|
|
36
|
Forum 2005-2010 (read only) / Interfacing / Re: Arduino to Arduino Communication
|
on: November 21, 2009, 06:33:57 pm
|
|
ahh.. didn't realize you bought them already. don't worry, it'll still work. As I said before, you need to solder some headers on the regulated to access the xbee pins. then power the board from arduino 5v and connect rx/tx and ground.
You can use an unchipped arduino to configure the xbee with x-ctu. Firmware upgrades require rts/cts (which neither arduino or xbee regulated expose), so you really need an xbee explorer, but you are probably ok with the default firmware.
|
|
|
|
|
37
|
Forum 2005-2010 (read only) / Interfacing / Re: Arduino to Arduino Communication
|
on: November 21, 2009, 09:39:11 am
|
Don't bother with the xbee regulated. You don't need it. All you need is 2 XBee shields. They are available in a kit, or assembled for a bit more. The shields expose arduino i/o pins, provide 3.3 power, and link serial comm. between arduino and xbee. The xbee explorer will make it easier to configure the xbee with x-ctu and upgrade firmware. You can configure xbees via arduino sketches, or even unchip an arduino and use it like an xbee explorer. There's a ton of examples out there.. just use the search button 
|
|
|
|
|
42
|
Forum 2005-2010 (read only) / Interfacing / Re: XBee issues
|
on: November 12, 2009, 02:12:48 pm
|
|
Hi Chris,
The I/O samples feature requires API firmware. With API firmware you communicate with the radio by sending/receiving packets. Just load the API firmware on there and you should be good.
Even with AT firmware, you should not have gotten any errors when uploading. When the jumpers are in the usb pos., the xbee is not involved. I think you may need to unplug the usb cable before switching the jumpers.
Andrew
|
|
|
|
|
44
|
Forum 2005-2010 (read only) / Interfacing / Re: Comminication between Arduinos - powerline or RF?
|
on: November 12, 2009, 04:38:56 pm
|
|
Opps. At first I thought you had ethernet at the coffer maker. Now I see you were talking about eth over powerline. I would consider a wifi router/access point to provide ethernet at the coffee maker. You can probably find a cheap used one on ebay. This of course assumes you have wifi already. If you can do this, you only need one arduino and don't need to leave your computer on all the time for monitoring/control. With an openwrt router, you could ditch the arduino eth and do serial interface with the arduino.
|
|
|
|
|
45
|
Forum 2005-2010 (read only) / Interfacing / Re: Comminication between Arduinos - powerline or RF?
|
on: November 12, 2009, 11:12:52 am
|
|
You mention "cheapest", so I'm going to say, eliminate the master arduino (just saved you $30) and use ethernet (wiznet) with the coffee maker arduino. You can run webduino for remote control. I would use an RBBB ($12) with a wiznet module from nkc electronics (~$20).
XBees are fine and good, but will cost you more (2*XBees + Arduino + shields/breakout) and while probably reliable enough, they're never as reliable as ethernet. X10 is just plain unreliable, and will cost you more as well.
|
|
|
|
|