Arduino Nan0 33 IOT Compile Error: arduino::SPIClass {aka class arduino::HardwareSPI}’ has no member named ‘setDataMode’ _spi->setDataMode(SPI_MODE3);

Error: ‘arduino::SPIClass {aka class arduino::HardwareSPI}’ has no member named ‘setDataMode’ _spi->setDataMode(SPI_MODE3);

Getting this error with Arduino Nano 33 IoT when using Arduino IDE? I suggest go to the original Arduino program. The call SetDataMode was deprecated in IDE. The original Arduino program with an older version Nano 33 Iot Board package 1.8.11 will compile and upload without error in Arduino original program. Do not use the newest version 1.8.13 because the call "setdatamode" was deprecated in that version.

Sometimes folks you have to go back to go forward in the Arduino driver librariies.
I have DPS310 running fine on my Nano 33 IOT by using the non-IDE version and an older driver for Nano 1.8.11 that still supports the "setDataMode" calls. FYI there is an excellent YouTube video explains how to do it. Search for it on "fixing Compile errors in Arduino IDE" that should put you onto the Video.

Your only other option is to rewrite the Dps310.cpp to the new function call that replaced " SetDataMode" which I believe is the "transaction data mode" call in the Library for Nano 33 IoT in the Arduino IDE version.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.