Pages: 1 [2]   Go Down
Author Topic: SPI Interface: Wifi Shield and Arduino Robot  (Read 806 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Jr. Member
**
Karma: 0
Posts: 64
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Changed them back as they were:

Code:
#define DATAOUT 11 // MOSI
#define DATAIN  12 // MISO
#define SPICLOCK  13  // sck
#define SLAVESELECT TKD3 // ss (was pin 10; changed to pin TKD3)
#define SLAVEREADY TKD5  // handshake pin (was pin 7; changed to pin TKD5)
#define WIFILED TKD4  // led on wifi shield (was pin 9; changed to pin TKD4)

and still the same error message: "Wifi shield not present"
Logged

Miramar Beach, Florida
Offline Offline
Faraday Member
**
Karma: 148
Posts: 6102
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

If you have the wifi library back the way it was, then you have interference from the robot SPI interface. Which pin does it use for the SPI slave select?
Logged

Offline Offline
Jr. Member
**
Karma: 0
Posts: 64
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Sorry, but I don't quite understand your question.  The slave select is connected to pin 10 on the Wifi Shield, and pin TDK3 on the Robot Control Board.  Is that what you were asking?
Logged

Miramar Beach, Florida
Offline Offline
Faraday Member
**
Karma: 148
Posts: 6102
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Sorry, but I don't quite understand your question.  The slave select is connected to pin 10 on the Wifi Shield, and pin TDK3 on the Robot Control Board.  Is that what you were asking?
Yes. You can't use D10 for both slave select pins. The wifi shield uses D10 as the slave select, and the wifi library expects that pin to be the slave select. It appears the robot also uses D10. That is why you can't get the wifi shield to initialize, or even respond to the "shield not present" function call.

edit: If you want to try changing the wifi slave select, you had the right file, but you changed too many pins. The only one you needed to change was this one.
Code:
#define SLAVESELECT 10 // ss
Change that to another pin and bend D10 on the wifi shield so it doesn't insert into the Arduino, then jumper D10 on the shield to the new pin. Insert the robot's slave select into D10 on the Arduino.

FYI: You can't use D7 for the robot either. It is the wifi shield handshake pin.
« Last Edit: February 16, 2014, 07:01:44 am by SurferTim » Logged

Offline Offline
Jr. Member
**
Karma: 0
Posts: 64
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

So, just to clarify, this change is correct:

Code:
#define SLAVESELECT TKD3 // ss (was pin 10; changed to pin TKD3)

and all the other pins remain unchanged?

I assume I can also remove the other two physical connections I made?
Logged

Miramar Beach, Florida
Offline Offline
Faraday Member
**
Karma: 148
Posts: 6102
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Which pin is TKD3? Which Arduino board are you using?

Logged

Offline Offline
Jr. Member
**
Karma: 0
Posts: 64
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

TKD3 is an open I/O pin, as are TKD4 and TKD5.  I am using the Robot Control Board; i.e. the top board of the two, of the Arduino Robot.
Logged

Miramar Beach, Florida
Offline Offline
Faraday Member
**
Karma: 148
Posts: 6102
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Post a link to that robot control board please, just to insure I am  looking at the right one.
Logged

Offline Offline
Jr. Member
**
Karma: 0
Posts: 64
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The respective pins are discussed in the section "Inputs and Outputs" on the following page: http://arduino.cc/en/Main/Robot

I have attached a detailed layout.

* Control Board v006 Rev5.1.pdf (528.5 KB - downloaded 10 times.)
Logged

Miramar Beach, Florida
Offline Offline
Faraday Member
**
Karma: 148
Posts: 6102
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

All the pins are different. The SPI data pins are not the same. It would take major editing in the wifi library to get it to work. Maybe someone else has a solution for you. I don't have the robot board to experiment with.

BTW, TKD3 is D22 according to the pin map. Use 22 as the ss.

Logged

Offline Offline
Jr. Member
**
Karma: 0
Posts: 64
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Could I not get it to work by means of changing it to SS=pin22 and the others as I had them?
Logged

Offline Offline
Jr. Member
**
Karma: 0
Posts: 64
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Can anyone please assist me on this?
Logged

Offline Offline
Newbie
*
Karma: 1
Posts: 5
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

anyone get this to work? Im having exactly the same issue
Logged

Offline Offline
Jr. Member
**
Karma: 0
Posts: 64
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Karl67 please let me know if you manage to do this! I am urgently looking for advice!
Regards
Stefan
Logged

Pages: 1 [2]   Go Up
Jump to: