Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Software for stacking Arduino Shields

Tags:

arduino

I have been messing with Seeed Ethernet, SD, and a TFT Shields in learning how to use Arduino. However, I have found that I cannot use these shields together because all three of them use Pin 10 for their SS pin.

Is there any way to programmatically change SS pins for any Arduino shield?

I know that the SD library has SD.begin(), but even when I set the pin to an unused pin, the shields do not work together. I know that there is a SPI library that comes with the Arduino softwrare, but SPI.begin(slaveSelectPin) is only on Arduino Due, and I have an Arduino Uno.

I found the Go-Between Shield, but looking at the user guide, I would still have to change my code to use other pins on the Arduino (unless Im reading it wrong), so why not skip it entirely, and make the changes on the shields I already have.

Would this be better on electricalengineering?

like image 643
calccrypto Avatar asked May 16 '13 15:05

calccrypto


People also ask

How many shields can you put on an Arduino?

There is no specific number of "slots", and shields can be stacked on top of each other to combine their features. Most of the time you'll only have one shield at a time fitted to your Arduino, but some people really take it to an extreme!

What is 1Sheeld?

1Sheeld is an All-In-One Arduino shield that lets you use your smartphone capabilites (Sensors, Internet,...etc) to power your Arduino projects.


1 Answers

Is there any way to programmatically change SS pins for any Arduino shield?

No. The pin is hardwired on the shield. You can use different pins on your arduino as SS pins, but they will be connected to the "same" pin on the boards. For this you wouldn't be able to stack the shields and would have to write the SPI code in software.

like image 107
tomato Avatar answered Sep 29 '22 06:09

tomato