yun SPI problem

I have just started to play with the Yun SPI bus and it does not seem to work at all. I have used SPI loads of times and the Arduino SPI code looks really simple, the only change is setting select pin to 10 and the standard SPI functions.

I did have a teensy board hook up, but no just scoping out the pins and not seeing anything coming from the Yun.

// inslude the SPI library:
#include <Bridge.h>
#include <YunServer.h>
#include <YunClient.h>
#include <SPI.h>

// set pin 10 as the slave select for the digital pot:
const int slaveSelectPin = 10;

void setup() {
  // set the slaveSelectPin as an output:
  pinMode (slaveSelectPin, OUTPUT);
  // initialize SPI:
  SPI.begin();
}

void loop() 
{

  do{
      digitalPotWrite(0x55, 0x55);
      delay(1000);
  }
  while(1);

}

void digitalPotWrite(int address, int value) 
{
  // take the SS pin low to select the chip:
  digitalWrite(slaveSelectPin, LOW);
  //  send in the address and value via SPI:
  SPI.transfer(address);
  SPI.transfer(value);
  // take the SS pin high to de-select the chip:
  digitalWrite(slaveSelectPin, HIGH);
}

Try to blink a LED inside the digitalPotWrite function so you can see when it enters in that function. Does it blink? (add some delay if it blinks too fast)

Also, do the pins change state when you send data? Try to monitor with your teensy the SS pin at least.

Just to make sure: are you connected to the right pins? Unlike models with a '328 processor, the 32U4 in the Yun has the SPI device on different pins. So you need to use the pins from the 6-pin ICSP header, not the usual D11, D12, D13. (Follow instructions for a Leonardo.)

Probably not the problem, but it doesn’t hurt to make sure…