Hello
This may eb a very basic question, but it has really puzzled me in the last couple of hours not being able to get SPI to work.
I am running teensyduino beta 7 from yesterday on MBP from last year.
I am running this sketch:
and I can see from the Teensy 3.0 pin-sheet that came with the board that SPI should be:
CS0 = 10 (as I have defined above)
DOUT = 11
SCK = 13
When I measure pin 10 I get a buzz from the HIGH/LOW in the above code, but measuring on any other pin (except power pins) gives me no output/reaction.
To me the above code should at least spit something out on pin 11 and 13 if I am reading the pin-sheet correctly.
Is anybody able to see what I am doing wrong?
Best Regards,
Jakob
This may eb a very basic question, but it has really puzzled me in the last couple of hours not being able to get SPI to work.
I am running teensyduino beta 7 from yesterday on MBP from last year.
I am running this sketch:
Code:
#include <SPI.h>
#define CS 10 // Digital 10
byte sample = 0;
void setup() {
SPI.begin();
pinMode(CS, OUTPUT);
}
void loop() {
sample = random(255);
digitalWrite(CS, LOW);
SPI.transfer(sample);
digitalWrite(CS, HIGH);
delay(10);
}
and I can see from the Teensy 3.0 pin-sheet that came with the board that SPI should be:
CS0 = 10 (as I have defined above)
DOUT = 11
SCK = 13
When I measure pin 10 I get a buzz from the HIGH/LOW in the above code, but measuring on any other pin (except power pins) gives me no output/reaction.
To me the above code should at least spit something out on pin 11 and 13 if I am reading the pin-sheet correctly.
Is anybody able to see what I am doing wrong?
Best Regards,
Jakob