Last month I completed building my arduino controlled OWI robotic arm which is pretty cool, but the next step I would like to take is to be able to control it over the internet, and possibly included a webcam so anyone can connect to my server and control the arm. But first things first, I need to be able to work it myself.
I've been playing the an ethernet shield that I bought and it seems pretty simple, now I was wondering whether it would be possible for a single arduino to control both a motor shield and an ethernet shield. I looked up the pin usage from shieldlist.org and the only pins (excluding SD) that they share are MISO, MOSI and SS. Now I only know a little about how these work but I get the impression that you should be able to have multiple 'slaves' connected to the one 'master', the arduino.
Any help would be appreciated. If I do get it working then I'll post the IP address on these forums so people can have a little play, that should freak out my lil brother
Now I only know a little about how these work but I get the impression that you should be able to have multiple 'slaves' connected to the one 'master', the arduino.
Yes, you can have multiple devices sharing the MISO and MOSI pins, but each device needs a separate SS (slave select) pin. The ethernet shield is hardwired to pin 10, which is unfortunate, since that is a PWM pin, and often used by motor shields.
What pins are you using for the motor shield. It most likely is NOT an SPI shield, so using any pins from 10 to 13 is not good.
Which does indeed use the same pin 10 for SS. Is it possible to clip off this pin on the Motor shield and rewire it to another... except there are no free PWM pins left. I have a Mega as well, but then MISO,MOSI,SS pins are in completely different places and then both shields would need to be rewired...
I'm using the Adafruit Motor Shield,...Which does indeed use the same pin 10 for SS.
That shield uses pin 10, but NOT as SS. SS is slave select. You only have slave select pins for SPI devices. The motor shield is not an SPI device. The Ethernet shield is.
I have a Mega as well, but then MISO,MOSI,SS pins are in completely different places and then both shields would need to be rewired...
Any suggestions?
Sure. Use both Arduinos. Put the Ethernet shield on one, and the motor shield on the other. Connect one of the hardware serial ports on the Mega (not Serial, pins 0 and 1) to the hardware serial port on the other Arduino.
Set the Ethernet equipped Arduino up as a server, and send it GET requests. Have it extract data from the GET requests, and send them to the other Arduino via the serial port. Have the motor shield equipped Arduino do stuff based on serial data.