Need help porting L6470-AutoDriver

I’ve replaced delay, SPI config and am trying to build

Next I removed ‘ceil’ mentioned in …Support.cpp
Next I used Spark’s configs of SPI


And finally I’m getting error: 'SPI' does not name a type in …Support.cpp, though I’ve added "application.h"
Also I’m not sure if I can just replace SPI.beginTransaction with just SPI.begin

@ryotsuke, you will need an SPI.begin() in there. You need to put SPI.begin() and the reset of the SPI lines in a function and not outside a function body since the SPI object already exists. A good place is is the SPIConfig() function in SparkFunAutoDriver.cpp by replacing the SPISettings line in there.

You can delete the SPI.beginTransaction() and SPI.endTransaction() lines since they are not supported. :slight_smile:

OK, I just removed everything causing errors from Support file and it has compiled. I wonder if that will work :smile:

Compiles but does not lood to be working. Do I need SPI.setClockDividerReference(SPI_CLK_ARDUINO); ?

Won’t hurt to give it a shot!

No still fails
And doing board.goTo(1); even makes core to blink SOS red and reboot