Pages: [1]   Go Down
Author Topic: Ethernet shield, virtualwire and interrupts  (Read 1052 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 5
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi guys,

I'm working on a project whose ultimate goal is to send messages to Pachube in response to events originated from my house.
More specifically, I'm trying to emulate a "classical" PIR-based alarm system, where a PIR sensor is used to detect movements inside a given room; the "presence event" is sent over a 433 MHz link (made up with these tx+rx: http://www.hwkitchen.com/products/a433mhz-rf-link-kit/) implemented using Virtuawire library. The receiver side is composed by an arduino, the Ethernet shield and the 433 MHz receiver.

The issue is that when I use the Virtualwire library at the receiver side, which is needed to receive the data over a generic digital arduino pin, the Ethernet shield doesn't work properly.

I guess that this issue may be caused by the interrupts used by both Virtualwire and Ethernet libraries, which can conflict...

Can this be the reason? Did someone have experience on using the Ethernet shield with other hardware that uses interrupts?

Thank you in advance,
Alessandro

PS: Happy new year! smiley
Logged

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 551
Posts: 46240
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Which pins are you using for the VirtualWire interface? The defaults are 11 and 12 for the rx and tx pins. These are part of the SPI interface used by the Ethernet shield to talk to the Arduino.
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 5
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

To avoid using the same ones used by the ethernet shield, I connected rx to digital pins such as D8 and D2; the RF reception is fine, but the ethernet transmission is still missing.
Logged

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 551
Posts: 46240
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Does the ethernet shield work on its own? Without the radio connected and without WirtualWire included? That is, are you solving the right problem?

I'm not saying that you are not. I'm just asking for clarification.
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 5
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Sorry for the long delay smiley
Anyway, yes, the ethernet shield works perfectly. At the moment I solved this issue by employing another arduino, whose task is just to receive from the RF interface and, then, send an alarm message over the serial line. However, I hope I can simplify this, because I do not want to use two boards...

Alessandro
Logged

Pages: [1]   Go Up
Jump to: