Page 1 of 1

New Arduino Uno Ethernet and Wave?

Posted: Mon Aug 15, 2011 8:47 pm
by miax
Adafruit,

I have a question about the new Uno Ethernet if I may, as this could solve a major problem for us with RiderScan:

Have you (or anyone) tried the new Uno Ethernet with the Wave shield? The big problem for us with the Ethernet shield is that it kept it's CS pin HIGH even when not in use, thus hogging the SPI bus. My hope is that as a byproduct of the collision between these two, that it will be more generous with the SPI bus now..

I plan to buy one when I get paid this week and experiment with it, but was curious if you had tried it yet in the shop.

Cheers!

Kris

Re: New Arduino Uno Ethernet and Wave?

Posted: Mon Aug 15, 2011 10:40 pm
by adafruit
the arduino ethernet is identical to arduino + ethernet shield in all respects except size

why dont you just put the music on the ethernet shield's SD card holder, then modify the wavehc library to use pin 4 instead of pin 10 (you'll also need to change the DAC code to avoid pin 4)

arduino_support, can you help with this?

Re: New Arduino Uno Ethernet and Wave?

Posted: Mon Aug 15, 2011 11:26 pm
by miax
Great idea. :)

I had played with that before, but never Really put the effort into making it work - I'll start on that testing ASAP!

There has to be a way to do this, and I'm grateful for all the support! :)

Kris

Re: New Arduino Uno Ethernet and Wave?

Posted: Thu Aug 18, 2011 9:38 pm
by miax
SCORE! This is a big find - robtillaart from the Arduino put me onto the fix for this and I'm Very grateful. :D

Hopefully this will help others too, as it's possible to use the Wave and Ethernet shield's together on a Mega2560 (and I assume UNO's as well).

I was not able to get the libraries to cooperate with the Micro SD slot on the Ethernet shield, but as the SD slot on the Wave shield is available and just-as-good, I stayed with it. So the configuration was:

Wave shield using PIN #53 (on the Mega) for the Cable Select pin, and the Ethernet shield using it's default Cable Select of PIN #10. I also have the PN532 RFID breakout board on the SPI using Cable Select PIN 33.

This set of defines seemed obvious once robtillaart posed it, I felt to myself, "Doh! - Brilliant". and it works:

Code: Select all

#define SSRFID 33
#define SSMSD 53
#define SSETHER 10

void EnableEthernet(void)
{
  digitalWrite(SSRFID, HIGH);
  digitalWrite(SSMSD, HIGH);
  digitalWrite(SSETHER, LOW);
}
void EnableRFID(void)
{
  digitalWrite(SSETHER, HIGH);
  digitalWrite(SSMSD, HIGH);
  digitalWrite(SSRFID, LOW);
}
void EnableSD(void)
{
  digitalWrite(SSETHER, HIGH);
  digitalWrite(SSRFID, HIGH);
  digitalWrite(SSMSD, LOW);
}
Then I just peppered the EnableSD(); EnableRIFD(); and EnableEthernet(); when-ever I need to use those components, and everything cooperates just fine. :) I assume this should also be usable in the same format in any sketch that needs multiple peripherals on the SPI(), but before that I hope others can validate that there isn't a better way.

It works great with RiderScan however, which toggles between using the SD card, RFID reader and Ethernet shield successfully now.

Cheers,

Kris