SparkFun Forums 

Where electronics enthusiasts find answers.

Hardware or product specific questions are best asked here.

I have a project that was using a RedBoard (328P/UNO style) without a problem, and now I'm building its sister project using a RedBoard Artemis, and running into issues with the SparkFun Qwiic Motor Driver when trying to compile Arduino code for it.

Using Arduino IDE 2.1.0, I open up the example sketch "MotorTest.ino" from the Serial Controlled Motor Driver library (v1.04), choose the RedBoard Artemis Nano (I've got v2.2.1 of SparkFun Apollo3 Boards installed). When I hit compile I get the following errors, seemingly related to SPI (which I'm not using, I'm using the example sketch as is, in I2C mode)...
Code: Select all
/Documents/Arduino/libraries/Serial_Controlled_Motor_Driver/src/SCMD.cpp: In member function 'uint8_t SCMD::begin()':
/Documents/Arduino/libraries/Serial_Controlled_Motor_Driver/src/SCMD.cpp:106:7: error: 'class arduino::MbedSPI' has no member named 'setClockDivider'
/Documents/Arduino/libraries/Serial_Controlled_Motor_Driver/src/SCMD.cpp:106:23: error: 'SPI_CLOCK_DIV32' was not declared in this scope
/Documents/Arduino/libraries/Serial_Controlled_Motor_Driver/src/SCMD.cpp:108:7: error: 'class arduino::MbedSPI' has no member named 'setBitOrder'
/Documents/Arduino/libraries/Serial_Controlled_Motor_Driver/src/SCMD.cpp:111:7: error: 'class arduino::MbedSPI' has no member named 'setDataMode'

exit status 1

Compilation error: exit status 1
If I change the board target to the old SparkFun Redboard, it compiles without a problem.

If been digging for information for a few hours now, but not coming up with anything useful. Any ideas?
The way SPI is initialized is the "old" way. It is not advised anymore in the modern SPI libraries for the many different boards. I have tried to transform the "old" way to the new style for the Apollo3, but can not test it as I do not have a motor to test. Try the attached and let us know the outcome.
You do not have the required permissions to view the files attached to this post.
 Topic permissions

You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum