VirtualWire + Ethernet Sheild

Good Morning,
someone of you know how to use VirtualWire + Ethernet Sheild without encounter any issues ?

if yes please let me know,

Andrea

VirtualWire can be configured to use any pins, not just the default 10, 11, and 12. What issues are you encountering?

Hi I've tried to use, a differente pin but I still to have the issues ... below the code ...

#include <VirtualWire.h> 
#include <SPI.h>
#include <Ethernet.h>

#include <Servo.h> 
Servo myservo;  // create servo object to control a servo 

byte mac[] = { 0x90, 0xA2, 0xDA, 0x00, 0x8D, 0x64 }; //physical mac address
byte ip[] = { 192, 168, 1, 102 }; // ip in lan
byte gateway[] = { 192, 168, 1, 1 }; // internet access via router
byte subnet[] = { 255, 255, 255, 0 }; //subnet mask
EthernetServer server(84); //server port

String readString; 

//////////////////////

void setup(){
  Serial.begin(9600);
  vw_setup(1200);
  vw_set_tx_pin(2);
  vw_set_rx_pin(3);
  vw_set_ptt_pin(5);
  pinMode(8, OUTPUT); //pin selected to control
  //start Ethernet
  Ethernet.begin(mac, ip, gateway, subnet);
  server.begin();

  myservo.write(90); //set initial servo position if desired
  myservo.attach(7);  //the pin for the servo co
  //enable serial data print 
  
  Serial.println("server LED test 1.0"); // so I can keep track of what is loaded
}

void loop(){
  // Create a client connection
  EthernetClient client = server.available();
  if (client) {
    while (client.connected()) {
      if (client.available()) {
        char c = client.read();

        //read char by char HTTP request
        if (readString.length() < 100) {

          //store characters to string 
          readString += c; 
          //Serial.print(c);
        } 

        //if HTTP request has ended
        if (c == '\n') {

          ///////////////
          Serial.println(readString); //print to serial monitor for debuging 

          client.println("HTTP/1.1 200 OK"); //send new page
          client.println("Content-Type: text/html");
          client.println();

          client.println("<HTML>");
          client.println("<HEAD>");
          client.println("<TITLE>Arduino GET test page</TITLE>");
          client.println("</HEAD>");
          client.println("<BODY>");

          client.println("<H1>Test Button</H1>");
          
          client.println("<a href=\"/?on\"\">ON</a>"); 
          client.println("<a href=\"/?off\"\">OFF</a>"); 

          client.println("</BODY>");
          client.println("</HTML>");
 
          delay(1);
          //stopping client
          client.stop();

          ///////////////////// control arduino pin
          if(readString.indexOf("on") >0)//checks for on
          {
            myservo.write(40);
          
            char msg[1];
            msg[0] = '1';
       
            vw_send((uint8_t *)msg, strlen(msg));  // invia la lettera a
         
            Serial.println("Led On");
     
          }
          if(readString.indexOf("off") >0)//checks for off
          {
            myservo.write(140);
            digitalWrite(8, LOW);    // set pin 8 low
            Serial.println("Led Off");
          }
          //clearing string for next read
          readString="";

        }
      }
    }
  }
}

The exact error is this:
Servo/Servo.cpp.o: In function __vector_11': /Applications/Arduino.app/Contents/Resources/Java/libraries/Servo/Servo.cpp:103: multiple definition of __vector_11'
VirtualWire/VirtualWire.cpp.o:/Applications/Arduino.app/Contents/Resources/Java/libraries/VirtualWire/VirtualWire.cpp:416: first defined here

warm regards
Andrea

So, the conflict appears to be between VirtualWire and Servo. I guess this explains your post title.

Yes correct, is there a way to fix that ? thanks andrea

Hi All,
the problem is that ... looking Servo.cpp: (line 103) and VirtualWire.cpp (line 416) that function SIGNAL (TIMER1_COMPA_vect) is present in both ...

Then I've change the function in VirtualWire.cpp putting SIGNAL (TIMER6_COMPA_vect) because the other one arrive until 5 ... in compile mode there is no problem ... but I've note that the serial monitor is not working anymore ...due the fact putting back like initial the serial monitor can works ...

How I can do to remove the issues and continue to work ?? SIGNAL (TIMER1_COMPA_vect) maybe is call in other parte that I didn't know ... I can try to modify to the servo.cpp part ?

Thanks for the support,
Andrea