jremington / UWB-Indoor-Localization_Arduino

Open source Indoor localization using Arduino and ESP32_UWB tags + anchors
GNU General Public License v3.0
129 stars 33 forks source link

Error on code compilation #1

Closed dotnetmaster closed 2 years ago

dotnetmaster commented 2 years ago

Hi, Thanks for the library. I have just received my boards and was testing the tag setup library. But I'm getting the following error when I try to compile the code:

`Arduino: 1.8.19 (Windows 10), Board: "Arduino Uno" C:\Users\Alex\Downloads\UWB-Indoor-Localization_Arduino-main\ESP32_UWB_setup_tag\ESP32_UWB_setup_tag.ino: In function 'void setup()':

ESP32_UWB_setup_tag:29:40: error: no matching function for call to 'SPIClass::begin(int, int, int)'

SPI.begin(SPI_SCK, SPI_MISO, SPI_MOSI); ^

In file included from C:\Users\Alex\Downloads\UWB-Indoor-Localization_Arduino-main\ESP32_UWB_setup_tag\ESP32_UWB_setup_tag.ino:5:0:

C:\Users\Alex\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.5\libraries\SPI\src/SPI.h:159:15: note: candidate: static void SPIClass::begin()

static void begin();

           ^~~~~

C:\Users\Alex\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.5\libraries\SPI\src/SPI.h:159:15: note: candidate expects 0 arguments, 3 provided

exit status 1

no matching function for call to 'SPIClass::begin(int, int, int)'

This report would have more information with "Show verbose output during compilation" option enabled in File -> Preferences. ` Would highly appreciate any help resolving the issue. Thanks.

jremington commented 2 years ago

You have to install and select the correct board in the Arduino IDE. The error message shows that you have selected the Arduino Uno, which won't work for this project.

Follow the basic instructions on the Makerfabs pages to get started with ESP32.