Quantcast
Channel: Intel Communities: Message List
Viewing all articles
Browse latest Browse all 18347

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

$
0
0

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?


Viewing all articles
Browse latest Browse all 18347

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>