From 7c323228f89dfe4b647983f5167ef9fb96acdcea Mon Sep 17 00:00:00 2001 From: flavienhaas Date: Tue, 10 Apr 2018 12:39:00 +0200 Subject: [PATCH] modif val transfert --- SPI_M0/SPI_M0_RECEIVE/SPI_M0_RECEIVE.ino | 3 ++- SPI_M0/SPI_M0_SEND/SPI_M0_SEND.ino | 5 ++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/SPI_M0/SPI_M0_RECEIVE/SPI_M0_RECEIVE.ino b/SPI_M0/SPI_M0_RECEIVE/SPI_M0_RECEIVE.ino index a6db85a..bbf113d 100644 --- a/SPI_M0/SPI_M0_RECEIVE/SPI_M0_RECEIVE.ino +++ b/SPI_M0/SPI_M0_RECEIVE/SPI_M0_RECEIVE.ino @@ -18,7 +18,8 @@ void setup() { uint8_t i=0; void loop() { mySPI.beginTransaction(SPISettings(8000000, MSBFIRST, SPI_MODE0)); - int recu = mySPI.transfer(i++); + int recu = 0; + recu = mySPI.transfer(2); 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 25d9e20..43bd50b 100644 --- a/SPI_M0/SPI_M0_SEND/SPI_M0_SEND.ino +++ b/SPI_M0/SPI_M0_SEND/SPI_M0_SEND.ino @@ -17,10 +17,9 @@ void setup() { uint8_t i=0; void loop() { - SerialUSB.println(i); + SerialUSB.println("je SPI"); mySPI.beginTransaction(SPISettings(8000000, MSBFIRST, SPI_MODE0)); - mySPI.transfer(i++); - mySPI.transfer(7); + mySPI.transfer(1); mySPI.endTransaction(); delay(100); }