0

I have an Arduino Mega with a Ethernet2 Shield + RS232 Shield

SD Card works well with Ethernet2 Shield, but it get a conflict when I add the RS232 Shield.

Both hardware use the same PIN:

#define RS232_DIR_PIN     4 // RS232 Shield
#define AMS_SS_SD         4 // Ethernet Shield

 pinMode(RS232_DIR_PIN, OUTPUT);             //Set RS232 direction pin as output
    digitalWrite(RS232_DIR_PIN, LOW);           //Set RS232 chip as receiver

    //Set SPI to Read SD Card
    pinMode(AMS_SS_HARDWARE, OUTPUT); 
    digitalWrite(AMS_SS_HARDWARE, HIGH);

I dont need both running at same time, but I dont know how to make only one work at a time.

  • You will need to physically modify one of these to use different pins. – Chris Stratton Jul 6 '17 at 14:59
  • @ChrisStratton, do you know wich pin I could use for them? for Arduino Mega – Marckaraujo Jul 6 '17 at 17:11
  • Probably any available I/O, it's more a mechanical issue of what you can access. – Chris Stratton Jul 6 '17 at 17:15
  • 1
    @ChrisStratton, it worked, just moved the RS232 Pin to 5 physically. Set this as an answer. thanks – Marckaraujo Jul 6 '17 at 20:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.