SparkFun Forums 

Where electronics enthusiasts find answers.

Topics pertaining to the Arduino Core & software used with the Artemis module and Artemis development boards.
User avatar
By Chris M
#230905
Hi,

having used the Artemis Nano in the past, now coming back to it after a year and nothing compiles anymore. I can upload Blink no problem but most of everything else is an issue and won't compile, most importantly I want to run motors and just using the MotorTest.ino file already gives me this error below.
I updated all the boards and libraries and keep getting this error:

{...}Serial_Controlled_Motor_Driver\src\SCMD.cpp: In member function 'uint8_t SCMD::begin()':
{...}Serial_Controlled_Motor_Driver\src\SCMD.cpp:106:7: error: 'class arduino::MbedSPI' has no member named 'setClockDivider'
SPI.setClockDivider(SPI_CLOCK_DIV32);
^~~~~~~~~~~~~~~
{...}Serial_Controlled_Motor_Driver\src\SCMD.cpp:106:23: error: 'SPI_CLOCK_DIV32' was not declared in this scope
SPI.setClockDivider(SPI_CLOCK_DIV32);
^~~~~~~~~~~~~~~
{...}Serial_Controlled_Motor_Driver\src\SCMD.cpp:108:7: error: 'class arduino::MbedSPI' has no member named 'setBitOrder'
SPI.setBitOrder(MSBFIRST);
^~~~~~~~~~~
{...}Serial_Controlled_Motor_Driver\src\SCMD.cpp:111:7: error: 'class arduino::MbedSPI' has no member named 'setDataMode'
SPI.setDataMode(SPI_MODE0);

any help is appreaciated.
Chris
By paulvha
#230917
Hi Chris
This is a known issue for me. Things have changed a little with V2.x.
There are 2 solutions :
1. Install the Sparkfun Apollo3 library version 1.2.3 (Arduino IDE, board manager, look for Sparkfun APollo3 board and select to install Version 1.2.3). It will still work with V1.2.3.
2. OR keep using V2.x library and change SCMD.cpp to include these settings as part of the beginTransaction()

I would advise option 1 for now and then raise an issue on https://github.com/sparkfun/SparkFun_Se ... no_Library, so that Sparkfun can correct this for V2.x
By paulvha
#230922
just for the fun, I have changed the motor library. It can be used on V1.x and V2.x to set the correct SPI modes. I compiles without errors but not checked that it really works (as I do not have the hardware).
Give it try and let us know
You do not have the required permissions to view the files attached to this post.
User avatar
By Chris M
#230925
Thank you very much Paul for your incredible help and the effort. I used your new library and same here it did compile without a problem, I will test the system and will report back. But foremost, thank you for your quick fix, this is so helpful!
 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