modif val transfert

This commit is contained in:
flavienhaas 2018-04-10 12:39:00 +02:00
parent fef20671a4
commit 7c323228f8
2 changed files with 4 additions and 4 deletions

View File

@ -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);

View File

@ -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);
}