Protocentral / protocentral-ads1292r-arduino

Arduino Library for the ADS1292R ECG/Respiration shield and breakout boards from ProtoCentral
https://protocentral.com/product/ads1292r-ecg-respiration-shield-for-arduino-v2/
Other
13 stars 6 forks source link

SPI API outdated #1

Open Tom-AW opened 3 years ago

Tom-AW commented 3 years ago

Hi, the arduino SPI API has changed and these lines in all 3 examples no longer work

 SPI.begin();
  SPI.setBitOrder(MSBFIRST);
  //CPOL = 0, CPHA = 1
  SPI.setDataMode(SPI_MODE1);
  // Selecting 1Mhz clock for SPI
  SPI.setClockDivider(SPI_CLOCK_DIV16);

They should be replaced with

  SPI.beginTransaction(SPISettings(1000000,MSBFIRST,SPI_MODE1));