11 Replies Latest reply on Feb 3, 2015 3:45 AM by David_J_Hunt

    Edison for Arduino SPI Problems. Does anyone have simple  example using SPI on the Edison using the Arduino IDE? ?

    E_Cliff

      I have a simple program that runs well on the Arduino UNO, but when I try it on the Edison, it looks like the output is corrupted with a 100 HZ output signal on the lines. It seems to be related to the GPIO setup

       

      #include <SPI.h>

       

      void setup()

      {

        // -------- SPI initialization

        pinMode(10, OUTPUT);  // Set the SS pin as an output

        digitalWrite(10, HIGH);  // Set the SS pin HIGH

        SPI.begin();  // Begin SPI hardware

        SPI.setClockDivider(SPI_CLOCK_DIV32);  // Slow down SPI clock

      }

       

       

      void loop()

      {

           

          digitalWrite(10,LOW);

          SPI.transfer(0x55);

          digitalWrite(10,HIGH);

         

          delay(3);  //

       

      }

      So, What am I missing to make this simple code work properly on the Edison?