Go Down

Topic: Making WiFly (RN-131C) work with Arduino Due (R3) (Read 2429 times) previous topic - next topic


I have a Sparkfun WiFly Shield (RN-131C, 6/15/10 rev). When I plug it into an Arduino Uno (SMD ed.) and use the WiFly-Shield library, it works: no problems. Plugging it into an Arduino Due (R3) does not.

I'm still a relative newb when it comes to Arduino. However, my best guess is that communications over SPI is not working.

I see that the Due moved SPI pins to the center of the board on a 2x3 header. So I tried not plugging the WiFly shield directly into the Due, but jumping wires from the WiFly shield headers to the Due headers as seemed appropriate. That is:

WiFly VIN -> Due VIN
WiFly GND -> Due GND
WiFly  D7 -> Due  D7    (/IRQ)
WiFly D10 -> Due D10    (/CS)
WiFly D11 -> Due D75    (MOSI)
WiFly D12 -> Due D74    (MISO)
WiFly D13 -> Due D76    (SCK)

When I run SpiUartTerminal example, it fails in SpiUartDevice::uartConnected, where the readRegister(SPR) call returns 0xFF rather than the test character. Ideas?

Am I misunderstanding how things work here? As far as I can tell (looking at http://www.sparkfun.com/datasheets/DevTools/Arduino/WiFly_Shield-v17.pdf and http://www.robgray.com/temp/Due-pinout.pdf), the 10-13 pins on the WiFly shield are wired to the CS/MOSI/MISO/SCK of the WiFly's SPI interface, and that's my only option (no UART exposed). Shouldn't jumpering those to the moved pins of the Due work?


In case anyone else needs this information…

I managed to get things working. Wired things as in my above post. Loaded up the SpiUartTerminal example sketch from the WiFly-Shield library (which, btw, also needs to have F(x) #defined as no-op). Added one line to the top:

pinMode(10, OUTPUT);

After that, was able to connect to cmd mode, send commands, join a network, and telnet in.

I assumed that the SpiUartTerminal sketch was sufficient in itself (and perhaps it is for the Uno or other boards), but I had to explicitly set the CS pin for OUTPUT to get things working. Always the simple things...

Go Up