modif val transfert

jd-update
flavienhaas 7 years ago
parent fef20671a4
commit 7c323228f8

@ -18,7 +18,8 @@ void setup() {
uint8_t i=0; uint8_t i=0;
void loop() { void loop() {
mySPI.beginTransaction(SPISettings(8000000, MSBFIRST, SPI_MODE0)); mySPI.beginTransaction(SPISettings(8000000, MSBFIRST, SPI_MODE0));
int recu = mySPI.transfer(i++); int recu = 0;
recu = mySPI.transfer(2);
SerialUSB.println(recu); SerialUSB.println(recu);
mySPI.endTransaction(); mySPI.endTransaction();
delay(100); delay(100);

@ -17,10 +17,9 @@ void setup() {
uint8_t i=0; uint8_t i=0;
void loop() { void loop() {
SerialUSB.println(i); SerialUSB.println("je SPI");
mySPI.beginTransaction(SPISettings(8000000, MSBFIRST, SPI_MODE0)); mySPI.beginTransaction(SPISettings(8000000, MSBFIRST, SPI_MODE0));
mySPI.transfer(i++); mySPI.transfer(1);
mySPI.transfer(7);
mySPI.endTransaction(); mySPI.endTransaction();
delay(100); delay(100);
} }

Loading…
Cancel
Save