I'm having issues stacking shields on my Arduino Mega 2560. I would like to add to the mega a ethernet shield (https://store.arduino.cc/products/arduino-ethernet-shield-2) and on top of that the dragino lora shield v1.4 (https://wiki.dragino.com/index.php?title=Lora_Shield). When I connect only the dragino lora shield to the mega I do get the lora to initialize but the moment I add the ethernet shield to the mega and the dragino lora shield to the ethernet shield the lora initialization fails. Is this stacking possible and if so any advice on how to get all to work together?

Thanks in advance.

  • 1
    idk about those 2 particularly, but in general, lots of shields are incompatible with other shields because they want to use up the same pins (gpios). Look that up in datasheet or sketch/libs.
    – dandavis
    Commented Apr 10, 2022 at 9:27

1 Answer 1


Both those boards use pin 10 for chip select by default. You will need to change that.

Probably the simplest one to change is the LoRa board. If you look at the WiKi page you link to it lists a set of resistors and jumpers which can be altered to modify the connectivity of the board. By default R9 is populated which connects to pin 10. If you move that to the R10 position next to it you will instead be connecting to D5 for the chip select pin. Moving surface mount resistors can be tricky though so you may want to practice working on a scrap board first.

And of course when you have changed the chip select pin you will also have to change your code to use that new chip select pin instead.

  • Thank you for your answer. I wanted to give it a try but found that my LoRa board is more like the v1.2 instead of the v1.4. It's hard to see since it's not written anywhere on the board. Can you maybe see a way around this problem on the v1.2 LoRa board?
    – Ayayron
    Commented Apr 10, 2022 at 14:59
  • 1
    @Ayayron They have obviously identified that this is a commonish problem and fixed it in the later version. You can remove R1 which will isolate pin 10, but they have no easy facility for connecting chip-select to somewhere else. You will have to solder a fine wire on the board between the pad of R1 furthest from the header to where you want it. Or (as long as this shield is the top of the stack) cut pin 10 off from the header and jumper between that pin's socket and the pin you want to use. Or if the pins are flexible enough bend it out of the way so it doesn't insert into the ethernet shield
    – Majenko
    Commented Apr 10, 2022 at 15:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.