diff --git a/SPI_M0/SPI_M0_RECEIVE/SPI_M0_RECEIVE.ino b/SPI_M0/SPI_M0_RECEIVE/SPI_M0_RECEIVE.ino index fd4752d..a6db85a 100644 --- a/SPI_M0/SPI_M0_RECEIVE/SPI_M0_RECEIVE.ino +++ b/SPI_M0/SPI_M0_RECEIVE/SPI_M0_RECEIVE.ino @@ -4,7 +4,7 @@ SPIClass mySPI (&sercom2, 3, 5, 4, SPI_PAD_0_SCK_3, SERCOM_RX_PAD_1); //digital 3,5,4 for PIN_SPI_MISO, PIN_SPI_SCK, PIN_SPI_MOSI void setup() { - Serial.begin(115200); + SerialUSB.begin(9600); // do this first, for Reasons mySPI.begin(); @@ -17,8 +17,9 @@ void setup() { uint8_t i=0; void loop() { - Serial.println(i); mySPI.beginTransaction(SPISettings(8000000, MSBFIRST, SPI_MODE0)); int recu = mySPI.transfer(i++); + SerialUSB.println(recu); mySPI.endTransaction(); + delay(100); } diff --git a/SPI_M0/SPI_M0_SEND/SPI_M0_SEND.ino b/SPI_M0/SPI_M0_SEND/SPI_M0_SEND.ino index 04547fc..25d9e20 100644 --- a/SPI_M0/SPI_M0_SEND/SPI_M0_SEND.ino +++ b/SPI_M0/SPI_M0_SEND/SPI_M0_SEND.ino @@ -4,7 +4,7 @@ SPIClass mySPI (&sercom2, 3, 5, 4, SPI_PAD_0_SCK_3, SERCOM_RX_PAD_1); //digital 3,5,4 for PIN_SPI_MISO, PIN_SPI_SCK, PIN_SPI_MOSI void setup() { - Serial.begin(115200); + SerialUSB.begin(9600); // do this first, for Reasons mySPI.begin(); @@ -17,9 +17,10 @@ void setup() { uint8_t i=0; void loop() { - Serial.println(i); + SerialUSB.println(i); mySPI.beginTransaction(SPISettings(8000000, MSBFIRST, SPI_MODE0)); mySPI.transfer(i++); mySPI.transfer(7); mySPI.endTransaction(); + delay(100); }