No matching function for call to 'SPIClass::SPIClass(int)'

Hi, I am new to arduino, i am trying to controll 2 stepper mptors with a IHM02A1 driver connected to an arduino uno R3, the problem is the only library that should be compatible gives me this error [..... 'D11' was not declared in this scope], I trird to fix this eliminating the D before the numbers, now I get this error [...no matching function for call to 'SPIClass::SPIClass(int)'] . Can someone help me with this library
https://www.arduino.cc/reference/en/libraries/stm32duino-x-nucleo-ihm02a1/

The developer said "Any contribution to do it compliant is welcome." and so do I.

thank you in advance

Hi @athos21. This library can only be used with Arduino boards that have an STM32 microcontroller.

Your Arduino Uno board has an ATmega328P microcontroller, and so cannot be used with that library. This is the cause of the error.

1 Like

ok, so in this case I have to change board. Or could it be possible to make things work with an other library?
Thanks @in0

I recommend searching for one. There are thousands of Arduino libraries, so there is a very good chance that there are multiple for any common part or task. I did a super quick search and the only results were for that STM32 library, but you shouldn't let that discourage you from a closer look.

The STM32 boards are pretty nice. They are reasonably priced and have good community support. Unfortunately, getting started with them is a bit more difficult than the Uno.

1 Like

@in0 do Arduino boards with STM32 microcontrollers exist? I couldn't find any online.

Why does the X-NUCLEO-IHM02A1 have Uno connectors if a ready-to-go library isn't available?

I am thinking about building SPI messages myself to send to the IHM02A1 to see if it's possible to simply move the stepper motor in a rudimentary fashion, rather than working off of the library linked in the original question. Not sure if that would work...otherwise might as well buy a Nucleo dev board instead of using Arduino at all.

1 Like

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