I want to upgrade the Arduino Mega 2560 I am using in my prototype omnidirectional standing wheel chair project to an Artemis. The Artemis Red Board ATP is my first Artemis product. I had no trouble loading the Artemis library into the Arduino IDE, Ver 1.8.9. Then I had no trouble getting the Artemis to blink with the Arduino blink example, simply as a test. However, the Artemis will not compile a sketch that the Arduino Mega 2560 had no problems with. The sketch uses serial communications with a Basic Micro RoboClaw motor controller.
The original sketch used pins 10 and 11 for Serial communications, but the Artemis board does not have a pin 11 so I tried to use pin 9. That had nothing to do with the sketch failing to compile because I tried to compile it without the Artemis connected and with pin 9, then pin 11, just to see if the sketch would compile. Here is the pertinent code, and the error message:
#include <SoftwareSerial.h>
#include “RoboClaw.h”
SoftwareSerial serial(10,9);
RoboClaw roboclaw(&serial,10000);
Arduino: 1.8.9 (Windows 10), Board: “SparkFun BlackBoard Artemis ATP, 921600, SparkFun Variable Loader (Recommended)”
Build options changed, rebuilding all
PacketSerialEncoderSpeedDistance:12:32: error: no matching function for call to ‘RoboClaw::RoboClaw(SoftwareSerial*, int)’
RoboClaw roboclaw(&serial,10000);
^
In file included from C:\Users\Dale\AppData\Local\Temp\arduino_modified_sketch_661733\PacketSerialEncoderSpeedDistance.ino:7:
C:\Program Files (x86)\Arduino\libraries\roboclaw_arduino_library-master/RoboClaw.h:128:2: note: candidate: ‘RoboClaw::RoboClaw(HardwareSerial*, uint32_t)’
RoboClaw(HardwareSerial *hserial,uint32_t tout);
^~~~~~~~
C:\Program Files (x86)\Arduino\libraries\roboclaw_arduino_library-master/RoboClaw.h:128:2: note: no known conversion for argument 1 from ‘SoftwareSerial*’ to ‘HardwareSerial*’
C:\Program Files (x86)\Arduino\libraries\roboclaw_arduino_library-master/RoboClaw.h:24:7: note: candidate: ‘constexpr RoboClaw::RoboClaw(const RoboClaw&)’
class RoboClaw : public Stream
^~~~~~~~
C:\Program Files (x86)\Arduino\libraries\roboclaw_arduino_library-master/RoboClaw.h:24:7: note: candidate expects 1 argument, 2 provided
exit status 1
no matching function for call to ‘RoboClaw::RoboClaw(SoftwareSerial*, int)’
This report would have more information with
“Show verbose output during compilation”
option enabled in File → Preferences.
I am very much looking forward to replacing my Arduino Mega with the Spark Fun Artemis.
Thank you.